Fix typo in argument name (#186)
Closes #185
Update to dart-lang/setup-dart to install dart, test on the oldest
supported SDK.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e01fec0..f1fd21e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,25 +1,63 @@
-name: ci
+name: Dart CI
on:
push:
branches: [ master ]
pull_request:
+ branches: [ master ]
schedule:
- # “At 00:00 (UTC) on Sunday.”
- - cron: '0 0 * * 0'
+ - cron: "0 0 * * 0"
+
+env:
+ PUB_ENVIRONMENT: bot.github
jobs:
- ci:
+ # Check code formatting and static analysis on a single OS (linux)
+ # against Dart dev.
+ analyze:
runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sdk: [dev]
steps:
- - uses: cedx/setup-dart@v2
- with:
- release-channel: dev
- - run: dart --version
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v2
+ - uses: dart-lang/setup-dart@v1.0
+ with:
+ sdk: ${{ matrix.sdk }}
+ - id: install
+ name: Install dependencies
+ run: dart pub get
+ - name: Check formatting
+ run: dart format --output=none --set-exit-if-changed .
+ if: always() && steps.install.outcome == 'success'
+ - name: Analyze code
+ run: dart analyze --fatal-infos
+ if: always() && steps.install.outcome == 'success'
- - run: pub get
-
- - run: dart format --output=none --set-exit-if-changed .
- - run: dart analyze --fatal-infos .
- - run: pub run test -p vm,chrome
+ # Run tests on a matrix consisting of two dimensions:
+ # 1. OS: ubuntu-latest, (macos-latest, windows-latest)
+ # 2. release channel: dev
+ test:
+ needs: analyze
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ # Add macos-latest and/or windows-latest if relevant for this package.
+ os: [ubuntu-latest]
+ sdk: [2.12.0, dev]
+ steps:
+ - uses: actions/checkout@v2
+ - uses: dart-lang/setup-dart@v1.0
+ with:
+ sdk: ${{ matrix.sdk }}
+ - id: install
+ name: Install dependencies
+ run: dart pub get
+ - name: Run VM tests
+ run: dart test --platform vm --test-randomize-ordering-seed=random
+ if: always() && steps.install.outcome == 'success'
+ - name: Run Chrome tests
+ run: dart test --platform chrome --test-randomize-ordering-seed=random
+ if: always() && steps.install.outcome == 'success'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f8fe237..e39b9d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,5 @@
+## 1.15.1-dev
+
## 1.15.0
* Stable release for null safety.
diff --git a/lib/src/iterable_extensions.dart b/lib/src/iterable_extensions.dart
index 82217e9..cddc497 100644
--- a/lib/src/iterable_extensions.dart
+++ b/lib/src/iterable_extensions.dart
@@ -192,10 +192,10 @@
/// Expands each element and index to a number of elements in a new iterable.
Iterable<R> expandIndexed<R>(
- Iterable<R> Function(int index, T element) expend) sync* {
+ Iterable<R> Function(int index, T element) expand) sync* {
var index = 0;
for (var element in this) {
- yield* expend(index++, element);
+ yield* expand(index++, element);
}
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 03a3f54..9ce3549 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,11 +1,11 @@
name: collection
-version: 1.15.0
+version: 1.15.1-dev
description: Collections and utilities functions and classes related to collections.
-homepage: https://github.com/dart-lang/collection
+repository: https://github.com/dart-lang/collection
environment:
- sdk: ">=2.12.0-0 <3.0.0"
+ sdk: ">=2.12.0 <3.0.0"
dev_dependencies:
pedantic: ^1.10.0-nullsafety