Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node v20 #16

Merged
merged 12 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"package/**/*.js",
"examples/**/*.js",
"**/*.spec.js",
"**/*.test.js",
"ava.config.js"
],
"reporter": ["html", "lcov", "text"]
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT="18"
ARG VARIANT="20"

FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}

Expand Down
27 changes: 13 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
{
"root": true,
"extends": ["standard", "prettier"],
"plugins": ["simple-import-sort", "unused-imports"],
"rules": {
"no-console": "warn",
"import/extensions": ["error", "ignorePackages"],
"sort-imports": [
"no-console": "error",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"ignoreDeclarationSort": true,
"allowSeparatedGroups": true
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc"
}
}
]
"import/extensions": ["error", "ignorePackages"],
"import/no-duplicates": ["error", { "prefer-inline": true }],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error"
}
}
6 changes: 3 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inputs:
node_version:
description: The Node.js version.
required: false
default: '18'
default: '20'
registry_url:
description: The Node.js package registry URL.
required: false
Expand All @@ -20,14 +20,14 @@ runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: inputs.install_dependencies == 'true'
with:
cache: npm
node-version: ${{ inputs.node_version }}
registry-url: ${{ inputs.registry_url }}
- name: Setup Node.js without cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: inputs.install_dependencies == 'false'
with:
node-version: ${{ inputs.node_version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
description: The Node.js version.
type: string
required: false
default: '18'
default: '20'
outputs:
artifact_name:
description: The artifact name.
Expand All @@ -21,7 +21,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
description: The artifact name.
type: string
required: true
registry_host:
description: The package registry host.
registry_url:
description: The package registry url.
type: string
required: true
secrets:
Expand All @@ -24,7 +24,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
Expand All @@ -38,9 +38,9 @@ jobs:
id: meta
run: echo "tgz=$(ls *.tgz | head -n1)" >> $GITHUB_OUTPUT
- name: Publish
uses: JS-DevTools/npm-publish@v2
uses: JS-DevTools/npm-publish@v3
with:
access: public
token: ${{ secrets.registry_token }}
registry: ${{ inputs.registry_host }}
registry: ${{ inputs.registry_url }}
package: ${{ steps.meta.outputs.tgz }}
17 changes: 10 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Check

on:
push:
branches:
- main
pull_request:
branches:
- '**'

Expand All @@ -19,8 +22,8 @@ jobs:
- macos-latest
- windows-latest
node:
- '16'
- '18'
- '20'
include:
- os: ubuntu-latest
os_name: Linux
Expand All @@ -30,7 +33,7 @@ jobs:
os_name: Windows
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
Expand All @@ -45,11 +48,11 @@ jobs:
fail-fast: false
matrix:
node:
- '16'
- '18'
- '20'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
Expand All @@ -72,8 +75,8 @@ jobs:
- macos-latest
- windows-latest
node:
- '16'
- '18'
- '20'
include:
- os: ubuntu-latest
os_name: Linux
Expand All @@ -83,7 +86,7 @@ jobs:
os_name: Windows
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Download artifact
Expand All @@ -92,7 +95,7 @@ jobs:
name: ${{ needs.build.outputs.artifact_name }}
path: .
- name: Find packages
uses: tj-actions/glob@v16
uses: tj-actions/glob@v17
id: packages
with:
files: '*.tgz'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name: Format

on:
pull_request:
branches:
push:
branches-ignore:
- main
workflow_dispatch: {}

Expand All @@ -14,12 +14,12 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
git_user_signingkey: true
git_commit_gpgsign: true
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Format
run: npm run format
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
if: always()
with:
commit_message: Run format
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name: Generate

on:
pull_request:
branches:
push:
branches-ignore:
- main
workflow_dispatch: {}

Expand All @@ -14,12 +14,12 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
git_user_signingkey: true
git_commit_gpgsign: true
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Normalize package-lock.json
run: npm install
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Generate code
commit_user_name: ${{ secrets.GIT_USER_NAME }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -38,7 +38,7 @@ jobs:
needs: build
with:
artifact_name: ${{ needs.build.outputs.artifact_name }}
registry_host: https://registry.npmjs.org
registry_url: https://registry.npmjs.org
secrets:
registry_token: ${{ secrets.NPM_TOKEN }}
github:
Expand All @@ -50,6 +50,6 @@ jobs:
needs: build
with:
artifact_name: ${{ needs.build.outputs.artifact_name }}
registry_host: https://npm.pkg.github.com
registry_url: https://npm.pkg.github.com
secrets:
registry_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
git_user_signingkey: true
git_commit_gpgsign: true
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# For more details, visit the project page:
# https://github.com/github/gitignore

# Build directories
# Build output
package

# Environment versions file
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
20
6 changes: 4 additions & 2 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default {
ignoredByWatcher: ['tmp/**/*'],
files: ['**/*.spec.js', '!package/**/*']
files: ['**/*.spec.js', '**/*.test.js', '!package/**/*'],
ignoreChanges: {
watchMode: ['tmp/**/*']
}
}
File renamed without changes.
Loading