Skip to content

Commit fdf31ad

Browse files
authored
Merge pull request #2529 from sass/merge-main
Merge origin/main into feature.v2
2 parents c0359d6 + c8ef31c commit fdf31ad

File tree

418 files changed

+39389
-13250
lines changed

Some content is hidden

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

418 files changed

+39389
-13250
lines changed

.github/util/initialize/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
- run: npm install
3232
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
3333

34-
- uses: bufbuild/buf-setup-action@v1.46.0
34+
- uses: bufbuild/buf-setup-action@v1.50.0
3535
with: {github_token: "${{ inputs.github-token }}"}
3636

3737
# This composite action requires bash, but bash is not available on windows-arm64 runner.

.github/workflows/build-linux.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- image: docker.io/library/dart
2727
platform: linux/arm/v7
2828
target: linux-arm
29-
- image: docker.io/library/debian:unstable-slim
29+
- image: docker.io/library/debian:trixie-slim
3030
platform: linux/riscv64
3131
target: linux-riscv64
3232
- image: ghcr.io/dart-musl/dart
@@ -70,7 +70,7 @@ jobs:
7070
run: docker run --privileged --rm registry.fedoraproject.org/fedora-minimal /bin/sh -c "microdnf install --assumeyes --nodocs --setopt=install_weak_deps=False qemu-user-static systemd-udev && mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc && /usr/lib/systemd/systemd-binfmt --unregister && /usr/lib/systemd/systemd-binfmt"
7171

7272
- name: Build
73-
if: matrix.image != 'ghcr.io/dart-android/dart' && matrix.image != 'docker.io/library/debian:unstable-slim'
73+
if: matrix.image != 'ghcr.io/dart-android/dart' && matrix.image != 'docker.io/library/debian:trixie-slim'
7474
run: |
7575
docker run --rm -i \
7676
--platform ${{ matrix.platform }} \
@@ -92,17 +92,17 @@ jobs:
9292
--workdir "$PWD" \
9393
${{ matrix.image }} <<'EOF'
9494
set -e
95-
export DART_SDK=/system/${{ endsWith(matrix.target, '64') && 'lib64' || 'lib' }}/dart
95+
export DART_SDK=/system/${{ matrix.target != 'android-arm' && 'lib64' || 'lib' }}/dart
9696
export PATH=$DART_SDK/bin:$PATH
9797
dart pub get
9898
dart run grinder pkg-standalone-${{ matrix.target }}
9999
EOF
100100
101101
# https://github.com/dart-lang/dart-docker/issues/96#issuecomment-1669860829
102-
# There is no official riscv64 dart container image yet, build on debian:unstable instead.
102+
# There is no official riscv64 dart container image yet, build on debian:trixie instead.
103103
# The setup is adopted from: https://github.com/dart-lang/dart-docker/blob/main/Dockerfile-debian.template
104104
- name: Build
105-
if: matrix.image == 'docker.io/library/debian:unstable-slim'
105+
if: matrix.image == 'docker.io/library/debian:trixie-slim'
106106
run: |
107107
DART_CHANNEL=stable
108108
DART_VERSION=$(curl -fsSL https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/latest/VERSION | yq .version)
@@ -115,7 +115,7 @@ jobs:
115115
${{ matrix.image }} <<'EOF'
116116
set -e
117117
apt-get update
118-
apt-get install -y --no-install-recommends ca-certificates curl dnsutils git openssh-client unzip
118+
apt-get install -y --no-install-recommends bind9-dnsutils ca-certificates curl git openssh-client unzip
119119
120120
export DART_SDK=/usr/lib/dart
121121
export PATH=$DART_SDK/bin:/root/.pub-cache/bin:$PATH

.github/workflows/release.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,24 @@ jobs:
129129

130130
# The repo package has a file dependency, but the released version needs
131131
# a real dependency on the released version of Sass.
132-
- run: npm install sass@${{ steps.version.outputs.version }}
132+
- name: Get Dart Sass version
133+
id: dart-sass-version
134+
run: echo "version=${GITHUB_REF##*/}" | tee --append "$GITHUB_OUTPUT"
135+
- run: npm install sass@${{ steps.dart-sass-version.outputs.version }}
133136
working-directory: pkg/sass-parser/
134137

138+
- run: npm run compile
139+
working-directory: pkg/sass-parser/
135140
- run: npm publish
136141
env:
137142
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
138143
working-directory: pkg/sass-parser/
139144

140-
- name: Get version
141-
id: version
145+
- name: Get Sass parser version
146+
id: sass-parser-version
142147
run: |
143148
echo "version=$(jq .version pkg/sass-parser/package.json)" | tee --append "$GITHUB_OUTPUT"
144-
- run: git tag sass-parser/${{ steps.version.outputs.version }}
149+
- run: git tag sass-parser/${{ steps.sass-parser-version.outputs.version }}
145150
- run: git push --tag
146151

147152
deploy_homebrew:

.github/workflows/test.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: dart-lang/setup-dart@v1
18-
- run: dart format --fix .
17+
- uses: ./.github/util/initialize
18+
with: {github-token: "${{ github.token }}"}
19+
- run: dart format .
20+
- run: dart fix --apply
1921
- run: git diff --exit-code
2022

2123
static_analysis:

CHANGELOG.md

+95
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,101 @@
44
parsing associated with it. It is now parsed like any other unknown plain CSS
55
at-rule, where Sass features are only allowed within `#{}` interpolation.
66

7+
## 1.85.2-dev
8+
9+
* No user-visible changes.
10+
11+
## 1.85.1
12+
13+
* Fix a bug where global Sass functions whose names overlap with CSS math
14+
functions could incorrectly be treated as CSS math functions even though they
15+
used Sass-only features, causing compilation failures. For example,
16+
`round(-$var / 2)` previously threw an error but now works as intended.
17+
18+
## 1.85.0
19+
20+
* No longer fully trim redundant selectors generated by `@extend`. This caused
21+
unacceptable performance issues for certain heavy users of `@extend`. We'll
22+
try to find a more performant way to accomplish it in the future.
23+
24+
## 1.84.0
25+
26+
* Allow newlines in whitespace in the indented syntax.
27+
28+
* **Potentially breaking bug fix**: Selectors with unmatched brackets now always
29+
produce a parser error. Previously, some edge cases like `[foo#{"]:is(bar"}) {a:
30+
b}` would compile without error, but this was an unintentional bug.
31+
32+
* Fix a bug in which various Color Level 4 functions weren't allowed in plain
33+
CSS.
34+
35+
* Fix the error message for `@extend` without a selector and possibly other
36+
parsing edge-cases in contexts that allow interpolation.
37+
38+
### Embedded Host
39+
40+
* Fixed the implementation of the `SassBoolean` type to adhere to the spec,
41+
now using a class instead of an interface.
42+
43+
## 1.83.4
44+
45+
* No user-visible changes.
46+
47+
## 1.83.3
48+
49+
* No user-visible changes.
50+
51+
## 1.83.2
52+
53+
* Properly display deprecation IDs for the JS Sass API.
54+
55+
* Don't display deprecation IDs for user-defined deprecations.
56+
57+
## 1.83.1
58+
59+
* Fix a bug where `--quiet-deps` would get deactivated for `@content` blocks,
60+
even when those blocks were entirely contained within dependencies.
61+
62+
* Include deprecation IDs in deprecation warnings to make it easier to determine
63+
what to pass to `--silence-deprecation` or `--fatal-deprecation`.
64+
65+
## 1.83.0
66+
67+
* Allow trailing commas in *all* argument and parameter lists.
68+
69+
## 1.82.0
70+
71+
### Command-Line Interface
72+
73+
* Improve `--watch` mode reliability when making multiple changes at once, such
74+
as checking out a different Git branch.
75+
76+
* Parse the `calc-size()` function as a calculation now that it's supported in
77+
some browsers.
78+
79+
### Dart API
80+
81+
* Add a `SassCalculation.calcSize()` function.
82+
83+
## 1.81.1
84+
85+
* No user-visible changes.
86+
87+
## 1.81.0
88+
89+
* Fix a few cases where deprecation warnings weren't being emitted for global
90+
built-in functions whose names overlap with CSS calculations.
91+
92+
* Add support for the CSS `round()` calculation with a single argument, as long
93+
as that argument might be a unitless number.
94+
95+
## 1.80.7
96+
97+
### Embedded Host
98+
99+
* Don't treat `0` as `undefined` for the `green` and `blue` channels in the
100+
`LegacyColor` constructor.
101+
7102
## 1.80.6
8103

9104
### Command-Line Interface

bin/sass.dart

+20-9
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,29 @@ Future<void> main(List<String> args) async {
4949
options.futureDeprecations;
5050
options.fatalDeprecations;
5151

52-
var graph = StylesheetGraph(ImportCache(
52+
var graph = StylesheetGraph(
53+
ImportCache(
5354
importers: [...options.pkgImporters, FilesystemImporter.noLoadPath],
54-
loadPaths: options.loadPaths));
55+
loadPaths: options.loadPaths,
56+
),
57+
);
5558
if (options.watch) {
5659
await watch(options, graph);
5760
return;
5861
}
5962

60-
await compileStylesheets(options, graph, options.sourcesToDestinations,
61-
ifModified: options.update);
63+
await compileStylesheets(
64+
options,
65+
graph,
66+
options.sourcesToDestinations,
67+
ifModified: options.update,
68+
);
6269
} on UsageException catch (error) {
6370
print("${error.message}\n");
64-
print("Usage: sass <input.scss> [output.css]\n"
65-
" sass <input.scss>:<output.css> <input/>:<output/> <dir/>\n");
71+
print(
72+
"Usage: sass <input.scss> [output.css]\n"
73+
" sass <input.scss>:<output.css> <input/>:<output/> <dir/>\n",
74+
);
6675
print(ExecutableOptions.usage);
6776
exitCode = 64;
6877
} catch (error, stackTrace) {
@@ -75,7 +84,8 @@ Future<void> main(List<String> args) async {
7584
buffer.writeln();
7685
buffer.writeln();
7786
buffer.write(
78-
Trace.from(getTrace(error) ?? stackTrace).terse.toString().trimRight());
87+
Trace.from(getTrace(error) ?? stackTrace).terse.toString().trimRight(),
88+
);
7989
printError(buffer);
8090
exitCode = 255;
8191
}
@@ -92,8 +102,9 @@ Future<String> _loadVersion() async {
92102
return version;
93103
}
94104

95-
var libDir =
96-
p.fromUri(await Isolate.resolvePackageUri(Uri.parse('package:sass/')));
105+
var libDir = p.fromUri(
106+
await Isolate.resolvePackageUri(Uri.parse('package:sass/')),
107+
);
97108
var pubspec = readFile(p.join(libDir, '..', 'pubspec.yaml'));
98109
return pubspec
99110
.split("\n")

0 commit comments

Comments
 (0)