Skip to content

Commit 6010304

Browse files
authored
misc: require Dart 2, fix deprecations, prepare to release 1.0.4 (flutter#12)
Fixes https://github.com/dart-lang/boolean_selector/issues/11 Fixes dart-archive/boolean_selector#8
1 parent 958b540 commit 6010304

8 files changed

+17
-26
lines changed

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
.buildlog
2-
.DS_Store
3-
.idea
4-
.pub/
5-
.settings/
6-
build/
7-
packages
1+
.dart_tool/
82
.packages
93
pubspec.lock

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
language: dart
22
sudo: false
33
dart:
4-
- stable
4+
#- stable
55
- dev
66
dart_task:
77
- test: -p vm
88
xvfb: false
9-
- test: -p firefox
9+
# Set concurrency to 1 to avoid flakes on Travis
10+
- test: -p firefox -j 1
1011
- dartanalyzer
1112

1213
matrix:
1314
include:
14-
- dart: stable
15+
- dart: dev
1516
dart_task: dartfmt
1617

1718
# Only building master means that we don't run two builds for each pull request.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.4
2+
3+
* Now requires Dart 2.
4+
15
## 1.0.3
26

37
* Work around an inference bug in the new common front-end.

analysis_options.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

codereview.settings

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/src/evaluator.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:collection/collection.dart';
6-
75
import 'ast.dart';
86
import 'visitor.dart';
97

@@ -17,7 +15,7 @@ class Evaluator implements Visitor<bool> {
1715

1816
Evaluator(semantics)
1917
: _semantics = semantics is Iterable
20-
? DelegatingIterable.typed(semantics.toSet()).contains
18+
? semantics.toSet().contains
2119
: semantics as _Semantics;
2220

2321
bool visitVariable(VariableNode node) => _semantics(node.name);

pubspec.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
name: boolean_selector
2-
version: 1.0.3
2+
version: 1.0.4
33
description: A flexible syntax for boolean expressions.
44
author: Dart Team <[email protected]>
55
homepage: https://github.com/dart-lang/boolean_selector
66

77
environment:
8-
sdk: '>=1.8.0 <2.0.0'
8+
sdk: '>=2.0.0-dev.58 <3.0.0'
99

1010
dependencies:
11-
collection: '^1.5.0'
1211
source_span: '^1.0.0'
1312
string_scanner: '>=0.1.1 <2.0.0'
1413

1514
dev_dependencies:
16-
test: '^0.12.0'
15+
test: ^1.2.0

test/parser_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import 'package:boolean_selector/src/ast.dart';
88
import 'package:boolean_selector/src/parser.dart';
99

1010
/// A matcher that asserts that a value is a [ConditionalNode].
11-
Matcher _isConditionalNode = new isInstanceOf<ConditionalNode>();
11+
final _isConditionalNode = new TypeMatcher<ConditionalNode>();
1212

1313
/// A matcher that asserts that a value is an [OrNode].
14-
Matcher _isOrNode = new isInstanceOf<OrNode>();
14+
final _isOrNode = new TypeMatcher<OrNode>();
1515

1616
/// A matcher that asserts that a value is an [AndNode].
17-
Matcher _isAndNode = new isInstanceOf<AndNode>();
17+
final _isAndNode = new TypeMatcher<AndNode>();
1818

1919
/// A matcher that asserts that a value is a [NotNode].
20-
Matcher _isNotNode = new isInstanceOf<NotNode>();
20+
final _isNotNode = new TypeMatcher<NotNode>();
2121

2222
void main() {
2323
group("parses a conditional expression", () {

0 commit comments

Comments
 (0)