Stage 0: the package datekeys and its test data at spec-v0.11
A pure Dart package, without Flutter, for the app that the author will
write in Flutter (docs/PLAN_dart.md, stage 0):
- pubspec.yaml: the package datekeys, unpublished, for Dart 3.13; at run
time only package:crypto, and in development only package:test, which
the author approved on 5 October.
- testdata/ vendored from datekeys-go at the tag spec-v0.11 (ae33434),
124 files, with the same testdata/SOURCE.json that datekeys-ts writes for
that commit.
- tool/sync_testdata.dart, the port of scripts/sync-testdata.mjs, and
test/testdata_test.dart, which checks the copy and that every file names
specVersion; test/version_test.dart keeps pubspec.yaml and
lib/src/version.dart in step.
- tool/check.sh, the local gate: format, analysis with every info fatal,
tests, and the copy against ../datekeys-go.
- The licence, Apache-2.0, as the other two implementations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 days ago
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# Local gate of datekeys-dart, as scripts/check.sh of datekeys-go and npm run
|
|
|
|
|
# verify of datekeys-ts: format, analysis, tests on the VM and compiled to
|
|
|
|
|
# JavaScript, and the copy of testdata/ against the Go repository next to this
|
|
|
|
|
# one. Run it before every commit. It needs Node.js, as datekeys-ts does.
|
Stage 0: the package datekeys and its test data at spec-v0.11
A pure Dart package, without Flutter, for the app that the author will
write in Flutter (docs/PLAN_dart.md, stage 0):
- pubspec.yaml: the package datekeys, unpublished, for Dart 3.13; at run
time only package:crypto, and in development only package:test, which
the author approved on 5 October.
- testdata/ vendored from datekeys-go at the tag spec-v0.11 (ae33434),
124 files, with the same testdata/SOURCE.json that datekeys-ts writes for
that commit.
- tool/sync_testdata.dart, the port of scripts/sync-testdata.mjs, and
test/testdata_test.dart, which checks the copy and that every file names
specVersion; test/version_test.dart keeps pubspec.yaml and
lib/src/version.dart in step.
- tool/check.sh, the local gate: format, analysis with every info fatal,
tests, and the copy against ../datekeys-go.
- The licence, Apache-2.0, as the other two implementations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 days ago
|
|
|
#
|
|
|
|
|
# tool/check.sh
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
|
|
echo "== dart format"
|
|
|
|
|
dart format --output=none --set-exit-if-changed .
|
|
|
|
|
|
|
|
|
|
echo "== dart analyze"
|
|
|
|
|
dart analyze --fatal-infos
|
|
|
|
|
|
|
|
|
|
echo "== dart test"
|
|
|
|
|
dart test
|
|
|
|
|
|
|
|
|
|
# The integers of the library must be exact on the web too, where an int is
|
|
|
|
|
# a double and the bit operators work on 32 bits: the tests that read no file
|
|
|
|
|
# run again compiled to JavaScript (the others are @TestOn('vm')).
|
|
|
|
|
echo "== dart test -p node"
|
|
|
|
|
dart test -p node
|
|
|
|
|
|
Stage 0: the package datekeys and its test data at spec-v0.11
A pure Dart package, without Flutter, for the app that the author will
write in Flutter (docs/PLAN_dart.md, stage 0):
- pubspec.yaml: the package datekeys, unpublished, for Dart 3.13; at run
time only package:crypto, and in development only package:test, which
the author approved on 5 October.
- testdata/ vendored from datekeys-go at the tag spec-v0.11 (ae33434),
124 files, with the same testdata/SOURCE.json that datekeys-ts writes for
that commit.
- tool/sync_testdata.dart, the port of scripts/sync-testdata.mjs, and
test/testdata_test.dart, which checks the copy and that every file names
specVersion; test/version_test.dart keeps pubspec.yaml and
lib/src/version.dart in step.
- tool/check.sh, the local gate: format, analysis with every info fatal,
tests, and the copy against ../datekeys-go.
- The licence, Apache-2.0, as the other two implementations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 days ago
|
|
|
echo "== testdata against datekeys-go"
|
|
|
|
|
dart run tool/sync_testdata.dart check --against ../datekeys-go
|
|
|
|
|
|
|
|
|
|
echo "all checks passed"
|