Skip to content

Commit d885eea

Browse files
committed
Merge package:yaml into the tools monorepo
2 parents 5590447 + 185e519 commit d885eea

34 files changed

+7093
-0
lines changed

pkgs/yaml/.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Dependabot configuration file.
2+
# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates
3+
version: 2
4+
5+
updates:
6+
- package-ecosystem: github-actions
7+
directory: /
8+
schedule:
9+
interval: monthly
10+
labels:
11+
- autosubmit
12+
groups:
13+
github-actions:
14+
patterns:
15+
- "*"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# A workflow to close issues where the author hasn't responded to a request for
2+
# more information; see https://github.com/actions/stale.
3+
4+
name: No Response
5+
6+
# Run as a daily cron.
7+
on:
8+
schedule:
9+
# Every day at 8am
10+
- cron: '0 8 * * *'
11+
12+
# All permissions not specified are set to 'none'.
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
17+
jobs:
18+
no-response:
19+
runs-on: ubuntu-latest
20+
if: ${{ github.repository_owner == 'dart-lang' }}
21+
steps:
22+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e
23+
with:
24+
# Don't automatically mark inactive issues+PRs as stale.
25+
days-before-stale: -1
26+
# Close needs-info issues and PRs after 14 days of inactivity.
27+
days-before-close: 14
28+
stale-issue-label: "needs-info"
29+
close-issue-message: >
30+
Without additional information we're not able to resolve this issue.
31+
Feel free to add more info or respond to any questions above and we
32+
can reopen the case. Thanks for your contribution!
33+
stale-pr-label: "needs-info"
34+
close-pr-message: >
35+
Without additional information we're not able to resolve this PR.
36+
Feel free to add more info or respond to any questions above.
37+
Thanks for your contribution!
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# A CI configuration to auto-publish pub packages.
2+
3+
name: Publish
4+
5+
on:
6+
pull_request:
7+
branches: [ master ]
8+
push:
9+
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
10+
11+
jobs:
12+
publish:
13+
if: ${{ github.repository_owner == 'dart-lang' }}
14+
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
15+
permissions:
16+
id-token: write # Required for authentication using OIDC
17+
pull-requests: write # Required for writing the pull request note
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Dart CI
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
schedule:
10+
- cron: "0 0 * * 0"
11+
12+
env:
13+
PUB_ENVIRONMENT: bot.github
14+
15+
jobs:
16+
# Check code formatting and static analysis on a single OS (linux)
17+
# against Dart dev.
18+
analyze:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
sdk: [dev]
24+
steps:
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
26+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
27+
with:
28+
sdk: ${{ matrix.sdk }}
29+
- id: install
30+
name: Install dependencies
31+
run: dart pub get
32+
- name: Check formatting
33+
run: dart format --output=none --set-exit-if-changed .
34+
if: always() && steps.install.outcome == 'success'
35+
- name: Analyze code
36+
run: dart analyze --fatal-infos
37+
if: always() && steps.install.outcome == 'success'
38+
39+
# Run tests on a matrix consisting of two dimensions:
40+
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
41+
# 2. release channel: dev
42+
test:
43+
needs: analyze
44+
runs-on: ${{ matrix.os }}
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
# Add macos-latest and/or windows-latest if relevant for this package.
49+
os: [ubuntu-latest]
50+
sdk: [3.4, dev]
51+
steps:
52+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
53+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
54+
with:
55+
sdk: ${{ matrix.sdk }}
56+
- id: install
57+
name: Install dependencies
58+
run: dart pub get
59+
- name: Run VM tests
60+
run: dart test --platform vm
61+
if: always() && steps.install.outcome == 'success'
62+
- name: Run Chrome tests
63+
run: dart test --platform chrome
64+
if: always() && steps.install.outcome == 'success'

pkgs/yaml/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Don’t commit the following directories created by pub.
2+
.buildlog
3+
.dart_tool/
4+
.pub/
5+
build/
6+
packages
7+
.packages
8+
9+
# Or the files created by dart2js.
10+
*.dart.js
11+
*.js_
12+
*.js.deps
13+
*.js.map
14+
15+
# Include when developing application packages.
16+
pubspec.lock

pkgs/yaml/CHANGELOG.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
## 3.1.3-wip
2+
3+
* Require Dart 3.4
4+
* Fix UTF-16 surrogate pair handling in plain scaler.
5+
6+
## 3.1.2
7+
8+
* Require Dart 2.19
9+
* Added `topics` in `pubspec.yaml`.
10+
11+
## 3.1.1
12+
13+
* Switch to using package:lints.
14+
* Populate the pubspec `repository` field.
15+
16+
## 3.1.0
17+
18+
* `loadYaml` and related functions now accept a `recover` flag instructing the parser
19+
to attempt to recover from parse errors and may return invalid or synthetic nodes.
20+
When recovering, an `ErrorListener` can also be supplied to listen for errors that
21+
are recovered from.
22+
* Drop dependency on `package:charcode`.
23+
24+
## 3.0.0
25+
26+
* Stable null safety release.
27+
28+
## 3.0.0-nullsafety.0
29+
30+
* Updated to support 2.12.0 and null safety.
31+
* Allow `YamlNode`s to be wrapped with an optional `style` parameter.
32+
* **BREAKING** The `sourceUrl` named argument is statically typed as `Uri`
33+
instead of allowing `String` or `Uri`.
34+
35+
## 2.2.1
36+
37+
* Update min Dart SDK to `2.4.0`.
38+
* Fixed span for null nodes in block lists.
39+
40+
## 2.2.0
41+
42+
* POSSIBLY BREAKING CHANGE: Make `YamlMap` preserve parsed key order.
43+
This is breaking because some programs may rely on the
44+
`HashMap` sort order.
45+
46+
## 2.1.16
47+
48+
* Fixed deprecated API usage in README.
49+
* Fixed lints that affect package score.
50+
51+
## 2.1.15
52+
53+
* Set max SDK version to `<3.0.0`, and adjust other dependencies.
54+
55+
## 2.1.14
56+
57+
* Remove use of deprecated features.
58+
* Updated SDK version to 2.0.0-dev.17.0
59+
60+
## 2.1.13
61+
62+
* Stop using comment-based generic syntax.
63+
64+
## 2.1.12
65+
66+
* Properly refuse mappings with duplicate keys.
67+
68+
## 2.1.11
69+
70+
* Fix an infinite loop when parsing some invalid documents.
71+
72+
## 2.1.10
73+
74+
* Support `string_scanner` 1.0.0.
75+
76+
## 2.1.9
77+
78+
* Fix all strong-mode warnings.
79+
80+
## 2.1.8
81+
82+
* Remove the dependency on `path`, since we don't actually import it.
83+
84+
## 2.1.7
85+
86+
* Fix more strong mode warnings.
87+
88+
## 2.1.6
89+
90+
* Fix two analysis issues with DDC's strong mode.
91+
92+
## 2.1.5
93+
94+
* Fix a bug with 2.1.4 where source span information was being discarded for
95+
scalar values.
96+
97+
## 2.1.4
98+
99+
* Substantially improve performance.
100+
101+
## 2.1.3
102+
103+
* Add a hint that a colon might be missing when a mapping value is found in the
104+
wrong context.
105+
106+
## 2.1.2
107+
108+
* Fix a crashing bug when parsing block scalars.
109+
110+
## 2.1.1
111+
112+
* Properly scope `SourceSpan`s for scalar values surrounded by whitespace.
113+
114+
## 2.1.0
115+
116+
* Rewrite the parser for a 10x speed improvement.
117+
118+
* Support anchors and aliases (`&foo` and `*foo`).
119+
120+
* Support explicit tags (e.g. `!!str`). Note that user-defined tags are still
121+
not fully supported.
122+
123+
* `%YAML` and `%TAG` directives are now parsed, although again user-defined tags
124+
are not fully supported.
125+
126+
* `YamlScalar`, `YamlList`, and `YamlMap` now expose the styles in which they
127+
were written (for example plain vs folded, block vs flow).
128+
129+
* A `yamlWarningCallback` field is exposed. This field can be used to customize
130+
how YAML warnings are displayed.
131+
132+
## 2.0.1+1
133+
134+
* Fix an import in a test.
135+
136+
* Widen the version constraint on the `collection` package.
137+
138+
## 2.0.1
139+
140+
* Fix a few lingering references to the old `Span` class in documentation and
141+
tests.
142+
143+
## 2.0.0
144+
145+
* Switch from `source_maps`' `Span` class to `source_span`'s `SourceSpan` class.
146+
147+
* For consistency with `source_span` and `string_scanner`, all `sourceName`
148+
parameters have been renamed to `sourceUrl`. They now accept Urls as well as
149+
Strings.
150+
151+
## 1.1.1
152+
153+
* Fix broken type arguments that caused breakage on dart2js.
154+
155+
* Fix an analyzer warning in `yaml_node_wrapper.dart`.
156+
157+
## 1.1.0
158+
159+
* Add new publicly-accessible constructors for `YamlNode` subclasses. These
160+
constructors make it possible to use the same API to access non-YAML data as
161+
YAML data.
162+
163+
* Make `YamlException` inherit from source_map's `SpanFormatException`. This
164+
improves the error formatting and allows callers access to source range
165+
information.
166+
167+
## 1.0.0+1
168+
169+
* Fix a variable name typo.
170+
171+
## 1.0.0
172+
173+
* **Backwards incompatibility**: The data structures returned by `loadYaml` and
174+
`loadYamlStream` are now immutable.
175+
176+
* **Backwards incompatibility**: The interface of the `YamlMap` class has
177+
changed substantially in numerous ways. External users may no longer construct
178+
their own instances.
179+
180+
* Maps and lists returned by `loadYaml` and `loadYamlStream` now contain
181+
information about their source locations.
182+
183+
* A new `loadYamlNode` function returns the source location of top-level scalars
184+
as well.
185+
186+
## 0.10.0
187+
188+
* Improve error messages when a file fails to parse.
189+
190+
## 0.9.0+2
191+
192+
* Ensure that maps are order-independent when used as map keys.
193+
194+
## 0.9.0+1
195+
196+
* The `YamlMap` class is deprecated. In a future version, maps returned by
197+
`loadYaml` and `loadYamlStream` will be Dart `HashMap`s with a custom equality
198+
operation.

pkgs/yaml/LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2014, the Dart project authors.
2+
Copyright (c) 2006, Kirill Simonov.
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of
5+
this software and associated documentation files (the "Software"), to deal in
6+
the Software without restriction, including without limitation the rights to
7+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8+
of the Software, and to permit persons to whom the Software is furnished to do
9+
so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.

0 commit comments

Comments
 (0)