Skip to content

Commit fb7ba8f

Browse files
authored
Merge pull request #2307 from sass/merge
Merge main into feature.color-4
2 parents f1b51cd + 08fce97 commit fb7ba8f

Some content is hidden

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

73 files changed

+456
-140
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ updates:
55
schedule:
66
interval: "weekly"
77
- package-ecosystem: "github-actions"
8-
directory: "/"
8+
directories:
9+
- "/"
10+
- "/.github/util/*/"
911
schedule:
1012
interval: "weekly"

.github/util/initialize/action.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,38 @@ runs:
1717
with:
1818
node-version: "${{ inputs.node-version }}"
1919

20+
# See: https://github.com/dart-lang/sdk/issues/52266
21+
- run: Invoke-WebRequest https://pub.dev
22+
if: runner.os == 'Windows'
23+
shell: powershell
24+
25+
# See: https://github.com/orgs/community/discussions/131594
26+
# The composite action requires an explict shell, but bash is not available on windows-arm64 runner.
27+
# For the following commands conditionally use bash or powershell based on the runner.os:
2028
- run: dart pub get
21-
shell: bash
29+
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
2230

2331
- run: npm install
24-
shell: bash
32+
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
2533

26-
- uses: bufbuild/buf-setup-action@v1.30.0
34+
- uses: bufbuild/buf-setup-action@v1.35.1
2735
with: {github_token: "${{ inputs.github-token }}"}
2836

37+
# This composite action requires bash, but bash is not available on windows-arm64 runner.
38+
# Avoid running this composite action on non-PR, so that we can release on windows-arm64.
2939
- name: Check out the language repo
40+
if: github.event_name == 'pull_request'
3041
uses: sass/clone-linked-repo@v1
3142
with: {repo: sass/sass, path: build/language}
3243

44+
# Git is not pre-installed on windows-arm64 runner, however actions/checkout support
45+
# downloading repo via GitHub API.
46+
- name: Check out the language repo
47+
if: github.event_name != 'pull_request'
48+
uses: actions/checkout@v4
49+
with: {repository: sass/sass, path: build/language}
50+
3351
- name: Generate Dart from protobuf
3452
run: dart run grinder protobuf
3553
env: {UPDATE_SASS_SASS_REPO: false}
36-
shell: bash
54+
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}

.github/workflows/build-android.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,32 @@ jobs:
88
build:
99
name: Build
1010

11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.runner }}
1212

1313
strategy:
1414
fail-fast: false
1515
matrix:
1616
include:
1717
- arch: x64
1818
lib: lib64
19+
runner: ubuntu-latest
1920
platform: linux/amd64
2021
- arch: ia32
2122
lib: lib
23+
runner: ubuntu-latest
2224
platform: linux/amd64
2325
- arch: arm64
2426
lib: lib64
27+
runner: linux-arm64
2528
platform: linux/arm64
2629
- arch: arm
2730
lib: lib
31+
runner: linux-arm64
2832
platform: linux/arm64
2933
# There is no docker image for riscv64 dart-sdk, build kernel snapshot instead.
3034
- arch: riscv64
3135
lib: lib64
36+
runner: ubuntu-latest
3237
platform: linux/amd64 # linux/riscv64
3338

3439
steps:

.github/workflows/build-linux-musl.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ jobs:
88
build:
99
name: Build
1010

11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.runner }}
1212

1313
strategy:
1414
fail-fast: false
1515
matrix:
1616
include:
1717
- arch: x64
18+
runner: ubuntu-latest
1819
platform: linux/amd64
1920
- arch: ia32
20-
platform: linux/386
21+
runner: ubuntu-latest
22+
platform: linux/amd64
2123
- arch: arm64
24+
runner: linux-arm64
2225
platform: linux/arm64
23-
# There is a bug in qemu's mremap causing pthread_getattr_np in musl to stuck in a loop on arm.
24-
# Unless qemu fixes the bug or we get a real linux-arm runner, we cannot build aot-snapshot
25-
# for arm on CI. So, we create a kernel snapshot for arm build in amd64 container instead.
26-
# https://gitlab.com/qemu-project/qemu/-/issues/1729
2726
- arch: arm
28-
platform: linux/amd64 # linux/arm/v7
29-
# There is no docker image for riscv64 dart-sdk, build kernel snapshot instead.
27+
runner: linux-arm64
28+
platform: linux/arm/v7
3029
- arch: riscv64
31-
platform: linux/amd64 # linux/riscv64
30+
runner: ubuntu-latest
31+
platform: linux/riscv64
3232

3333
steps:
3434
- uses: actions/checkout@v4
@@ -51,7 +51,7 @@ jobs:
5151
- name: Build
5252
run: |
5353
docker run --rm -i \
54-
--platform ${{ matrix.arch == 'arm' && 'linux/amd64' || matrix.platform }} \
54+
--platform ${{ matrix.platform }} \
5555
--volume "$PWD:$PWD" \
5656
--workdir "$PWD" \
5757
ghcr.io/dart-musl/dart <<'EOF'

.github/workflows/build-linux.yml

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,27 @@ jobs:
88
build:
99
name: Build
1010

11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.runner }}
1212

1313
strategy:
1414
fail-fast: false
1515
matrix:
1616
include:
1717
- arch: x64
18+
runner: ubuntu-latest
1819
platform: linux/amd64
1920
- arch: ia32
21+
runner: ubuntu-latest
2022
platform: linux/amd64
21-
- arch: arm
22-
platform: linux/arm/v7
2323
- arch: arm64
24+
runner: linux-arm64
2425
platform: linux/arm64
25-
# There is no docker image for riscv64 dart-sdk, build kernel snapshot instead.
26-
# https://github.com/dart-lang/dart-docker/issues/96#issuecomment-1669860829
26+
- arch: arm
27+
runner: linux-arm64
28+
platform: linux/arm/v7
2729
- arch: riscv64
28-
platform: linux/amd64 # linux/riscv64
30+
runner: ubuntu-latest
31+
platform: linux/riscv64
2932

3033
steps:
3134
- uses: actions/checkout@v4
@@ -46,6 +49,7 @@ jobs:
4649
EOF
4750
4851
- name: Build
52+
if: matrix.arch != 'riscv64'
4953
run: |
5054
docker run --rm -i \
5155
--platform ${{ matrix.platform }} \
@@ -57,6 +61,35 @@ jobs:
5761
dart run grinder pkg-standalone-linux-${{ matrix.arch }}
5862
EOF
5963
64+
# https://github.com/dart-lang/dart-docker/issues/96#issuecomment-1669860829
65+
# There is no official riscv64 dart container image yet, build on debian:unstable instead.
66+
# The setup is adopted from: https://github.com/dart-lang/dart-docker/blob/main/Dockerfile-debian.template
67+
- name: Build riscv64
68+
if: matrix.arch == 'riscv64'
69+
run: |
70+
DART_CHANNEL=stable
71+
DART_VERSION=$(curl -fsSL https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/latest/VERSION | yq .version)
72+
curl -fsSLO https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/$DART_VERSION/sdk/dartsdk-linux-${{ matrix.arch }}-release.zip
73+
74+
docker run --rm -i \
75+
--platform ${{ matrix.platform }} \
76+
--volume "$PWD:$PWD" \
77+
--workdir "$PWD" \
78+
docker.io/library/debian:unstable-slim <<'EOF'
79+
set -e
80+
apt-get update
81+
apt-get install -y --no-install-recommends ca-certificates curl dnsutils git openssh-client unzip
82+
83+
export DART_SDK=/usr/lib/dart
84+
export PATH=$DART_SDK/bin:/root/.pub-cache/bin:$PATH
85+
86+
SDK="dartsdk-linux-${{ matrix.arch }}-release.zip"
87+
unzip "$SDK" && mv dart-sdk "$DART_SDK" && rm "$SDK"
88+
89+
dart pub get
90+
dart run grinder pkg-standalone-linux-${{ matrix.arch }}
91+
EOF
92+
6093
- name: Upload Artifact
6194
uses: actions/upload-artifact@v4
6295
with:

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- arch: x64
1818
runner: macos-13
1919
- arch: arm64
20-
runner: macos-14
20+
runner: macos-latest
2121

2222
steps:
2323
- uses: actions/checkout@v4

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- arch: ia32
2020
runner: windows-latest
2121
- arch: arm64
22-
runner: windows-latest
22+
runner: windows-arm64
2323

2424
steps:
2525
- uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 1.78.0
1+
## 1.79.0
22

33
* **Breaking change**: Passing a number with unit `%` to the `$alpha` parameter
44
of `color.change()`, `color.adjust()`, `change-color()`, and `adjust-color()`
@@ -188,6 +188,58 @@
188188

189189
* Remove `RgbColor`, `HslColor` and `HwbColor` SassScript values.
190190

191+
## 1.78.0
192+
193+
### Embedded Sass
194+
195+
* Explicitly expose a `sass` executable from the `sass-embedded` npm package.
196+
This was intended to be included in 1.63.0, but due to the way
197+
platform-specific dependency executables are installed it did not work as
198+
intended. Now users can run `npx sass` for local installs or just `sass` when
199+
`sass-embedded` is installed globally.
200+
201+
* Add linux-riscv64, linux-musl-riscv64, and android-riscv64 support for the
202+
`sass-embedded` npm package.
203+
204+
* Fix an edge case where the Dart VM could hang when shutting down when requests
205+
were in flight.
206+
207+
## 1.77.8
208+
209+
* No user-visible changes.
210+
211+
## 1.77.7
212+
213+
* Declarations that appear after nested rules are deprecated, because the
214+
semantics Sass has historically used are different from the semantics
215+
specified by CSS. In the future, Sass will adopt the standard CSS semantics.
216+
217+
See [the Sass website](https://sass-lang.com/d/mixed-decls) for details.
218+
219+
* **Potentially breaking bug fix:** `//` in certain places such as unknown
220+
at-rule values was being preserved in the CSS output, leading to potentially
221+
invalid CSS. It's now properly parsed as a silent comment and omitted from the
222+
CSS output.
223+
224+
## 1.77.6
225+
226+
* Fix a few cases where comments and occasionally even whitespace wasn't allowed
227+
between the end of Sass statements and the following semicolon.
228+
229+
## 1.77.5
230+
231+
* Fully trim redundant selectors generated by `@extend`.
232+
233+
## 1.77.4
234+
235+
### Embedded Sass
236+
237+
* Support passing `Version` input for `fatalDeprecations` as string over
238+
embedded protocol.
239+
240+
* Fix a bug in the JS Embedded Host where `Version` could be incorrectly accepted
241+
as input for `silenceDeprecations` and `futureDeprecations` in pure JS.
242+
191243
## 1.77.3
192244

193245
### Dart API

analysis/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ homepage: https://github.com/sass/dart-sass/tree/master/analysis
66
publish_to: none
77

88
environment:
9-
sdk: ">=2.17.0 <3.0.0"
9+
sdk: ">=3.0.0 <4.0.0"
1010

1111
dependencies:
12-
lints: ^2.0.0
12+
lints: ^4.0.0

lib/src/ast/selector/compound.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ final class CompoundSelector extends Selector {
4242
SimpleSelector? get singleSimple =>
4343
components.length == 1 ? components.first : null;
4444

45+
/// Whether any simple selector in this contains a selector that requires
46+
/// complex non-local reasoning to determine whether it's a super- or
47+
/// sub-selector.
48+
///
49+
/// This includes both pseudo-elements and pseudo-selectors that take
50+
/// selectors as arguments.
51+
///
52+
/// #nodoc
53+
@internal
54+
late final bool hasComplicatedSuperselectorSemantics = components
55+
.any((component) => component.hasComplicatedSuperselectorSemantics);
56+
4557
CompoundSelector(Iterable<SimpleSelector> components, super.span)
4658
: components = List.unmodifiable(components) {
4759
if (this.components.isEmpty) {

0 commit comments

Comments
 (0)