-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: drop Node 4, 6, 8, 10, 12, 14 & 16 support
BREAKING CHANGE: Requires Node@^18.18.0 || ^20.9.0 || >=21.1.0
- Loading branch information
1 parent
67cc798
commit 045db2f
Showing
6 changed files
with
96 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [windows-2019] | ||
node-version: [18, 16, 14, 12, 10, 8, 6, 4] | ||
node-version: [22, 20, 18] | ||
configuration: [wsl, native] | ||
|
||
steps: | ||
|
@@ -30,80 +30,29 @@ jobs: | |
if: matrix.configuration == 'wsl' | ||
env: | ||
ESLINT_VERSION: 7 | ||
TRAVIS_NODE_VERSION: ${{ matrix.node-version }} | ||
run: | | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash | ||
export NVM_DIR="$HOME/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | ||
nvm install --latest-npm ${{ matrix.node-version }} | ||
if [ ${{ matrix.node-version }} -ge 4 ] && [ ${{ matrix.node-version }} -lt 6 ]; then | ||
npm install eslint@4 --no-save --ignore-scripts | ||
npm install | ||
npm install [email protected] --no-save | ||
npm uninstall @angular-eslint/template-parser @typescript-eslint/parser --no-save | ||
fi | ||
if [ ${{ matrix.node-version }} -ge 6 ] && [ ${{ matrix.node-version }} -lt 7 ]; then | ||
npm install eslint@5 --no-save --ignore-scripts | ||
npm install | ||
npm uninstall @angular-eslint/template-parser --no-save | ||
npm install [email protected] @typescript-eslint/parser@3 --no-save | ||
fi | ||
if [ ${{ matrix.node-version }} -ge 7 ] && [ ${{ matrix.node-version }} -lt 8 ]; then | ||
npm install eslint@6 --no-save --ignore-scripts | ||
npm install | ||
npm install [email protected] typescript-eslint-parser@20 --no-save | ||
npm uninstall @angular-eslint/template-parser --no-save | ||
fi | ||
if [ ${{ matrix.node-version }} -eq 8 ]; then | ||
npm install eslint@6 --no-save --ignore-scripts | ||
npm install | ||
npm uninstall @angular-eslint/template-parser --no-save | ||
npm install @typescript-eslint/parser@3 --no-save | ||
fi | ||
if [ ${{ matrix.node-version }} -gt 8 ] && [ ${{ matrix.node-version }} -lt 10 ]; then | ||
npm install eslint@7 --no-save --ignore-scripts | ||
npm install | ||
npm install @typescript-eslint/parser@3 --no-save | ||
fi | ||
if [ ${{ matrix.node-version }} -ge 10 ] && [ ${{ matrix.node-version }} -lt 12 ]; then | ||
npm install | ||
npm install @typescript-eslint/parser@4 --no-save | ||
fi | ||
if [ ${{ matrix.node-version }} -ge 12 ]; then | ||
npm install | ||
fi | ||
npm install | ||
npm run copy-metafiles | ||
npm run pretest | ||
npm run tests-only | ||
- name: install dependencies for node <= 10 | ||
if: matrix.node-version <= '10' && matrix.configuration == 'native' | ||
run: | | ||
npm install --legacy-peer-deps | ||
npm install eslint@7 --no-save | ||
- name: Install dependencies for node > 10 | ||
if: matrix.node-version > '10' && matrix.configuration == 'native' | ||
- name: Install dependencies in Native | ||
if: matrix.configuration == 'native' | ||
run: npm install | ||
|
||
- name: install the latest version of nyc | ||
- name: install the latest version of nyc in Native | ||
if: matrix.configuration == 'native' | ||
run: npm install nyc@latest --no-save | ||
|
||
- name: copy metafiles for node <= 8 | ||
if: matrix.node-version <= 8 && matrix.configuration == 'native' | ||
env: | ||
ESLINT_VERSION: 6 | ||
TRAVIS_NODE_VERSION: ${{ matrix.node-version }} | ||
run: | | ||
npm run copy-metafiles | ||
bash ./tests/dep-time-travel.sh 2>&1 | ||
- name: copy metafiles for Node > 8 | ||
if: matrix.node-version > 8 && matrix.configuration == 'native' | ||
- name: copy metafiles in Native | ||
if: matrix.configuration == 'native' | ||
env: | ||
ESLINT_VERSION: 7 | ||
TRAVIS_NODE_VERSION: ${{ matrix.node-version }} | ||
run: | | ||
npm run copy-metafiles | ||
bash ./tests/dep-time-travel.sh 2>&1 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: 'Tests: node.js' | ||
|
||
on: [pull_request, push] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
latest: ${{ steps.set-matrix.outputs.requireds }} | ||
minors: ${{ steps.set-matrix.outputs.optionals }} | ||
steps: | ||
- uses: ljharb/actions/node/matrix@main | ||
id: set-matrix | ||
with: | ||
versionsAsRoot: true | ||
type: majors | ||
preset: '^18.18.0 || ^20.9.0 || >=21.1.0' | ||
|
||
latest: | ||
needs: [matrix] | ||
name: 'majors' | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
node-version: ${{ fromJson(needs.matrix.outputs.latest) }} | ||
eslint: | ||
- 9 | ||
- 8 | ||
- 7 | ||
- 6 | ||
- 5 | ||
- 4 | ||
- 3 | ||
- 2 | ||
include: | ||
- node-version: 'lts/*' | ||
os: ubuntu-latest | ||
eslint: 7 | ||
env: | ||
TS_PARSER: 4 | ||
- node-version: 'lts/*' | ||
os: ubuntu-latest | ||
eslint: 7 | ||
env: | ||
TS_PARSER: 3 | ||
- node-version: 'lts/*' | ||
os: ubuntu-latest | ||
eslint: 7 | ||
env: | ||
TS_PARSER: 2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ljharb/actions/node/install@main | ||
continue-on-error: false | ||
name: 'nvm install ${{ matrix.node-version }} && npm install, with eslint ${{ matrix.eslint }}' | ||
env: | ||
NPM_CONFIG_LEGACY_PEER_DEPS: false | ||
ESLINT_VERSION: ${{ matrix.eslint }} | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
after_install: npm run copy-metafiles && ./tests/dep-time-travel.sh | ||
skip-ls-check: true | ||
- run: npm run pretest | ||
- run: npm run tests-only | ||
- uses: codecov/[email protected] | ||
|
||
node: | ||
name: 'node 18+' | ||
needs: [latest] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo tests completed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.