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

add a publish script; prep to publish 1.1.0 #104

Merged
merged 4 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
update the sdks we test against
  • Loading branch information
devoncarew committed Jan 26, 2023
commit 9cd020a95210ab9725c6957f2bf965b06d85e64d
5 changes: 2 additions & 3 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [dev, beta]
sdk: [2.19.0, dev]
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
Expand All @@ -47,8 +47,7 @@ jobs:
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
# TODO(devoncarew): Add `2.19.0` to this once that release is stable
sdk: [dev, beta]
sdk: [2.19.0, dev]
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Make `Int32` parse functions consistent with documentation (accept
leading minus sign, do not accept empty inputs).
* Update the minimum SDK constraint to 2.19.
* Update to package:lints 2.0.0.

## 1.0.1

Expand Down
8 changes: 4 additions & 4 deletions lib/src/utilities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ int validateRadix(int radix) =>
/// not a valid digit in any radix in the range 2 through 36.
int decodeDigit(int c) {
// Hex digit char codes
const int _c0 = 48; // '0'.codeUnitAt(0)
const int _ca = 97; // 'a'.codeUnitAt(0)
const int c0 = 48; // '0'.codeUnitAt(0)
const int ca = 97; // 'a'.codeUnitAt(0)

int digit = c ^ _c0;
int digit = c ^ c0;
if (digit < 10) return digit;
int letter = (c | 0x20) - _ca;
int letter = (c | 0x20) - ca;
if (letter >= 0) {
// Returns values above 36 for invalid digits.
// The value is checked against the actual radix where the return
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ environment:
sdk: '>=2.19.0 <3.0.0'

dev_dependencies:
lints: ^1.0.0
lints: ^2.0.0
test: ^1.16.0
8 changes: 4 additions & 4 deletions test/int64_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -714,16 +714,16 @@ void main() {
});

test('JavaScript 53-bit integer boundary', () {
Int64 _factorial(Int64 n) {
Int64 factorial(Int64 n) {
if (n.isZero) {
return Int64(1);
} else {
return n * _factorial(n - Int64(1));
return n * factorial(n - Int64(1));
}
}

Int64 fact18 = _factorial(Int64(18));
Int64 fact17 = _factorial(Int64(17));
Int64 fact18 = factorial(Int64(18));
Int64 fact17 = factorial(Int64(17));
expect(fact18 ~/ fact17, Int64(18));
});

Expand Down