From cbf75359c82b6ef9ce276a5d9df578e9975e3508 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Sun, 6 Nov 2022 00:29:28 +0800 Subject: [PATCH] chore: enable Node 18 --- .github/workflows/integration-test.yml | 2 ++ .github/workflows/main.yml | 6 ++++++ package.json | 4 ++-- packages/cli/package.json | 2 +- packages/console/package.json | 3 +++ packages/core/package.json | 2 +- packages/create/package.json | 2 +- packages/demo-app/package.json | 3 +++ packages/integration-tests/package.json | 3 +++ packages/phrases-ui/package.json | 3 +++ packages/phrases/package.json | 2 +- packages/schemas/package.json | 2 +- packages/shared/package.json | 2 +- packages/ui/package.json | 3 +++ 14 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index f2483f27d..80eafac28 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -46,6 +46,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] + node_version: [16, 18] runs-on: ${{ matrix.os }} @@ -69,6 +70,7 @@ jobs: - name: Setup Node and pnpm uses: silverhand-io/actions-node-pnpm-run-steps@v2 with: + node-version: ${{ matrix.node_version }} run-install: false # Setup integration test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dffec17c5..af5765f0d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,11 +47,17 @@ jobs: main-test: runs-on: ubuntu-latest + strategy: + matrix: + node_version: [16, 18] + steps: - uses: actions/checkout@v3 - name: Setup Node and pnpm uses: silverhand-io/actions-node-pnpm-run-steps@v2 + with: + node-version: ${{ matrix.node_version }} - name: Prepack run: pnpm prepack diff --git a/package.json b/package.json index 291afbab8..d4e93b575 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ ] }, "engines": { - "node": ">=14.15.0", - "pnpm": ">=6" + "node": "^16.13.0 || ^18.12.0", + "pnpm": "^7.14.0" }, "alias": { "html-parse-stringify": "html-parse-stringify/dist/html-parse-stringify.module.js", diff --git a/packages/cli/package.json b/packages/cli/package.json index de9625cb1..a34330050 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -34,7 +34,7 @@ "prepack": "pnpm build" }, "engines": { - "node": "^16.0.0" + "node": "^16.13.0 || ^18.12.0" }, "bugs": { "url": "https://github.com/logto-io/logto/issues" diff --git a/packages/console/package.json b/packages/console/package.json index 0eb6f0e5b..e0de9a9d7 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -84,6 +84,9 @@ "typescript": "^4.7.4", "zod": "^3.19.1" }, + "engines": { + "node": "^16.13.0 || ^18.12.0" + }, "alias": { "@/*": "./src/$1", "@mdx/components/*": "./src/mdx-components/$1" diff --git a/packages/core/package.json b/packages/core/package.json index 6b76aa0b7..f182c9653 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -100,7 +100,7 @@ "typescript": "^4.7.4" }, "engines": { - "node": "^16.0.0" + "node": "^16.13.0 || ^18.12.0" }, "_moduleAliases": { "@": "./build" diff --git a/packages/create/package.json b/packages/create/package.json index a950e218f..82161724c 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -11,7 +11,7 @@ }, "scripts": {}, "engines": { - "node": "^16.0.0" + "node": "^16.13.0 || ^18.12.0" }, "dependencies": { "@logto/cli": "workspace:^" diff --git a/packages/demo-app/package.json b/packages/demo-app/package.json index 245754ce1..c03ab536f 100644 --- a/packages/demo-app/package.json +++ b/packages/demo-app/package.json @@ -44,6 +44,9 @@ "stylelint": "^14.9.1", "typescript": "^4.7.4" }, + "engines": { + "node": "^16.13.0 || ^18.12.0" + }, "alias": { "@/*": "./src/$1" }, diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 9abf959e9..228b5f5f7 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -39,6 +39,9 @@ "ts-node": "^10.9.1", "typescript": "^4.7.4" }, + "engines": { + "node": "^16.13.0 || ^18.12.0" + }, "eslintConfig": { "extends": "@silverhand" }, diff --git a/packages/phrases-ui/package.json b/packages/phrases-ui/package.json index df0a50a77..0b690b2a2 100644 --- a/packages/phrases-ui/package.json +++ b/packages/phrases-ui/package.json @@ -44,6 +44,9 @@ "prettier": "^2.7.1", "typescript": "^4.7.4" }, + "engines": { + "node": "^16.13.0 || ^18.12.0" + }, "eslintConfig": { "extends": "@silverhand" }, diff --git a/packages/phrases/package.json b/packages/phrases/package.json index f79eef4b7..0eef2125d 100644 --- a/packages/phrases/package.json +++ b/packages/phrases/package.json @@ -25,7 +25,7 @@ "prepack": "pnpm build" }, "engines": { - "node": "^16.0.0" + "node": "^16.13.0 || ^18.12.0" }, "bugs": { "url": "https://github.com/logto-io/logto/issues" diff --git a/packages/schemas/package.json b/packages/schemas/package.json index c561267c8..91258e648 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -27,7 +27,7 @@ "test:ci": "jest" }, "engines": { - "node": "^16.0.0" + "node": "^16.13.0 || ^18.12.0" }, "devDependencies": { "@silverhand/eslint-config": "1.3.0", diff --git a/packages/shared/package.json b/packages/shared/package.json index c44c5ab15..ab3ab05bf 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -33,7 +33,7 @@ "typescript": "^4.7.4" }, "engines": { - "node": "^16.0.0" + "node": "^16.13.0 || ^18.12.0" }, "eslintConfig": { "extends": "@silverhand", diff --git a/packages/ui/package.json b/packages/ui/package.json index 881351cc7..6e4021263 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -71,6 +71,9 @@ "typescript": "^4.7.4", "use-debounced-loader": "^0.1.1" }, + "engines": { + "node": "^16.13.0 || ^18.12.0" + }, "alias": { "@/*": "./src/$1" },