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

fix: bump node version #697

Merged
merged 2 commits into from
May 18, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-16",
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-20",
"updateContentCommand": "yarn --frozen-lockfile"
}
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
github.event.pull_request.head.ref || '' }}
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- run: git config --global user.email "actions@github.com"
- run: git config --global user.name "GitHub Actions"
- run: yarn --frozen-lockfile
Expand Down Expand Up @@ -54,22 +54,22 @@ jobs:
with:
name: Image Snapshot Diffs
path: "**/__image_snapshots__/__diff_output__"
- if: matrix.os == 'ubuntu-latest' && matrix.node == 16
- if: matrix.os == 'ubuntu-latest' && matrix.node == 20
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
strategy:
matrix:
include:
- node: 14
os: ubuntu-latest
- node: 16
os: ubuntu-latest
- node: 18
os: ubuntu-latest
- node: 16
- node: 20
os: ubuntu-latest
- node: 20
os: macos-latest
- node: 16
- node: 20
os: windows-latest
name: build
on:
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN sudo apt-get install git-lfs
RUN git lfs install

# https://www.gitpod.io/docs/languages/javascript
RUN bash -c 'VERSION="16" && source $HOME/.nvm/nvm.sh && nvm install $VERSION && nvm use $VERSION && nvm alias default $VERSION'
RUN bash -c 'VERSION="20" && source $HOME/.nvm/nvm.sh && nvm install $VERSION && nvm use $VERSION && nvm alias default $VERSION'

RUN echo "\nexport PATH=$(yarn global bin):\$PATH" >> /home/gitpod/.bashrc

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@
"@dword-design/tester": "^2.0.0",
"@dword-design/tester-plugin-tmp-dir": "^2.0.0",
"is-docker": "^3.0.0",
"node-version": "^3.0.0",
"p-event": "^5.0.1",
"rimraf": "^3.0.0",
"sharp": "^0.31.3",
"unify-mocha-output": "^2.0.0"
},
"engines": {
"node": ">=14"
"node": ">=16"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions src/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Object {
"git": undefined,
"gitignore": Array [],
"name": "base-config-foo",
"nodeVersion": 16,
"nodeVersion": 20,
"preDeploySteps": Array [],
"readmeInstallString": "## Install

Expand All @@ -24,9 +24,9 @@ $ yarn add foo
\`\`\`",
"seeAlso": Array [],
"supportedNodeVersions": Array [
14,
16,
18,
20,
],
"syncKeywords": true,
"windows": true,
Expand Down
3 changes: 2 additions & 1 deletion src/commands/test-raw/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import testerPluginTmpDir from '@dword-design/tester-plugin-tmp-dir'
import packageName from 'depcheck-package-name'
import fs from 'fs-extra'
import { globby } from 'globby'
import nodeVersion from 'node-version'
import outputFiles from 'output-files'
import P from 'path'
import unifyMochaOutput from 'unify-mocha-output'
Expand Down Expand Up @@ -143,7 +144,7 @@ export default tester(
},
test() {
return expect(this.base.test()).rejects.toThrow(
'error Unexpected token o',
`error Unexpected token ${nodeVersion.major === '20' ? "'o'" : 'o'}`,
)
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Object {
Object {
"uses": "actions/setup-node@v3",
"with": Object {
"node-version": 16,
"node-version": 20,
},
},
Object {
Expand Down Expand Up @@ -100,7 +100,7 @@ Object {
},
},
Object {
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 16",
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 20",
"uses": "codecov/codecov-action@v3",
"with": Object {
"token": "\${{ secrets.CODECOV_TOKEN }}",
Expand All @@ -111,23 +111,23 @@ Object {
"matrix": Object {
"include": Array [
Object {
"node": 14,
"node": 16,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 18,
"os": "ubuntu-latest",
},
Object {
"node": 18,
"node": 20,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 20,
"os": "macos-latest",
},
Object {
"node": 16,
"node": 20,
"os": "windows-latest",
},
],
Expand Down Expand Up @@ -176,7 +176,7 @@ Object {
Object {
"uses": "actions/setup-node@v3",
"with": Object {
"node-version": 16,
"node-version": 20,
},
},
Object {
Expand Down Expand Up @@ -247,7 +247,7 @@ Object {
},
},
Object {
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 16",
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 20",
"uses": "codecov/codecov-action@v3",
"with": Object {
"token": "\${{ secrets.CODECOV_TOKEN }}",
Expand All @@ -258,19 +258,19 @@ Object {
"matrix": Object {
"include": Array [
Object {
"node": 14,
"node": 16,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 18,
"os": "ubuntu-latest",
},
Object {
"node": 18,
"node": 20,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 20,
"os": "macos-latest",
},
],
Expand Down Expand Up @@ -314,7 +314,7 @@ Object {
Object {
"uses": "actions/setup-node@v3",
"with": Object {
"node-version": 16,
"node-version": 20,
},
},
Object {
Expand Down Expand Up @@ -409,7 +409,7 @@ Object {
Object {
"uses": "actions/setup-node@v3",
"with": Object {
"node-version": 16,
"node-version": 20,
},
},
Object {
Expand Down Expand Up @@ -481,7 +481,7 @@ Object {
},
},
Object {
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 16",
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 20",
"uses": "codecov/codecov-action@v3",
"with": Object {
"token": "\${{ secrets.CODECOV_TOKEN }}",
Expand All @@ -492,23 +492,23 @@ Object {
"matrix": Object {
"include": Array [
Object {
"node": 14,
"node": 16,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 18,
"os": "ubuntu-latest",
},
Object {
"node": 18,
"node": 20,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 20,
"os": "macos-latest",
},
Object {
"node": 16,
"node": 20,
"os": "windows-latest",
},
],
Expand Down Expand Up @@ -557,7 +557,7 @@ Object {
Object {
"uses": "actions/setup-node@v3",
"with": Object {
"node-version": 16,
"node-version": 20,
},
},
Object {
Expand Down Expand Up @@ -630,7 +630,7 @@ Object {
},
},
Object {
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 16",
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 20",
"uses": "codecov/codecov-action@v3",
"with": Object {
"token": "\${{ secrets.CODECOV_TOKEN }}",
Expand All @@ -641,23 +641,23 @@ Object {
"matrix": Object {
"include": Array [
Object {
"node": 14,
"node": 16,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 18,
"os": "ubuntu-latest",
},
Object {
"node": 18,
"node": 20,
"os": "ubuntu-latest",
},
Object {
"node": 16,
"node": 20,
"os": "macos-latest",
},
Object {
"node": 16,
"node": 20,
"os": "windows-latest",
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`index empty 1`] = `
Object {
"author": "Sebastian Landwehr <info@sebastianlandwehr.com>",
"engines": Object {
"node": ">=14",
"node": ">=16",
},
"files": Array [
"dist",
Expand Down Expand Up @@ -43,7 +43,7 @@ Object {
"base-config-bar": "^1.0.0",
},
"engines": Object {
"node": ">=14",
"node": ">=16",
},
"files": Array [
"dist",
Expand Down Expand Up @@ -81,7 +81,7 @@ exports[`index git repo 1`] = `
Object {
"author": "Sebastian Landwehr <info@sebastianlandwehr.com>",
"engines": Object {
"node": ">=14",
"node": ">=16",
},
"files": Array [
"dist",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Base {
git: getGitInfo(),
gitignore: [],
lint: identity,
nodeVersion: 16,
nodeVersion: 20,
preDeploySteps: [],
prepare: identity,
readmeInstallString: endent`
Expand All @@ -103,7 +103,7 @@ class Base {
\`\`\`
`,
seeAlso: [],
supportedNodeVersions: [14, 16, 18],
supportedNodeVersions: [16, 18, 20],
syncKeywords: true,
windows: true,
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8606,6 +8606,11 @@ node-sass@^8.0.0:
stdout-stream "^1.4.0"
"true-case-path" "^2.2.1"

node-version@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/node-version/-/node-version-3.0.0.tgz#1ee8880d416469fbec6fa50e3e57db1bc98c9cc4"
integrity sha512-lOtS3Vaqo4GntMFYyH6BXbpiqgD5F+5ycBwDYaCjzBA9pKK9G1j6cKVtu3HU0HATDTikcWOTn8MxQmj/jo4iTQ==

nopt@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88"
Expand Down