Skip to content

Commit a11bf72

Browse files
authored
Merge branch 'main' into merge-platform-package
2 parents 08428e8 + 010a343 commit a11bf72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+8828
-4
lines changed

.github/ISSUE_TEMPLATE/args.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:args"
3+
about: "Create a bug or file a feature request against package:args."
4+
labels: "package:args"
5+
---

.github/ISSUE_TEMPLATE/logging.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:logging"
3+
about: "Create a bug or file a feature request against package:logging."
4+
labels: "package:logging"
5+
---

.github/ISSUE_TEMPLATE/os_detect.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:os_detect"
3+
about: "Create a bug or file a feature request against package:os_detect."
4+
labels: "package:os_detect"
5+
---

.github/ISSUE_TEMPLATE/path.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:path"
3+
about: "Create a bug or file a feature request against package:path."
4+
labels: "package:path"
5+
---

.github/labeler.yml

+12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@
2424
- changed-files:
2525
- any-glob-to-any-file: 'pkgs/fixnum/**'
2626

27+
"package:logging":
28+
- changed-files:
29+
- any-glob-to-any-file: 'pkgs/logging/**'
30+
31+
"package:os_detect":
32+
- changed-files:
33+
- any-glob-to-any-file: 'pkgs/os_detect/**'
34+
35+
"package:path":
36+
- changed-files:
37+
- any-glob-to-any-file: 'pkgs/path/**'
38+
2739
"package:platform":
2840
- changed-files:
2941
- any-glob-to-any-file: 'pkgs/platform/**'

.github/workflows/logging.yaml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: package:logging
2+
3+
on:
4+
# Run CI on pushes to the main branch, and on PRs against main.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/logging.yaml'
9+
- 'pkgs/logging/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/logging.yaml'
14+
- 'pkgs/logging/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
env:
18+
PUB_ENVIRONMENT: bot.github
19+
20+
defaults:
21+
run:
22+
working-directory: pkgs/logging/
23+
24+
jobs:
25+
# Check code formatting and static analysis.
26+
analyze:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
sdk: [dev]
32+
steps:
33+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
34+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
35+
with:
36+
sdk: ${{ matrix.sdk }}
37+
- id: install
38+
name: Install dependencies
39+
run: dart pub get
40+
- name: Check formatting
41+
run: dart format --output=none --set-exit-if-changed .
42+
if: always() && steps.install.outcome == 'success'
43+
- name: Analyze code
44+
run: dart analyze --fatal-infos
45+
if: always() && steps.install.outcome == 'success'
46+
47+
# Run tests on a matrix of platforms and sdk versions.
48+
test:
49+
needs: analyze
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
# Add macos-latest and/or windows-latest if relevant for this package.
55+
os: [ubuntu-latest]
56+
sdk: [3.4, dev]
57+
steps:
58+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
59+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
60+
with:
61+
sdk: ${{ matrix.sdk }}
62+
- id: install
63+
name: Install dependencies
64+
run: dart pub get
65+
- name: Run VM tests
66+
run: dart test --platform vm
67+
if: always() && steps.install.outcome == 'success'
68+
- name: Run Chrome tests
69+
run: dart test --platform chrome
70+
if: always() && steps.install.outcome == 'success'

.github/workflows/os_detect.yaml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: package:os_detect
2+
3+
on:
4+
# Run CI on pushes to the main branch, and on PRs against main.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/os_detect.yaml'
9+
- 'pkgs/os_detect/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/os_detect.yaml'
14+
- 'pkgs/os_detect/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
env:
18+
PUB_ENVIRONMENT: bot.github
19+
20+
defaults:
21+
run:
22+
working-directory: pkgs/os_detect/
23+
24+
jobs:
25+
# Check code formatting and static analysis on a single OS (linux)
26+
# against Dart dev.
27+
analyze:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
sdk: [dev]
33+
steps:
34+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
35+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
- id: install
39+
name: Install dependencies
40+
run: dart pub get
41+
- name: Check formatting
42+
run: dart format --output=none --set-exit-if-changed .
43+
if: always() && steps.install.outcome == 'success'
44+
- name: Analyze code
45+
run: dart analyze --fatal-infos
46+
if: always() && steps.install.outcome == 'success'
47+
48+
# Run tests on a matrix consisting of two dimensions:
49+
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
50+
# 2. release channel: dev
51+
test:
52+
needs: analyze
53+
runs-on: ${{ matrix.os }}
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
# Add macos-latest and/or windows-latest if relevant for this package.
58+
os: [ubuntu-latest, windows-latest, macos-latest]
59+
sdk: [3.0.0, dev]
60+
steps:
61+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
62+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
63+
with:
64+
sdk: ${{ matrix.sdk }}
65+
- id: install
66+
name: Install dependencies
67+
run: dart pub get
68+
- name: Run VM tests
69+
run: dart test --platform vm
70+
if: always() && steps.install.outcome == 'success'
71+
- name: Run Chrome tests
72+
run: dart test --platform chrome
73+
if: always() && steps.install.outcome == 'success'

.github/workflows/path.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: package:path
2+
3+
on:
4+
# Run CI on pushes to the main branch, and on PRs against main.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/path.yaml'
9+
- 'pkgs/path/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/path.yaml'
14+
- 'pkgs/path/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
env:
18+
PUB_ENVIRONMENT: bot.github
19+
20+
defaults:
21+
run:
22+
working-directory: pkgs/path/
23+
24+
jobs:
25+
# Check code formatting and static analysis on a single OS (linux)
26+
# against Dart dev and stable.
27+
analyze:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
sdk: [dev]
33+
steps:
34+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
35+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
- id: install
39+
name: Install dependencies
40+
run: dart pub get
41+
- name: Check formatting
42+
run: dart format --output=none --set-exit-if-changed .
43+
if: always() && steps.install.outcome == 'success'
44+
- name: Analyze code
45+
run: dart analyze --fatal-infos
46+
if: always() && steps.install.outcome == 'success'
47+
48+
test:
49+
needs: analyze
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
matrix:
53+
os: [ubuntu-latest]
54+
sdk: [3.4, dev]
55+
steps:
56+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
57+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
58+
with:
59+
sdk: ${{ matrix.sdk }}
60+
- run: dart pub get
61+
- run: dart test --platform vm,chrome
62+
- name: Run Chrome tests - wasm
63+
run: dart test --platform chrome --compiler dart2wasm
64+
if: always() && steps.install.outcome == 'success'

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ new file please also add this. The year should be a single number stating the
3838
year the file was created (don't use a range like "2011-2012"). Additionally, if
3939
you edit an existing file, you shouldn't update the year.
4040

41-
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
41+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
4242
// for details. All rights reserved. Use of this source code is governed by a
4343
// BSD-style license that can be found in the LICENSE file.
4444

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

5050
We pledge to maintain an open and welcoming environment. For details, see our
51-
[code of conduct](https://dart.dev/code-of-conduct).
51+
[code of conduct](https://dart.dev/code-of-conduct).

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ This repository is home to various Dart packages under the [dart.dev](https://pu
1414
| [convert](pkgs/convert/) | Utilities for converting between data representations. | [![pub package](https://img.shields.io/pub/v/convert.svg)](https://pub.dev/packages/convert) |
1515
| [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) |
1616
| [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) |
17+
| [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) |
18+
| [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) |
19+
| [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) |
1720
| [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) |
1821

1922
## Publishing automation

pkgs/args/example/arg_parser/pubspec.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ name: arg_parser_example
66
version: 1.0.0
77
description: An example of using ArgParser
88
publish_to: 'none'
9+
910
environment:
10-
sdk: '>=2.14.0 <3.0.0'
11+
sdk: ^3.0.0
12+
1113
dependencies:
1214
args:
1315
path: ../..

pkgs/args/example/command_runner/pubspec.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ name: command_runner_example
66
version: 1.0.0
77
description: An example of using CommandRunner
88
publish_to: 'none'
9+
910
environment:
10-
sdk: '>=2.14.0 <3.0.0'
11+
sdk: ^3.0.0
12+
1113
dependencies:
1214
args:
1315
path: ../..

pkgs/logging/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.dart_tool
2+
.packages
3+
pubspec.lock

pkgs/logging/AUTHORS

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Names should be added to this file with this pattern:
2+
#
3+
# For individuals:
4+
# Name <email address>
5+
#
6+
# For organizations:
7+
# Organization <fnmatch pattern>
8+
#
9+
Google Inc. <*@google.com>
10+
Anton Astashov <[email protected]>

0 commit comments

Comments
 (0)