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

template: node 18 #1011

Merged
merged 13 commits into from
Nov 7, 2022
7 changes: 7 additions & 0 deletions .changeset/giant-badgers-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'skuba': patch
---

template: Bump greeter and API templates to Node.js 18

Node.js 18 is now in active LTS. The Lambda templates are stuck on Node.js 16 until the new AWS Lambda runtime is released.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
fetch-depth: 0
token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}

- name: Set up Node.js 16.x
- name: Set up Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
git config user.name seek-oss-ci
git config user.email 34733141+seek-oss-ci@users.noreply.github.com

- name: Set up Node.js 16.x
- name: Set up Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -83,10 +83,10 @@ jobs:
- name: Check out repo
uses: actions/checkout@v3

- name: Set up Node.js 16.x
- name: Set up Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- if: github.head_ref != 'beta' && github.head_ref != 'changeset-release/master' && github.ref_name != 'beta' && github.ref_name != 'changeset-release/master'
name: Test template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export {};
"data": "{
"compilerOptions": {
"baseUrl": ".",
"lib": ["ES2020"],
"lib": ["ES2022"],
"outDir": "lib",
"paths": {
"src": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions template/base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"compilerOptions": {
"baseUrl": ".",
"lib": ["ES2020"],
"lib": ["ES2022"],
"outDir": "lib",
"paths": {
"src": ["src"]
},
"target": "ES2020"
"target": "ES2022"
},
"exclude": ["lib*/**/*"],
"extends": "skuba/config/tsconfig.json"
Expand Down
2 changes: 1 addition & 1 deletion template/express-rest-api/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion template/express-rest-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN yarn build

###

FROM --platform=arm64 gcr.io/distroless/nodejs:16 AS runtime
FROM --platform=arm64 gcr.io/distroless/nodejs:18 AS runtime

WORKDIR /workdir

Expand Down
2 changes: 1 addition & 1 deletion template/express-rest-api/Dockerfile.dev-deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.2

FROM --platform=arm64 node:16-alpine AS dev-deps
FROM --platform=arm64 node:18-alpine AS dev-deps

WORKDIR /workdir

Expand Down
4 changes: 2 additions & 2 deletions template/express-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/node": "16.11.64",
"@types/node": "^18.11.5",
"@types/supertest": "^2.0.11",
"pino-pretty": "^9.0.0",
"skuba": "*",
"supertest": "^6.1.6"
},
"engines": {
"node": ">=16"
"node": ">=18"
}
}
2 changes: 1 addition & 1 deletion template/greeter/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion template/greeter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.2

FROM --platform=arm64 node:16-alpine AS dev-deps
FROM --platform=arm64 node:18-alpine AS dev-deps

WORKDIR /workdir

Expand Down
4 changes: 2 additions & 2 deletions template/greeter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"skuba-dive": "^2.0.0"
},
"devDependencies": {
"@types/node": "16.11.64",
"@types/node": "^18.11.5",
"skuba": "*"
},
"engines": {
"node": ">=16"
"node": ">=18"
}
}
2 changes: 1 addition & 1 deletion template/koa-rest-api/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion template/koa-rest-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN yarn build

###

FROM --platform=arm64 gcr.io/distroless/nodejs:16 AS runtime
FROM --platform=arm64 gcr.io/distroless/nodejs:18 AS runtime

WORKDIR /workdir

Expand Down
2 changes: 1 addition & 1 deletion template/koa-rest-api/Dockerfile.dev-deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.2

FROM --platform=arm64 node:16-alpine AS dev-deps
FROM --platform=arm64 node:18-alpine AS dev-deps

WORKDIR /workdir

Expand Down
4 changes: 2 additions & 2 deletions template/koa-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
"@types/koa": "^2.13.4",
"@types/koa-bodyparser": "^5.0.2",
"@types/koa__router": "^12.0.0",
"@types/node": "16.11.64",
"@types/node": "^18.11.5",
"@types/supertest": "^2.0.11",
"chance": "^1.1.8",
"pino-pretty": "^9.0.0",
"skuba": "*",
"supertest": "^6.1.6"
},
"engines": {
"node": ">=16"
"node": ">=18"
}
}
13 changes: 13 additions & 0 deletions template/lambda-sqs-worker-cdk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"baseUrl": ".",
"lib": ["ES2020"],
"outDir": "lib",
"paths": {
"src": ["src"]
},
"target": "ES2020"
},
"exclude": ["lib*/**/*"],
"extends": "skuba/config/tsconfig.json"
}
13 changes: 13 additions & 0 deletions template/lambda-sqs-worker/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"baseUrl": ".",
"lib": ["ES2020"],
"outDir": "lib",
"paths": {
"src": ["src"]
},
"target": "ES2020"
},
"exclude": ["lib*/**/*"],
"extends": "skuba/config/tsconfig.json"
}
2 changes: 1 addition & 1 deletion template/oss-npm-package/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion template/private-npm-package/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18