Skip to content

Commit

Permalink
Merge branch 'main' into merge-crypto-package
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem authored Oct 16, 2024
2 parents 2d5587c + 0240a52 commit 8fcbb73
Show file tree
Hide file tree
Showing 21 changed files with 3,529 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Configuration for .github/workflows/pull_request_label.yaml.

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

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

"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 @@ -10,6 +10,7 @@ This repository is home to various Dart packages under the [dart.dev](https://pu
|---|---|---|
| [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) |
| [crypto](pkgs/crypto/) | Implementations of SHA, MD5, and HMAC cryptographic functions. | [![pub package](https://img.shields.io/pub/v/crypto.svg)](https://pub.dev/packages/crypto) |
| [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
4 changes: 4 additions & 0 deletions pkgs/args/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.6.1-wip

* Fix the reporitory URL in `pubspec.yaml`.

## 2.6.0

* Added source argument when throwing a `ArgParserException`.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/args/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: args
version: 2.6.0
version: 2.6.1-wip
description: >-
Library for defining parsers for parsing raw command-line arguments into a set
of options and values using GNU and POSIX style options.
repository: https://github.com/dart-lang/core/main/pkgs/args
repository: https://github.com/dart-lang/core/tree/main/pkgs/args

topics:
- cli
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

0 comments on commit 8fcbb73

Please sign in to comment.