Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge package:fixnum #137

Merged
merged 128 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
117eb74
Migrate fixnum to Github.
cbracken Feb 9, 2015
78229e2
Add CONTRIBUTING.md.
cbracken Feb 9, 2015
65759ff
Version 0.9.1
cbracken Feb 9, 2015
1670633
Format with dart_style.
cbracken Feb 9, 2015
eddb1e2
Version 0.9.1+1
cbracken Feb 9, 2015
6bd3c5f
Add AUTHORS, PATENTS files.
cbracken Feb 9, 2015
c294c50
Document example version constraint in README.
cbracken Feb 9, 2015
bd78aad
Eliminate extra underscore in test filenames.
cbracken Feb 9, 2015
3a37274
Add all_tests.dart.
cbracken Feb 9, 2015
eae3a2d
Add Travis CI configuration.
cbracken Feb 9, 2015
d8493ed
Add .gitignore.
cbracken Feb 9, 2015
c492f7c
Add codereview.settings.
cbracken Feb 9, 2015
b705a55
Update installation instructions in README.
cbracken Feb 9, 2015
1ae12c8
Re-worded package description.
cbracken Feb 9, 2015
fa0bb30
Fixed typo in README.
cbracken Feb 9, 2015
2a31f5f
README: Add Travis CI status badge. Update installation, contribution…
cbracken Feb 9, 2015
c3d5495
Update fixnum homepage in pubspec.yaml.
cbracken Feb 10, 2015
2498571
Update upper bound on unittest dev dependency to <0.12.
cbracken Feb 10, 2015
1d78397
Updated recommended dependency upper-bound in README.
cbracken Feb 10, 2015
f4b9519
Version 0.9.1+2
cbracken Feb 10, 2015
f46fbea
Collect coverage during Travis CI run.
cbracken Feb 10, 2015
76c11b6
fixup! Collect coverage during Travis CI run.
cbracken Feb 10, 2015
04c367d
Reformat badge placement in README.md
cbracken Feb 10, 2015
652ecb7
Add tests for illegal toRadixString arguments.
cbracken Feb 10, 2015
4536379
Add tests for Int64 fromBytes, fromBytesBigEndian constructors.
cbracken Feb 10, 2015
11e8119
Add operator == tests for int RHS.
cbracken Feb 10, 2015
51c1519
Add unit tests for Int64.parseHex()
cbracken Feb 10, 2015
0acd88b
Add tests for Int64.numberOfLeadingZeros.
cbracken Feb 11, 2015
325ce30
Minor Int64 test cleanup.
cbracken Feb 11, 2015
05dc3c9
Add tests for Int64.numberOfTrailingZeros.
cbracken Feb 11, 2015
f86792f
Add tests for Int64.toBytes.
cbracken Feb 11, 2015
b4b3317
Add tests for Int64 RHS for Int32 +, - operators.
cbracken Feb 11, 2015
e9b4e3a
Add tests for operator == with int RHS.
cbracken Feb 11, 2015
2fc8069
Add tests for Int32.compareTo.
cbracken Feb 11, 2015
df5fdb4
Add tests for Int32.abs.
cbracken Feb 11, 2015
c9c62f7
Added Int32.clamp exception tests.
cbracken Feb 11, 2015
d44d73e
Add tests for Int32.numberOfLeadingZeros.
cbracken Feb 11, 2015
8405b42
Add tests for Int32.numberOfTrailingZeros.
cbracken Feb 11, 2015
377402a
Add tests for Int32.toBytes.
cbracken Feb 11, 2015
477060c
Add tests for Int32.parseInt.
cbracken Feb 11, 2015
aa8749d
Add tests for Int32.parseHex.
cbracken Feb 11, 2015
d2efd1d
Merge in changes from SDK branch
rakudrama Apr 21, 2016
ee40f97
Fix parameter types for compareTo().
munificent May 10, 2016
d659ba7
Migrate tests to using package test
keertip Jul 14, 2017
d3c525b
dartfmt
kevmoo Jul 18, 2017
86afd3f
Cleanup some lints
kevmoo Jul 18, 2017
39e26ea
cleanup throws uses
kevmoo Jul 18, 2017
4c9351b
Use correct name of analysis_options
kevmoo Jul 18, 2017
748df35
Merge pull request dart-lang/fixnum#24 from dart-lang/cleanup
rakudrama Jul 18, 2017
f6cd486
travis: migrated to dart_task and added dart2js testing (firefox) (da…
rakudrama Jul 18, 2017
d0d0dd0
Int64(int value) should not be sensitive to rounding errors (dart-lan…
rakudrama Jul 19, 2017
961caec
Fix SDK constraint (dart-lang/fixnum#29)
kevmoo Sep 21, 2017
ab44668
Fix dart-lang/fixnum#31: Make shifts work at width boundaries.
postmasters Jan 12, 2018
32bb09c
Make bitshifts work at bitwidth boundaries
cbracken Feb 6, 2018
e20672c
Version 0.10.7 (dart-lang/fixnum#34)
cbracken Feb 6, 2018
cf9b71f
Delete PATENTS
kevmoo Mar 16, 2018
1099fbd
Update .gitignore to new `dart_tool` pub cache (dart-lang/fixnum#40)
bcko Jul 10, 2018
ff72a6f
misc: small fix to changelog
kevmoo Jul 10, 2018
353ee48
fix: go Dart-2 only, update dependencies, update deprecated test usage
kevmoo Jul 10, 2018
f1e7a4f
test: move tests requiring the VM to their own test file
kevmoo Jul 10, 2018
56e875a
chore: set max SDK version to <3.0.0 (dart-lang/fixnum#43)
chalin Jul 18, 2018
ea85c72
Add toStringUnsigned() method (dart-lang/fixnum#44)
rakudrama Nov 7, 2018
0f00289
Enable and fix a number of lints (dart-lang/fixnum#45)
kevmoo Nov 7, 2018
c29132e
fix some more lints
kevmoo Nov 7, 2018
e6b93de
fix changelog
kevmoo Nov 7, 2018
c21470a
Update lints, test on oldest supported Dart SDK (dart-lang/fixnum#47)
kevmoo Apr 29, 2019
19af1aa
Delete codereview.settings
kevmoo Aug 1, 2019
6fc8bab
Fix outdated pub site URLs
kevmoo Aug 20, 2019
87cba38
Fix Int64._parseRadix (dart-lang/fixnum#49)
rakudrama Oct 7, 2019
4fb5a00
Update to pedantic 1.8.0, also no implicit casts (dart-lang/fixnum#50)
keertip Oct 10, 2019
dba55c7
Version 0.10.11
cbracken Oct 28, 2019
f315ad2
Address pedantic lints (dart-lang/fixnum#52)
rakudrama Dec 10, 2019
67692d5
readme pubspec cleanup
kevmoo Mar 26, 2020
aaf8cc0
remove lints duplicated by pedantic
kevmoo Mar 26, 2020
e3869f9
Merge null safety branch into master (dart-lang/fixnum#56)
jakemac53 Jun 10, 2020
6da6394
update for the 2.10 dev sdk (dart-lang/fixnum#62)
jakemac53 Jul 22, 2020
b5977a1
CI: Test on dev branch (dart-lang/fixnum#63)
kevmoo Jul 23, 2020
a1b6f4f
remove some unnecessary casts from tests (dart-lang/fixnum#65)
jakemac53 Aug 28, 2020
f6f57c0
expand the sdk constraint to allow the 2.11 dev sdk (dart-lang/fixnum…
jakemac53 Sep 29, 2020
ace8b3f
Support Dart 2.11 (dart-lang/fixnum#69)
kevmoo Nov 3, 2020
e9435be
update for the null safety dev sdk release and eventual stable (dart-…
jakemac53 Nov 10, 2020
868bc2c
remove redundant experiment (dart-lang/fixnum#71)
pq Nov 12, 2020
2246dcb
Migrate to GitHub Actions (dart-lang/fixnum#72)
athomas Jan 12, 2021
1e1ea3c
stable null safety release (dart-lang/fixnum#73)
jakemac53 Feb 5, 2021
fa7ecc1
Update LICENSE (dart-lang/fixnum#76)
franklinyow Apr 6, 2021
7cb79f1
Update test-package.yml (dart-lang/fixnum#77)
kevmoo Apr 29, 2021
60cdc19
Move from pedantic to lints package (dart-lang/fixnum#82)
natebosch Jul 27, 2021
14aa32d
Ignore deprecations for IntegerDivisionByZeroException
kevmoo Nov 4, 2021
6c82d8c
Enable and fix some lints
kevmoo Nov 4, 2021
0aa9989
Switch from homepage to repository in pubspec (dart-lang/fixnum#86)
devoncarew Apr 20, 2022
092b10a
prep for publishing 1.0.1 (dart-lang/fixnum#89)
devoncarew May 12, 2022
339a9f3
Remove old language version markers (dart-lang/fixnum#90)
mit-mit Jun 2, 2022
81987c1
Remove deprecated experimental invariant_booleans lint rule (dart-lan…
srawlins Jul 25, 2022
d147bb5
blast_repo fixes (dart-lang/fixnum#94)
devoncarew Nov 10, 2022
d00e06a
Add `tryParse` methods. (dart-lang/fixnum#96)
lrhn Nov 23, 2022
3fe3c3e
Split into separate libraries instead of using parts. (dart-lang/fixn…
lrhn Nov 24, 2022
e39009c
rev the sdk min to 2.19.0-0 (dart-lang/fixnum#99)
devoncarew Dec 8, 2022
783e06e
Change IntegerDivisionByZeroException to UnsupportedError (dart-lang/…
mit-mit Dec 8, 2022
97fa861
Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/fixnum#102)
dependabot[bot] Jan 3, 2023
b9d030b
Migrate from no-implicit-casts to strict-casts (dart-lang/fixnum#103)
srawlins Jan 10, 2023
14b3272
add a publish script; prep to publish 1.1.0 (dart-lang/fixnum#104)
devoncarew Jan 30, 2023
296435e
Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/fixnum#106)
dependabot[bot] Feb 1, 2023
95b1cf1
Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/fixnum#105)
dependabot[bot] Feb 1, 2023
e7bc391
Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/fixnum#109)
dependabot[bot] Apr 3, 2023
126c05a
Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/fixnum#108)
dependabot[bot] Apr 3, 2023
08dfaa5
Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/fixnum#111)
dependabot[bot] May 8, 2023
7affe57
blast_repo fixes (dart-lang/fixnum#112)
devoncarew May 17, 2023
9ed8f67
Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/fixnum#113)
dependabot[bot] Jul 1, 2023
fa5a88c
Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/fixnum#114)
dependabot[bot] Sep 1, 2023
50fffa7
Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/fixnum#115)
dependabot[bot] Oct 1, 2023
d3d8dae
Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/fixnum#116)
dependabot[bot] Oct 3, 2023
3b9fc65
Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/fixnum#121)
dependabot[bot] Nov 1, 2023
b122ef5
Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/fixnum#120)
dependabot[bot] Nov 1, 2023
2afb3a7
Update to latest lints and fix (dart-lang/fixnum#122)
kevmoo Nov 8, 2023
4b1e483
drop outdated lints (dart-lang/fixnum#123)
kevmoo Dec 4, 2023
15b4cfd
Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/fixnum#124)
dependabot[bot] Feb 1, 2024
d1e462c
Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/fixnum#125)
dependabot[bot] Apr 1, 2024
7478039
Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/fixnum#126)
dependabot[bot] May 1, 2024
e73b979
Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/fixnum#127)
dependabot[bot] May 1, 2024
f6b411b
blast_repo fixes (dart-lang/fixnum#128)
devoncarew May 6, 2024
7b1af9d
Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group…
dependabot[bot] Jun 1, 2024
50c7ea3
update lints (dart-lang/fixnum#131)
kevmoo Jun 27, 2024
88f9b4d
Bump the github-actions group with 2 updates (dart-lang/fixnum#132)
dependabot[bot] Jul 1, 2024
d1f7c10
Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group…
dependabot[bot] Oct 1, 2024
2c91ddb
Merge package:fixnum into the core monorepo
mosuem Oct 15, 2024
61de93e
Moving fixes
mosuem Oct 15, 2024
80b3466
Changes as per review
mosuem Oct 16, 2024
7dff384
Revert changes to package args
mosuem Oct 16, 2024
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
6 changes: 5 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Configuration for .github/workflows/pull_request_label.yaml.

"package-args":
"package:args":
- changed-files:
- any-glob-to-any-file: 'pkgs/args/**'

"package:fixnum":
- changed-files:
- any-glob-to-any-file: 'pkgs/fixnum/**'
73 changes: 73 additions & 0 deletions .github/workflows/fixnum.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: package:fixnum

on:
# Run CI on pushes to the main branch, and on PRs against main.
push:
branches: [ main ]
paths:
- '.github/workflows/fixnum.yaml'
- 'pkgs/fixnum/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/fixnum.yaml'
- 'pkgs/fixnum/**'
schedule:
- cron: "0 0 * * 0"
env:
PUB_ENVIRONMENT: bot.github

defaults:
run:
working-directory: pkgs/fixnum/

jobs:
# 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: [3.1.0, dev]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
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 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: [3.1.0, dev]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Run VM tests
run: dart test --platform vm
if: always() && steps.install.outcome == 'success'
- name: Run Chrome tests
run: dart test --platform chrome
if: always() && steps.install.outcome == 'success'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This repository is home to various Dart packages under the [dart.dev](https://pu
| Package | Description | Version |
|---|---|---|
| [args](pkgs/args/) | Library for defining parsers for parsing raw command-line arguments into a set of options and values. | [![pub package](https://img.shields.io/pub/v/args.svg)](https://pub.dev/packages/args) |
| [fixnum](pkgs/fixnum/) | Library for 32- and 64-bit signed fixed-width integers. | [![pub package](https://img.shields.io/pub/v/fixnum.svg)](https://pub.dev/packages/fixnum) |

## Publishing automation

Expand Down
3 changes: 3 additions & 0 deletions pkgs/fixnum/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.dart_tool/
.packages
pubspec.lock
9 changes: 9 additions & 0 deletions pkgs/fixnum/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Names should be added to this file with this pattern:
#
# For individuals:
# Name <email address>
#
# For organizations:
# Organization <fnmatch pattern>
#
Google Inc. <*@google.com>
69 changes: 69 additions & 0 deletions pkgs/fixnum/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## 1.1.1

* Require Dart `^3.1.0`
* Move to `dart-lang/core` monorepo.

## 1.1.0

* Add `tryParseRadix`, `tryParseInt` and `tryParseHex` static methods
to both `Int32` and `Int64`.
* Document exception and overflow behavior of parse functions,
and of `toHexString`.
* 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

* Switch to using `package:lints`.
* Populate the pubspec `repository` field.

## 1.0.0

* Stable null safety release.

## 1.0.0-nullsafety.0

* Migrate to null safety.
* This is meant to be mostly non-breaking, for opted in users runtime errors
will be promoted to static errors. For non-opted in users the runtime
errors are still present in their original form.

## 0.10.11

* Update minimum SDK constraint to version 2.1.1.

## 0.10.10

* Fix `Int64` parsing to throw `FormatException` on an empty string or single
minus sign. Previous incorrect behaviour was to throw a `RangeError` or
silently return zero.

## 0.10.9

* Add `Int64.toStringUnsigned()` and `Int64.toRadixStringUnsigned()` functions.

## 0.10.8

* Set SDK version constraint to `>=2.0.0-dev.65 <3.0.0`.

## 0.10.7

* Bug fix: Make bit shifts work at bitwidth boundaries. Previously,
`new Int64(3) << 64 == Int64(3)`. This ensures that the result is 0 in such
cases.
* Updated maximum SDK constraint from 2.0.0-dev.infinity to 2.0.0.

## 0.10.6

* Fix `Int64([int value])` constructor to avoid rounding error on intermediate
results for large negative inputs when compiled to JavaScript. `new
Int64(-1000000000000000000)` used to produce the same value as
`Int64.parseInt("-1000000000000000001")`

## 0.10.5

* Fix strong mode warning in overridden `compareTo()` methods.

*No changelog entries for previous versions...*
27 changes: 27 additions & 0 deletions pkgs/fixnum/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright 2014, the Dart project authors.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9 changes: 9 additions & 0 deletions pkgs/fixnum/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[![Dart CI](https://github.com/dart-lang/core/actions/workflows/fixnum.yaml/badge.svg)](https://github.com/dart-lang/core/actions/workflows/fixnum.yaml)
[![Pub](https://img.shields.io/pub/v/fixnum.svg)](https://pub.dev/packages/fixnum)
[![package publisher](https://img.shields.io/pub/publisher/fixnum.svg)](https://pub.dev/packages/fixnum/publisher)

A fixed-width 32- and 64- bit integer library for Dart.

Provides data types for signed 32- and 64-bit integers.
The integer implementations in this library are designed to work identically
whether executed on the Dart VM or compiled to JavaScript.
21 changes: 21 additions & 0 deletions pkgs/fixnum/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
include: package:dart_flutter_team_lints/analysis_options.yaml

analyzer:
language:
strict-casts: true

linter:
rules:
- avoid_private_typedef_functions
- avoid_unused_constructor_parameters
- cancel_subscriptions
- cascade_invocations
- join_return_with_assignment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_runtimeType_toString
- package_api_docs
- prefer_const_declarations
- prefer_expression_function_bodies
- unnecessary_raw_strings
- use_string_buffers
13 changes: 13 additions & 0 deletions pkgs/fixnum/lib/fixnum.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// Signed 32- and 64-bit integer support.
///
/// The integer implementations in this library are designed to work
/// identically whether executed on the Dart VM or compiled to JavaScript.
library;

export 'src/int32.dart';
export 'src/int64.dart';
export 'src/intx.dart';
Loading
Loading