Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#201)

Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.1 to 1.6.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/releases">dart-lang/setup-dart's releases</a>.</em></p>
<blockquote>
<h2>v1.6.0</h2>
<ul>
<li>Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. <code>3.2</code>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md">dart-lang/setup-dart's changelog</a>.</em></p>
<blockquote>
<h2>v1.6.0</h2>
<ul>
<li>Enable provisioning of the latest Dart SDK patch release by specifying just
the major and minor version (e.g. <code>3.2</code>).</li>
</ul>
<h2>v1.5.1</h2>
<ul>
<li>No longer test the <code>setup-dart</code> action on pre-2.12 SDKs.</li>
<li>Upgrade JS interop code to use extension types
(the new name for inline classes).</li>
<li>The upcoming rename of the <code>be</code> channel to <code>main</code> is now supported with
forward compatibility that switches when the rename happens.</li>
</ul>
<h2>v1.5.0</h2>
<ul>
<li>Re-wrote the implementation of the action into Dart.</li>
<li>Auto-detect the platform architecture (<code>x64</code>, <code>ia32</code>, <code>arm</code>, <code>arm64</code>).</li>
<li>Improved the caching and download resilience of the sdk.</li>
<li>Added a new action output: <code>dart-version</code> - the installed version of the sdk.</li>
</ul>
<h2>v1.4.0</h2>
<ul>
<li>Automatically create OIDC token for pub.dev.</li>
<li>Add a reusable workflow for publishing.</li>
</ul>
<h2>v1.3.0</h2>
<ul>
<li>The install location of the Dart SDK is now available
in an environment variable, <code>DART_HOME</code>
(<a href="https://redirect.github.com/dart-lang/setup-dart/issues/43">#43</a>).</li>
<li>Fixed an issue where cached downloads could lead to unzip issues
on self-hosted runners
(<a href="https://redirect.github.com/dart-lang/setup-dart/issues/35">#35</a>).</li>
</ul>
<h2>v1.2.0</h2>
<ul>
<li>Fixed a path issue impacting git dependencies on Windows.</li>
</ul>
<h2>v1.1.0</h2>
<ul>
<li>Added a <code>flavor</code> option setup.sh to allow downloading unpublished builds.</li>
</ul>
<h2>v1.0.0</h2>
<ul>
<li>Promoted to 1.0 stable.</li>
</ul>
<h2>v0.5</h2>
<ul>
<li>Fixed a Windows <code>pub global activate</code> path issue.</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/dart-lang/setup-dart/commit/b64355ae6ca0b5d484f0106a033dd1388965d06d"><code>b64355a</code></a> debugging issues around specifying the latest patch release (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/108">#108</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/cd21d0e7475915575e022d2cacd7c54e5026e159"><code>cd21d0e</code></a> Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/110">#110</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/2118353f672662accb7785f6afd28ab61c7cfec9"><code>2118353</code></a> Bump actions/checkout from 3 to 4 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/109">#109</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/8ef13bcca6c9bb2219391088bc9d968125f68406"><code>8ef13bc</code></a> support sdk version wildcard format (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/106">#106</a>)</li>
<li>See full diff in <a href="https://github.com/dart-lang/setup-dart/compare/8a4b97ea2017cc079571daec46542f76189836b1...b64355ae6ca0b5d484f0106a033dd1388965d06d">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.1&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
1 file changed
tree: 6b5fd98c64f2505271f6ba6adc7d90c98231edb0
  1. .github/
  2. example/
  3. lib/
  4. test/
  5. .gitignore
  6. analysis_options.yaml
  7. AUTHORS
  8. CHANGELOG.md
  9. LICENSE
  10. pubspec.yaml
  11. README.md
README.md

Build Status pub package package publisher

A wrapper around Google Analytics for command-line, web, and Flutter apps.

UPDATE: Intent to deprecate

As an update for consumers of this package, we intend to deprecate package:usage. https://github.com/dart-lang/usage/issues/185 has details and discussion, but briefly:

  • this package uses the older Universal Analytics protocol to record hits to Google Analytics
  • Universal Analytics properties will stop processing new hits on July 1, 2023
  • this library does not support the newer GA4 protocol
  • we (the Dart team) originally built this package for our own use, but we're no longer consuming it

Clients who want to record hits to Google Analytics could:

  • for web clients, wrapping the gtags.js library is a good solution
  • for native clients, sending hits to the new protocol is not much more difficult than sending HTTP POSTs to the right endpoint

See also https://github.com/dart-lang/usage/issues/185 other potential remediations.

For web apps

To use this library as a web app, import the usage_html.dart library and instantiate the AnalyticsHtml class.

For Flutter apps

Flutter applications can use the AnalyticsIO version of this library. They will need to specify the documents directory in the constructor in order to tell the library where to save the analytics preferences:

import 'package:flutter/services.dart';
import 'package:usage/usage_io.dart';

void main() {
  final String UA = ...;

  Analytics ga = new AnalyticsIO(UA, 'ga_test', '3.0',
    documentsDirectory: PathProvider.getApplicationDocumentsDirectory());
  ...
}

For command-line apps

To use this library as a command-line app, import the usage_io.dart library and instantiate the AnalyticsIO class.

Note, for CLI apps, the usage library will send analytics pings asynchronously. This is useful in that it doesn‘t block the app generally. It does have one side-effect, in that outstanding asynchronous requests will block termination of the VM until that request finishes. So, for short-lived CLI tools, pinging Google Analytics can cause the tool to pause for several seconds before it terminates. This is often undesired - gathering analytics information shouldn’t negatively effect the tool's UX.

One solution to this is to use the waitForLastPing({Duration timeout}) method on the analytics object. This will wait until all outstanding analytics requests have completed, or until the specified duration has elapsed. So, CLI apps can do something like:

await analytics.waitForLastPing(timeout: new Duration(milliseconds: 200));
analytics.close();

or:

await analytics.waitForLastPing(timeout: new Duration(milliseconds: 200));
exit(0);

Using the API

Import the package (in this example we use the dart:io version):

import 'package:usage/usage_io.dart';

And call some analytics code:

final String UA = ...;

Analytics ga = new AnalyticsIO(UA, 'ga_test', '3.0');
ga.analyticsOpt = AnalyticsOpt.optIn;

ga.sendScreenView('home');
ga.sendException('foo exception');

ga.sendScreenView('files');
ga.sendTiming('writeTime', 100);
ga.sendTiming('readTime', 20);

When do we send analytics data?

You can use this library in an opt-in manner or an opt-out one. It defaults to opt-out - data will be sent to Google Analytics unless the user explicitly opts-out. The mode can be adjusted by changing the value of the Analytics.analyticsOpt field.

Opt-out In opt-out mode, if the user does not explicitly opt-out of collecting analytics, the usage library will send usage data.

Opt-in In opt-in mode, no data will be sent until the user explicitly opt-in to collection. This includes screen views, events, timing information, and exceptions.

Other info

For both classes, you need to provide a Google Analytics tracking ID, the application name, and the application version.

Note: This library is intended for use with the Google Analytics application / mobile app style tracking IDs (as opposed to the web site style tracking IDs).

For more information, please see the Google Analytics Measurement Protocol Policy.

Contributing

Tests can be run using pub run test.