Skip to content

Commit

Permalink
feat: added support for node 18 (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
natterstefan committed Oct 26, 2022
1 parent 9c02490 commit 6f00e73
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 28 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
validate:
strategy:
matrix:
version: [14, 16]
version: [14, 16, 18]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- uses: actions/setup-node@v3
- uses: actions/setup-node@16352bb09bc672a073e326c2cc1d3d7d2a3e577e
with:
node-version: ${{ matrix.version }}
cache: "yarn"

- uses: bahmutov/npm-install@4f2c2de39846f27e0034cb0f2485a8212ed1edfa
- uses: bahmutov/npm-install@4a274d026feb3c5c4273ac7bbe74c90a7e07cd08
with:
install-command:
yarn --prefer-offline --frozen-lockfile --no-progress --silent
--ignore-engines

- run: yarn lint
- run: yarn test
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ on:
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
runs-on: ubuntu-latest
steps:
# Please look up the latest version from
# https://github.com/amannn/action-semantic-pull-request/releases
- uses: amannn/action-semantic-pull-request@v4.6.0
- uses: amannn/action-semantic-pull-request@01d5fd8a8ebb9aafe902c40c53f0f4744f7381eb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the new tag
uses: actions/checkout@v3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
fetch-depth: 0

- name: This release will publish the following packages
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
Expand All @@ -46,7 +47,7 @@ jobs:
outputs:
branch: ${{ steps.push.outputs.branch }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
fetch-depth: 0

Expand All @@ -55,12 +56,12 @@ jobs:
git config user.name "natterstefan Bot"
git config user.email "natterstefan-bot@users.noreply.github.com"
- uses: actions/setup-node@v3
- uses: actions/setup-node@16352bb09bc672a073e326c2cc1d3d7d2a3e577e
with:
node-version: 16
cache: "yarn"

- uses: bahmutov/npm-install@4f2c2de39846f27e0034cb0f2485a8212ed1edfa
- uses: bahmutov/npm-install@4a274d026feb3c5c4273ac7bbe74c90a7e07cd08
with:
install-command:
yarn --prefer-offline --frozen-lockfile --no-progress --silent
Expand All @@ -86,20 +87,20 @@ jobs:
always() &&
(needs.git-version.result == 'success' || needs.git-version.result == 'skipped')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
fetch-depth: 0

- name: Checkout the temporary branch
if: needs.git-version.result == 'success'
run: git checkout ${{ needs.git-version.outputs.branch }}

- uses: actions/setup-node@v3
- uses: actions/setup-node@16352bb09bc672a073e326c2cc1d3d7d2a3e577e
with:
node-version: 16
cache: "yarn"

- uses: bahmutov/npm-install@4f2c2de39846f27e0034cb0f2485a8212ed1edfa
- uses: bahmutov/npm-install@4a274d026feb3c5c4273ac7bbe74c90a7e07cd08
with:
install-command:
yarn --prefer-offline --frozen-lockfile --no-progress --silent
Expand All @@ -124,13 +125,13 @@ jobs:
changelog: ${{ steps.changelog.outputs.changelog }}
version: ${{ steps.tags.outputs.new }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
fetch-depth: 0

- name: Check if releasing from main
id: is-main
uses: babel/actions/ref-matches-branch@v2
uses: babel/actions/ref-matches-branch@03731d9c1d1b0d3e4609a78151679cf3de51f665
with:
name: main

Expand All @@ -140,20 +141,20 @@ jobs:

- name: Get tag info
id: tags
uses: babel/actions/get-release-tags@v2
uses: babel/actions/get-release-tags@03731d9c1d1b0d3e4609a78151679cf3de51f665

- name: Generate the changelog
id: changelog
# alternative: https://github.com/riskledger/generate-changelog/blob/9708d3db7d3bb62ce90bff6352b32e3edbac59c7/main.js
uses: babel/actions/generate-lerna-changelog@v2
uses: babel/actions/generate-lerna-changelog@03731d9c1d1b0d3e4609a78151679cf3de51f665
with:
from: ${{ steps.tags.outputs.old }}
to: ${{ steps.tags.outputs.new }}
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}

- name: Create a draft GitHub release
uses: babel/actions/publish-github-release@v2
uses: babel/actions/publish-github-release@03731d9c1d1b0d3e4609a78151679cf3de51f665
with:
tag: ${{ steps.tags.outputs.new }}
changelog: ${{ steps.changelog.outputs.changelog }}
Expand All @@ -172,7 +173,7 @@ jobs:
needs.github-release.result == 'success' &&
needs.github-release.outputs.is-main
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
fetch-depth: 0

Expand All @@ -186,7 +187,7 @@ jobs:
git config user.email "natterstefan-bot@users.noreply.github.com"
- name: Update CHANGELOG.md
uses: babel/actions/update-changelog@v2
uses: babel/actions/update-changelog@03731d9c1d1b0d3e4609a78151679cf3de51f665
with:
changelog: ${{ needs.github-release.outputs.changelog }}

Expand Down
2 changes: 1 addition & 1 deletion examples/example-js-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "3.4.0",
"description": "Example code for eslint-config-ns",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/example-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "3.4.0",
"description": "Example code for eslint-config-ns",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/example-ts-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "3.4.0",
"description": "Example code for eslint-config-ns-ts",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/example-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "3.4.0",
"description": "Example code for eslint-config-ns",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "src/index.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Stefan Natter",
"license": "MIT",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"bugs": {
"url": "https://github.com/natterstefan/eslint-config-ns/issues"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-ns-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Stefan Natter",
"license": "MIT",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-ns-ts-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Stefan Natter",
"license": "MIT",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-ns-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Stefan Natter",
"license": "MIT",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-ns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Stefan Natter",
"license": "MIT",
"engines": {
"node": "^14.17 || ^16.x"
"node": "^14.17 || ^16.x || ^18.x"
},
"main": "index.js",
"exports": {
Expand Down

0 comments on commit 6f00e73

Please sign in to comment.