Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit f2ec7c9

Browse files
committed
bump package:usage to 3.4.0
1 parent 7f5a0c7 commit f2ec7c9

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.packages
22
.idea/
33
.pub/
4+
.dart_tool/
45
build/
56
doc/api/
67
pubspec.lock

.idea/usage.iml

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 3.4.0
4+
- bump our minimum SDK constraint to `>=2.0.0-dev.30`
5+
- change to using non-deprecated dart:convert constants
6+
37
## 3.3.0
48
- added a `close()` method to the `Analytics` class
59
- change our minimum SDK from `1.24.0-dev` to `1.24.0` stable

lib/src/usage_impl_html.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:async';
6-
import 'dart:convert' show JSON;
6+
import 'dart:convert' show jsonEncode, jsonDecode;
77
import 'dart:html';
88

99
import 'usage_impl.dart';
@@ -64,7 +64,7 @@ class HtmlPersistentProperties extends PersistentProperties {
6464
HtmlPersistentProperties(String name) : super(name) {
6565
String str = window.localStorage[name];
6666
if (str == null || str.isEmpty) str = '{}';
67-
_map = JSON.decode(str);
67+
_map = jsonDecode(str);
6868
}
6969

7070
@override
@@ -78,7 +78,7 @@ class HtmlPersistentProperties extends PersistentProperties {
7878
_map[key] = value;
7979
}
8080

81-
window.localStorage[name] = JSON.encode(_map);
81+
window.localStorage[name] = jsonEncode(_map);
8282
}
8383

8484
@override

lib/src/usage_impl_io.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:async';
6-
import 'dart:convert' show JSON, JsonEncoder;
6+
import 'dart:convert' show jsonDecode, JsonEncoder;
77
import 'dart:io';
88

99
import 'package:path/path.dart' as path;
@@ -153,7 +153,7 @@ class IOPersistentProperties extends PersistentProperties {
153153
try {
154154
String contents = _file.readAsStringSync();
155155
if (contents.isEmpty) contents = '{}';
156-
_map = JSON.decode(contents);
156+
_map = jsonDecode(contents);
157157
} catch (_) {
158158
_map = {};
159159
}

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
# BSD-style license that can be found in the LICENSE file.
44

55
name: usage
6-
version: 3.3.1-dev
6+
version: 3.4.0
77
description: A Google Analytics wrapper for both command-line, web, and Flutter apps.
88
homepage: https://github.com/dart-lang/usage
99
author: Dart Team <misc@dartlang.org>
1010

1111
environment:
12-
sdk: '>=1.24.0 <2.0.0'
12+
sdk: '>=2.0.0-dev.30 <2.0.0'
1313

1414
dependencies:
1515
path: ^1.4.0

0 commit comments

Comments
 (0)