Skip to content

Commit 600817a

Browse files
committed
Merge package:path into the core monorepo
2 parents 279afbc + 2098755 commit 600817a

35 files changed

+6336
-0
lines changed

pkgs/path/.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: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 and stable.
18+
analyze:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
sdk: [dev]
24+
steps:
25+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
26+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
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+
test:
40+
needs: analyze
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
matrix:
44+
os: [ubuntu-latest]
45+
sdk: [3.4, dev]
46+
steps:
47+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
48+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
49+
with:
50+
sdk: ${{ matrix.sdk }}
51+
- run: dart pub get
52+
- run: dart test --platform vm,chrome
53+
- name: Run Chrome tests - wasm
54+
run: dart test --platform chrome --compiler dart2wasm
55+
if: always() && steps.install.outcome == 'success'
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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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

pkgs/path/.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+
.pub/
4+
.dart_tool/
5+
.idea/
6+
build/
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/path/CHANGELOG.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
## 1.9.1-wip
2+
3+
- Require Dart 3.4
4+
5+
## 1.9.0
6+
7+
* Allow percent-encoded colons (`%3a`) in drive letters in `fromUri`.
8+
* Fixed an issue with the `split` method doc comment.
9+
* Require Dart 3.0
10+
11+
## 1.8.3
12+
13+
* Support up to 16 arguments in join function and up to 15 arguments in absolute function.
14+
15+
## 1.8.2
16+
17+
* Enable the `avoid_dynamic_calls` lint.
18+
* Populate the pubspec `repository` field.
19+
20+
## 1.8.1
21+
22+
* Don't crash when an empty string is passed to `toUri()`.
23+
24+
## 1.8.0
25+
26+
* Stable release for null safety.
27+
28+
## 1.8.0-nullsafety.3
29+
30+
* Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release
31+
guidelines.
32+
33+
## 1.8.0-nullsafety.2
34+
35+
* Allow prerelease versions of the 2.12 sdk.
36+
37+
## 1.8.0-nullsafety.1
38+
39+
* Allow 2.10 stable and 2.11.0 dev SDK versions.
40+
41+
## 1.8.0-nullsafety
42+
43+
* Migrate to null safety.
44+
45+
## 1.7.0
46+
47+
* Add support for multiple extension in `context.extension()`.
48+
49+
## 1.6.4
50+
51+
* Fixed a number of lints that affect the package health score.
52+
53+
* Added an example.
54+
55+
## 1.6.3
56+
57+
* Don't throw a FileSystemException from `current` if the working directory has
58+
been deleted, but we have a cached one we can use.
59+
60+
## 1.6.2
61+
62+
* Set max SDK version to `<3.0.0`, and adjust other dependencies.
63+
64+
## 1.6.1
65+
66+
* Drop the `retype` implementation for compatibility with the latest SDK.
67+
68+
## 1.6.0
69+
70+
* Add a `PathMap` class that uses path equality for its keys.
71+
72+
* Add a `PathSet` class that uses path equality for its contents.
73+
74+
## 1.5.1
75+
76+
* Fix a number of bugs that occurred when the current working directory was `/`
77+
on Linux or Mac OS.
78+
79+
## 1.5.0
80+
81+
* Add a `setExtension()` top-level function and `Context` method.
82+
83+
## 1.4.2
84+
85+
* Treat `package:` URLs as absolute.
86+
87+
* Normalize `c:\foo\.` to `c:\foo`.
88+
89+
## 1.4.1
90+
91+
* Root-relative URLs like `/foo` are now resolved relative to the drive letter
92+
for `file` URLs that begin with a Windows-style drive letter. This matches the
93+
[WHATWG URL specification][].
94+
95+
[WHATWG URL specification]: https://url.spec.whatwg.org/#file-slash-state
96+
97+
* When a root-relative URLs like `/foo` is converted to a Windows path using
98+
`fromUrl()`, it is now resolved relative to the drive letter. This matches
99+
IE's behavior.
100+
101+
## 1.4.0
102+
103+
* Add `equals()`, `hash()` and `canonicalize()` top-level functions and
104+
`Context` methods. These make it easier to treat paths as map keys.
105+
106+
* Properly compare Windows paths case-insensitively.
107+
108+
* Further improve the performance of `isWithin()`.
109+
110+
## 1.3.9
111+
112+
* Further improve the performance of `isWithin()` when paths contain `/.`
113+
sequences that aren't `/../`.
114+
115+
## 1.3.8
116+
117+
* Improve the performance of `isWithin()` when the paths don't contain
118+
asymmetrical `.` or `..` components.
119+
120+
* Improve the performance of `relative()` when `from` is `null` and the path is
121+
already relative.
122+
123+
* Improve the performance of `current` when the current directory hasn't
124+
changed.
125+
126+
## 1.3.7
127+
128+
* Improve the performance of `absolute()` and `normalize()`.
129+
130+
## 1.3.6
131+
132+
* Ensure that `path.toUri` preserves trailing slashes for relative paths.
133+
134+
## 1.3.5
135+
136+
* Added type annotations to top-level and static fields.
137+
138+
## 1.3.4
139+
140+
* Fix dev_compiler warnings.
141+
142+
## 1.3.3
143+
144+
* Performance improvement in `Context.relative` - don't call `current` if `from`
145+
is not relative.
146+
147+
## 1.3.2
148+
149+
* Fix some analyzer hints.
150+
151+
## 1.3.1
152+
153+
* Add a number of performance improvements.
154+
155+
## 1.3.0
156+
157+
* Expose a top-level `context` field that provides access to a `Context` object
158+
for the current system.
159+
160+
## 1.2.3
161+
162+
* Don't cache path Context based on cwd, as cwd involves a system-call to
163+
compute.
164+
165+
## 1.2.2
166+
167+
* Remove the documentation link from the pubspec so this is linked to
168+
pub.dev by default.
169+
170+
# 1.2.1
171+
172+
* Many members on `Style` that provided access to patterns and functions used
173+
internally for parsing paths have been deprecated.
174+
175+
* Manually parse paths (rather than using RegExps to do so) for better
176+
performance.
177+
178+
# 1.2.0
179+
180+
* Added `path.prettyUri`, which produces a human-readable representation of a
181+
URI.
182+
183+
# 1.1.0
184+
185+
* `path.fromUri` now accepts strings as well as `Uri` objects.

pkgs/path/LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright 2014, the Dart project authors.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided
12+
with the distribution.
13+
* Neither the name of Google LLC nor the names of its
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)