Skip to content

Commit

Permalink
Merge branch 'main' into feature.package-importer
Browse files Browse the repository at this point in the history
* main:
  add comment
  update actions
  Specify node versions a la sass/sass-spec#1957
  Work around recent breaking change in Node
  update package.json
  Test against Node20, remove Node14.
  Add semicolons and remove duplicate TS config
  • Loading branch information
jgerigmeyer committed Dec 15, 2023
2 parents 34298c4 + 7c0f559 commit 2417f0b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ defaults:

env:
PROTOC_VERSION: 3.x
DEFAULT_NODE_VERSION: 18.x # If changing this, also change jobs.tests.strategy.matrix.node_version

on:
push:
Expand All @@ -19,10 +18,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
node-version: 'lts/*'
check-latest: true

- name: Check out the language repo
Expand All @@ -43,12 +42,12 @@ jobs:
strategy:
matrix:
os: [ubuntu, macos, windows]
node-version: [18.x, 16.x, 14.x] # If changing this, also change env.DEFAULT_NODE_VERSION
node-version: ['lts/*', 'lts/-1', 'lts/-2']
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
check-latest: true
Expand All @@ -73,9 +72,6 @@ jobs:
- run: npm run compile
- run: node test/after-compile-test.mjs

# The versions should be kept up-to-date with the latest LTS Node releases.
# They next need to be rotated October 2021. See
# https://github.com/nodejs/Release.
sass_spec:
name: 'JS API Tests | Node ${{ matrix.node_version }} | ${{ matrix.os }}'
runs-on: ${{ matrix.os }}-latest
Expand All @@ -84,19 +80,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
node_version: [18]
node_version: ['lts/*']
include:
# Include LTS versions on Ubuntu
- os: ubuntu
node_version: 16
node_version: lts/-1
- os: ubuntu
node_version: 14
node_version: lts/-2

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with: {sdk: stable}
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with: {node-version: "${{ matrix.node_version }}"}

- name: Check out Dart Sass
Expand Down Expand Up @@ -144,10 +140,10 @@ jobs:
needs: [static_analysis, tests, sass_spec]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
node-version: 'lts/*'
check-latest: true
registry-url: 'https://registry.npmjs.org'
- run: npm install
Expand Down
2 changes: 2 additions & 0 deletions lib/src/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ describe('utils', () => {
describe('pathToUrlString', () => {
it('encode relative path like `pathToFileURL`', () => {
const baseURL = pathToFileURL('').toString();
// Skip charcodes 0-32 to work around Node trailing whitespace regression:
// https://github.com/nodejs/node/issues/51167
for (let i = 33; i < 128; i++) {
const char = String.fromCharCode(i);
const filename = `${i}-${char}`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dist/**/*"
],
"engines": {
"node": ">=14.0.0"
"node": ">=16.0.0"
},
"scripts": {
"init": "ts-node ./tool/init.ts",
Expand Down

0 comments on commit 2417f0b

Please sign in to comment.