-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from dart-lang/merge-fixnum-package
Merge `package:fixnum`
- Loading branch information
Showing
19 changed files
with
3,523 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.dart_tool/ | ||
.packages | ||
pubspec.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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...* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
Oops, something went wrong.