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

Commit

Permalink
Merge pull request #119 from dart-lang/3.4.0
Browse files Browse the repository at this point in the history
bump package:usage to 3.4.0
  • Loading branch information
devoncarew committed Apr 10, 2018
2 parents 7f5a0c7 + f2ec7c9 commit 5d29895
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.packages
.idea/
.pub/
.dart_tool/
build/
doc/api/
pubspec.lock
6 changes: 1 addition & 5 deletions .idea/usage.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.4.0
- bump our minimum SDK constraint to `>=2.0.0-dev.30`
- change to using non-deprecated dart:convert constants

## 3.3.0
- added a `close()` method to the `Analytics` class
- change our minimum SDK from `1.24.0-dev` to `1.24.0` stable
Expand Down
6 changes: 3 additions & 3 deletions lib/src/usage_impl_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

import 'dart:async';
import 'dart:convert' show JSON;
import 'dart:convert' show jsonEncode, jsonDecode;
import 'dart:html';

import 'usage_impl.dart';
Expand Down Expand Up @@ -64,7 +64,7 @@ class HtmlPersistentProperties extends PersistentProperties {
HtmlPersistentProperties(String name) : super(name) {
String str = window.localStorage[name];
if (str == null || str.isEmpty) str = '{}';
_map = JSON.decode(str);
_map = jsonDecode(str);
}

@override
Expand All @@ -78,7 +78,7 @@ class HtmlPersistentProperties extends PersistentProperties {
_map[key] = value;
}

window.localStorage[name] = JSON.encode(_map);
window.localStorage[name] = jsonEncode(_map);
}

@override
Expand Down
4 changes: 2 additions & 2 deletions lib/src/usage_impl_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

import 'dart:async';
import 'dart:convert' show JSON, JsonEncoder;
import 'dart:convert' show jsonDecode, JsonEncoder;
import 'dart:io';

import 'package:path/path.dart' as path;
Expand Down Expand Up @@ -153,7 +153,7 @@ class IOPersistentProperties extends PersistentProperties {
try {
String contents = _file.readAsStringSync();
if (contents.isEmpty) contents = '{}';
_map = JSON.decode(contents);
_map = jsonDecode(contents);
} catch (_) {
_map = {};
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# BSD-style license that can be found in the LICENSE file.

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

environment:
sdk: '>=1.24.0 <2.0.0'
sdk: '>=2.0.0-dev.30 <2.0.0'

dependencies:
path: ^1.4.0
Expand Down

0 comments on commit 5d29895

Please sign in to comment.