Skip to content

Commit c81f252

Browse files
committed
Merge package:source_maps into the tools monorepo
2 parents faf2b86 + 217ca18 commit c81f252

26 files changed

+2945
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Dependabot configuration file.
2+
version: 2
3+
4+
updates:
5+
- package-ecosystem: github-actions
6+
directory: /
7+
schedule:
8+
interval: monthly
9+
labels:
10+
- autosubmit
11+
groups:
12+
github-actions:
13+
patterns:
14+
- "*"
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: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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.3.0, 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'

pkgs/source_maps/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.dart_tool/
2+
.packages
3+
.pub/
4+
pubspec.lock

pkgs/source_maps/CHANGELOG.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
## 0.10.13-wip
2+
3+
- Require Dart 3.3
4+
5+
## 0.10.12
6+
7+
* Add additional types at API boundaries.
8+
9+
## 0.10.11
10+
11+
* Populate the pubspec `repository` field.
12+
* Update the source map documentation link in the readme.
13+
14+
## 0.10.10
15+
16+
* Stable release for null safety.
17+
18+
## 0.10.9
19+
20+
* Fix a number of document comment issues.
21+
* Allow parsing source map files with a missing `names` field.
22+
23+
## 0.10.8
24+
25+
* Preserve source-map extensions in `SingleMapping`. Extensions are keys in the
26+
json map that start with `"x_"`.
27+
28+
## 0.10.7
29+
30+
* Set max SDK version to `<3.0.0`, and adjust other dependencies.
31+
32+
## 0.10.6
33+
34+
* Require version 2.0.0 of the Dart SDK.
35+
36+
## 0.10.5
37+
38+
* Add a `SingleMapping.files` field which provides access to `SourceFile`s
39+
representing the `"sourcesContent"` fields in the source map.
40+
41+
* Add an `includeSourceContents` flag to `SingleMapping.toJson()` which
42+
indicates whether to include source file contents in the source map.
43+
44+
## 0.10.4
45+
* Implement `highlight` in `SourceMapFileSpan`.
46+
* Require version `^1.3.0` of `source_span`.
47+
48+
## 0.10.3
49+
* Add `addMapping` and `containsMapping` members to `MappingBundle`.
50+
51+
## 0.10.2
52+
* Support for extended source map format.
53+
* Polish `MappingBundle.spanFor` handling of URIs that have a suffix that
54+
exactly match a source map in the MappingBundle.
55+
56+
## 0.10.1+5
57+
* Fix strong mode warning in test.
58+
59+
## 0.10.1+4
60+
61+
* Extend `MappingBundle.spanFor` to accept requests for output files that
62+
don't have source maps.
63+
64+
## 0.10.1+3
65+
66+
* Add `MappingBundle` class that handles extended source map format that
67+
supports source maps for multiple output files in a single mapper.
68+
Extend `Mapping.spanFor` API to accept a uri parameter that is optional
69+
for normal source maps but required for MappingBundle source maps.
70+
71+
## 0.10.1+2
72+
73+
* Fix more strong mode warnings.
74+
75+
## 0.10.1+1
76+
77+
* Fix all strong mode warnings.
78+
79+
## 0.10.1
80+
81+
* Add a `mapUrl` named argument to `parse` and `parseJson`. This argument is
82+
used to resolve source URLs for source spans.
83+
84+
## 0.10.0+2
85+
86+
* Fix analyzer error (FileSpan has a new field since `source_span` 1.1.1)
87+
88+
## 0.10.0+1
89+
90+
* Remove an unnecessary warning printed when the "file" field is missing from a
91+
Json formatted source map. This field is optional and its absence is not
92+
unusual.
93+
94+
## 0.10.0
95+
96+
* Remove the `Span`, `Location` and `SourceFile` classes. Use the
97+
corresponding `source_span` classes instead.
98+
99+
## 0.9.4
100+
101+
* Update `SpanFormatException` with `source` and `offset`.
102+
103+
* All methods that take `Span`s, `Location`s, and `SourceFile`s as inputs now
104+
also accept the corresponding `source_span` classes as well. Using the old
105+
classes is now deprecated and will be unsupported in version 0.10.0.
106+
107+
## 0.9.3
108+
109+
* Support writing SingleMapping objects to source map version 3 format.
110+
* Support the `sourceRoot` field in the SingleMapping class.
111+
* Support updating the `targetUrl` field in the SingleMapping class.
112+
113+
## 0.9.2+2
114+
115+
* Fix a bug in `FixedSpan.getLocationMessage`.
116+
117+
## 0.9.2+1
118+
119+
* Minor readability improvements to `FixedSpan.getLocationMessage` and
120+
`SpanException.toString`.
121+
122+
## 0.9.2
123+
124+
* Add `SpanException` and `SpanFormatException` classes.
125+
126+
## 0.9.1
127+
128+
* Support unmapped areas in source maps.
129+
130+
* Increase the readability of location messages.

pkgs/source_maps/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.

pkgs/source_maps/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[![Dart CI](https://github.com/dart-lang/source_maps/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/source_maps/actions/workflows/test-package.yml)
2+
[![pub package](https://img.shields.io/pub/v/source_maps.svg)](https://pub.dev/packages/source_maps)
3+
[![package publisher](https://img.shields.io/pub/publisher/source_maps.svg)](https://pub.dev/packages/source_maps/publisher)
4+
5+
This project implements a Dart pub package to work with source maps.
6+
7+
## Docs and usage
8+
9+
The implementation is based on the [source map version 3 spec][spec] which was
10+
originated from the [Closure Compiler][closure] and has been implemented in
11+
Chrome and Firefox.
12+
13+
In this package we provide:
14+
15+
* Data types defining file locations and spans: these are not part of the
16+
original source map specification. These data types are great for tracking
17+
source locations on source maps, but they can also be used by tools to
18+
reporting useful error messages that include on source locations.
19+
* A builder that creates a source map programmatically and produces the encoded
20+
source map format.
21+
* A parser that reads the source map format and provides APIs to read the
22+
mapping information.
23+
24+
[closure]: https://github.com/google/closure-compiler/wiki/Source-Maps
25+
[spec]: https://docs.google.com/a/google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include: package:dart_flutter_team_lints/analysis_options.yaml

0 commit comments

Comments
 (0)