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

bump package:usage to 3.4.0 #119

Merged
merged 1 commit into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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