Skip to content

Commit 3aac19a

Browse files
committed
Merge branch 'main' of github.com:sass/dart-sass into fix_operator_span
2 parents f6c2006 + 293200b commit 3aac19a

File tree

118 files changed

+10604
-636
lines changed

Some content is hidden

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

118 files changed

+10604
-636
lines changed

.github/util/initialize/action.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ inputs:
55
node-version: {required: false, default: 'lts/*'}
66
dart-sdk: {required: false, default: stable}
77
architecture: {required: false}
8+
for-npm-deploy: {required: false, default: false}
89
runs:
910
using: composite
1011
steps:
@@ -14,9 +15,22 @@ runs:
1415
architecture: "${{ inputs.architecture }}"
1516

1617
- uses: actions/setup-node@v6
18+
if: "inputs.for-npm-deploy != true"
1719
with:
1820
node-version: "${{ inputs.node-version }}"
1921

22+
- uses: actions/setup-node@v6
23+
if: inputs.for-npm-deploy == true
24+
with:
25+
node-version: "${{ inputs.node-version }}"
26+
check-latest: true
27+
registry-url: 'https://registry.npmjs.org'
28+
29+
# npm trusted publisher infrastructure requires npm >=11.5.1
30+
- run: npm install -g npm@latest
31+
if: inputs.for-npm-deploy == true
32+
shell: ${{ runner.os == 'Windows' && 'powershell' || 'bash' }}
33+
2034
# See: https://github.com/dart-lang/sdk/issues/52266
2135
- run: Invoke-WebRequest https://pub.dev
2236
if: runner.os == 'Windows'
@@ -45,7 +59,7 @@ runs:
4559
# downloading repo via GitHub API.
4660
- name: Check out the language repo
4761
if: github.event_name != 'pull_request'
48-
uses: actions/checkout@v5
62+
uses: actions/checkout@v6
4963
with: {repository: sass/sass, path: build/language}
5064

5165
- name: Generate Dart from protobuf

.github/workflows/build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
target: android-riscv64
5757

5858
steps:
59-
- uses: actions/checkout@v5
59+
- uses: actions/checkout@v6
6060

6161
- uses: ./.github/util/initialize
6262
with: {github-token: "${{ github.token }}"}
@@ -100,7 +100,7 @@ jobs:
100100
subject-path: build/*.tar.gz
101101

102102
- name: Upload Artifact
103-
uses: actions/upload-artifact@v4
103+
uses: actions/upload-artifact@v5
104104
with:
105105
name: build-${{ matrix.target }}
106106
path: build/*.tar.gz

.github/workflows/build-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runner: macos-latest
2525

2626
steps:
27-
- uses: actions/checkout@v5
27+
- uses: actions/checkout@v6
2828

2929
- uses: ./.github/util/initialize
3030
with: {github-token: "${{ github.token }}"}
@@ -39,7 +39,7 @@ jobs:
3939
subject-path: build/*.tar.gz
4040

4141
- name: Upload Artifact
42-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@v5
4343
with:
4444
name: build-macos-${{ matrix.arch }}
4545
path: build/*.tar.gz

.github/workflows/build-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runner: windows-11-arm
2525

2626
steps:
27-
- uses: actions/checkout@v5
27+
- uses: actions/checkout@v6
2828

2929
- uses: ./.github/util/initialize
3030
with: {github-token: "${{ github.token }}"}
@@ -39,7 +39,7 @@ jobs:
3939
subject-path: build/*.zip
4040

4141
- name: Upload Artifact
42-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@v5
4343
with:
4444
name: build-windows-${{ matrix.arch }}
4545
path: build/*.zip

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: "github.ref_type == 'tag' && github.event.repository.fork == false"
1919

2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2222
- uses: ./.github/util/initialize
2323
with: {github-token: "${{ github.token }}"}
2424

.github/workflows/release-sass-api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v6
2121
- uses: ./.github/util/initialize
2222
with: {github-token: "${{ github.token }}"}
2323

.github/workflows/release.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
needs: [build_linux, build_macos, build_windows]
3232

3333
steps:
34-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@v6
3535
- uses: ./.github/util/initialize
3636
with: {github-token: "${{ github.token }}"}
3737

@@ -51,7 +51,7 @@ jobs:
5151

5252
steps:
5353
- name: Download Artifact
54-
uses: actions/download-artifact@v5
54+
uses: actions/download-artifact@v6
5555

5656
- name: Release
5757
run: gh release upload ${{ github.ref_name }} build-*/* --repo ${{ github.repository }}
@@ -63,22 +63,23 @@ jobs:
6363
runs-on: ubuntu-latest
6464

6565
steps:
66-
- uses: actions/checkout@v5
66+
- uses: actions/checkout@v6
6767
- uses: ./.github/util/initialize
68-
with: {github-token: "${{ github.token }}"}
68+
with:
69+
github-token: ${{ github.token }}
70+
for-npm-deploy: true
6971

7072
- name: Deploy
7173
run: dart run grinder pkg-npm-deploy
7274
env:
7375
UPDATE_SASS_SASS_REPO: false
74-
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
7576

7677
deploy_pub:
7778
name: Deploy Pub
7879
runs-on: ubuntu-latest
7980

8081
steps:
81-
- uses: actions/checkout@v5
82+
- uses: actions/checkout@v6
8283
with:
8384
# We have to use this rather than the implicit GitHub token so that
8485
# pushing a new tag triggers another action.
@@ -104,7 +105,7 @@ jobs:
104105
runs-on: ubuntu-latest
105106

106107
steps:
107-
- uses: actions/checkout@v5
108+
- uses: actions/checkout@v6
108109
with:
109110
token: ${{ secrets.GH_TOKEN }}
110111
# Set up .npmrc file to publish to npm
@@ -113,11 +114,15 @@ jobs:
113114
node-version: 'lts/*'
114115
check-latest: true
115116
registry-url: 'https://registry.npmjs.org'
117+
118+
# npm trusted publisher infrastructure requires npm >=11.5.1
119+
- run: npm install -g npm@latest
120+
116121
- name: Get Dart Sass version
117122
id: dart-sass-version
118123
run: echo "version=${{ github.ref_name }}" | tee --append "$GITHUB_OUTPUT"
119124
- name: Check out the language repo
120-
uses: actions/checkout@v5
125+
uses: actions/checkout@v6
121126
with: {repository: sass/sass, path: build/language}
122127
- name: Copy types from the language repo
123128
run: cp -r build/language/js-api-doc pkg/sass-types/types
@@ -126,9 +131,7 @@ jobs:
126131
- name: Set the version of @sass/types
127132
run: npm pkg set version='${{ steps.dart-sass-version.outputs.version }}'
128133
working-directory: pkg/sass-types/
129-
- run: npm publish
130-
env:
131-
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
134+
- run: npm publish --provenance
132135
working-directory: pkg/sass-types/
133136

134137
deploy_sass_parser:
@@ -137,7 +140,7 @@ jobs:
137140
needs: [deploy_npm]
138141

139142
steps:
140-
- uses: actions/checkout@v5
143+
- uses: actions/checkout@v6
141144
with:
142145
token: ${{ secrets.GH_TOKEN }}
143146
# Set up .npmrc file to publish to npm
@@ -147,8 +150,8 @@ jobs:
147150
check-latest: true
148151
registry-url: 'https://registry.npmjs.org'
149152

150-
# The repo package has a file dependency, but the released version needs
151-
# a real dependency on the released version of Sass.
153+
# The repo package has a file dependency, but the released version needs a
154+
# real dependency on the released version of Sass.
152155
- name: Get Dart Sass version
153156
id: dart-sass-version
154157
run: echo "version=${{ github.ref_name }}" | tee --append "$GITHUB_OUTPUT"
@@ -157,9 +160,7 @@ jobs:
157160

158161
- run: npm run compile
159162
working-directory: pkg/sass-parser/
160-
- run: npm publish
161-
env:
162-
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
163+
- run: npm publish --provenance
163164
working-directory: pkg/sass-parser/
164165

165166
- name: Get Sass parser version
@@ -174,7 +175,7 @@ jobs:
174175
runs-on: ubuntu-latest
175176

176177
steps:
177-
- uses: actions/checkout@v5
178+
- uses: actions/checkout@v6
178179
- uses: dart-lang/setup-dart@v1
179180
- run: dart pub get
180181

@@ -189,7 +190,7 @@ jobs:
189190
runs-on: windows-latest
190191

191192
steps:
192-
- uses: actions/checkout@v5
193+
- uses: actions/checkout@v6
193194
- uses: ./.github/util/initialize
194195
with: {github-token: "${{ github.token }}"}
195196

@@ -203,7 +204,7 @@ jobs:
203204
needs: [deploy_npm]
204205

205206
steps:
206-
- uses: actions/checkout@v5
207+
- uses: actions/checkout@v6
207208
with:
208209
repository: sass/sass-site
209210
token: ${{ secrets.SASS_SITE_TOKEN }}
@@ -231,7 +232,7 @@ jobs:
231232
needs: [deploy_github]
232233

233234
steps:
234-
- uses: actions/checkout@v5
235+
- uses: actions/checkout@v6
235236
with:
236237
repository: sass/embedded-host-node
237238
token: ${{ secrets.GH_TOKEN }}

.github/workflows/test-vendor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
bootstrap_version: [4, 5]
1616

1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
- uses: ./.github/util/initialize
2020
with: {github-token: "${{ github.token }}"}
2121

@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030

3131
steps:
32-
- uses: actions/checkout@v5
32+
- uses: actions/checkout@v6
3333
- uses: ./.github/util/initialize
3434
with: {github-token: "${{ github.token }}"}
3535

@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-latest
4646

4747
steps:
48-
- uses: actions/checkout@v5
48+
- uses: actions/checkout@v6
4949
- uses: ./.github/util/initialize
5050
with: {github-token: "${{ github.token }}"}
5151

@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ubuntu-latest
6363

6464
steps:
65-
- uses: actions/checkout@v5
65+
- uses: actions/checkout@v6
6666
- uses: ./.github/util/initialize
6767
with: {github-token: "${{ github.token }}"}
6868

0 commit comments

Comments
 (0)