Skip to content

Commit

Permalink
Merge branch 'main' into merge-platform-package
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem authored Oct 17, 2024
2 parents 08428e8 + 010a343 commit a11bf72
Show file tree
Hide file tree
Showing 74 changed files with 8,828 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:args"
about: "Create a bug or file a feature request against package:args."
labels: "package:args"
---
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:logging"
about: "Create a bug or file a feature request against package:logging."
labels: "package:logging"
---
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/os_detect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:os_detect"
about: "Create a bug or file a feature request against package:os_detect."
labels: "package:os_detect"
---
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:path"
about: "Create a bug or file a feature request against package:path."
labels: "package:path"
---
12 changes: 12 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@
- changed-files:
- any-glob-to-any-file: 'pkgs/fixnum/**'

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

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

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

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

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

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

jobs:
# Check code formatting and static analysis.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [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 of platforms and sdk versions.
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.4, 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'
73 changes: 73 additions & 0 deletions .github/workflows/os_detect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: package:os_detect

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

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

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: [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, windows-latest, macos-latest]
sdk: [3.0.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'
64 changes: 64 additions & 0 deletions .github/workflows/path.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: package:path

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

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

jobs:
# Check code formatting and static analysis on a single OS (linux)
# against Dart dev and stable.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [dev]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- 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'

test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
sdk: [3.4, dev]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{ matrix.sdk }}
- run: dart pub get
- run: dart test --platform vm,chrome
- name: Run Chrome tests - wasm
run: dart test --platform chrome --compiler dart2wasm
if: always() && steps.install.outcome == 'success'
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ new file please also add this. The year should be a single number stating the
year the file was created (don't use a range like "2011-2012"). Additionally, if
you edit an existing file, you shouldn't update the year.

// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2024, 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.

Expand All @@ -48,4 +48,4 @@ This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).

We pledge to maintain an open and welcoming environment. For details, see our
[code of conduct](https://dart.dev/code-of-conduct).
[code of conduct](https://dart.dev/code-of-conduct).
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ This repository is home to various Dart packages under the [dart.dev](https://pu
| [convert](pkgs/convert/) | Utilities for converting between data representations. | [![pub package](https://img.shields.io/pub/v/convert.svg)](https://pub.dev/packages/convert) |
| [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) |
| [logging](pkgs/logging/) | Provides APIs for debugging and error logging. | [![pub package](https://img.shields.io/pub/v/logging.svg)](https://pub.dev/packages/logging) |
| [os_detect](pkgs/os_detect/) | Platform independent OS detection. | [![pub package](https://img.shields.io/pub/v/os_detect.svg)](https://pub.dev/packages/os_detect) |
| [path](pkgs/path/) | A string-based path manipulation library for all of the path operations you know and love. | [![pub package](https://img.shields.io/pub/v/path.svg)](https://pub.dev/packages/path) |
| [platform](pkgs/platform/) | A pluggable, mockable platform information abstraction for Dart. | [![pub package](https://img.shields.io/pub/v/platform.svg)](https://pub.dev/packages/platform) |

## Publishing automation
Expand Down
4 changes: 3 additions & 1 deletion pkgs/args/example/arg_parser/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ name: arg_parser_example
version: 1.0.0
description: An example of using ArgParser
publish_to: 'none'

environment:
sdk: '>=2.14.0 <3.0.0'
sdk: ^3.0.0

dependencies:
args:
path: ../..
4 changes: 3 additions & 1 deletion pkgs/args/example/command_runner/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ name: command_runner_example
version: 1.0.0
description: An example of using CommandRunner
publish_to: 'none'

environment:
sdk: '>=2.14.0 <3.0.0'
sdk: ^3.0.0

dependencies:
args:
path: ../..
3 changes: 3 additions & 0 deletions pkgs/logging/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.dart_tool
.packages
pubspec.lock
10 changes: 10 additions & 0 deletions pkgs/logging/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Names should be added to this file with this pattern:
#
# For individuals:
# Name <email address>
#
# For organizations:
# Organization <fnmatch pattern>
#
Google Inc. <*@google.com>
Anton Astashov <anton.astashov@gmail.com>
Loading

0 comments on commit a11bf72

Please sign in to comment.