diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ca319cf1893..55eaf928493f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - run: yarn install working-directory: ./.github/actions/only_doc_changes @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - run: yarn install working-directory: ./tasks/check @@ -62,20 +62,19 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [16, 18] fail-fast: true - name: ๐Ÿ— Build, lint, test / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐Ÿ— Build, lint, test / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} steps: - - name: Remove the tsc problem matcher if not ubuntu-latest, node 16 - if: (matrix.os == 'ubuntu-latest' && matrix.node-version == '16') == false + - name: Remove the tsc problem matcher if not ubuntu-latest + if: matrix.os != 'ubuntu-latest' run: echo "echo "::remove-matcher owner=tsc::"" - uses: actions/checkout@v3 - name: ๐Ÿงถ Set up job uses: ./.github/actions/set-up-job with: - node-version: ${{ matrix.node-version }} + node-version: 18 - name: ๐Ÿ”จ Build run: yarn build @@ -97,8 +96,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [16, 18] - name: ๐Ÿ— Build, lint, test / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐Ÿ— Build, lint, test / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} steps: - run: echo "Only doc changes" @@ -108,16 +106,15 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node-version: [16, 18] fail-fast: true - name: ๐ŸŒฒ Tutorial E2E / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐ŸŒฒ Tutorial E2E / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: ๐Ÿงถ Set up job uses: ./.github/actions/set-up-job with: - node-version: ${{ matrix.node-version }} + node-version: 18 - name: ๐Ÿ“ Create a temporary directory id: createpath @@ -155,7 +152,7 @@ jobs: env: true browser: chrome record: false - wait-on: ${{ matrix.node-version == 18 && 'http://[::1]:8910' || 'http://localhost:8910' }} + wait-on: 'http://[::1]:8910' working-directory: ./tasks/e2e spec: | cypress/e2e/01-tutorial/*.cy.js @@ -167,8 +164,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node-version: [16, 18] - name: ๐ŸŒฒ Tutorial E2E / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐ŸŒฒ Tutorial E2E / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} steps: - run: echo "Only doc changes" @@ -178,9 +174,8 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [16, 18] fail-fast: true - name: ๐Ÿ‘€ Smoke test / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐Ÿ‘€ Smoke test / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} env: REDWOOD_CI: 1 @@ -192,7 +187,7 @@ jobs: - name: ๐Ÿงถ Set up job uses: ./.github/actions/set-up-job with: - node-version: ${{ matrix.node-version }} + node-version: 18 - name: ๐ŸŒฒ Setup test project id: setup_test_project @@ -220,7 +215,7 @@ jobs: env: PROJECT_PATH: ${{ steps.setup_test_project.outputs.test_project_path }} REDWOOD_DISABLE_TELEMETRY: 1 - RECORD_REPLAY_METADATA_TEST_RUN_TITLE: Smoke test / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + RECORD_REPLAY_METADATA_TEST_RUN_TITLE: Smoke test / ${{ matrix.os }} / node 18 latest RECORD_REPLAY_TEST_METRICS: 1 - name: Run `rw info` @@ -319,8 +314,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [16, 18] - name: ๐Ÿ‘€ Smoke test / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐Ÿ‘€ Smoke test / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} steps: - run: echo "Only doc changes" @@ -330,9 +324,8 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [16.20.0, 18] fail-fast: true - name: ๐Ÿ”ญ Telemetry check / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐Ÿ”ญ Telemetry check / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} env: REDWOOD_REDIRECT_TELEMETRY: "http://127.0.0.1:48619" # Random port @@ -341,7 +334,7 @@ jobs: - name: ๐Ÿงถ Set up job uses: ./.github/actions/set-up-job with: - node-version: ${{ matrix.node-version }} + node-version: 18 - name: ๐Ÿ”จ Build run: yarn build @@ -360,8 +353,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [16.20.0, 18] - name: ๐Ÿ”ญ Telemetry check / ${{ matrix.os }} / node ${{ matrix.node-version }} latest + name: ๐Ÿ”ญ Telemetry check / ${{ matrix.os }} / node 18 latest runs-on: ${{ matrix.os }} steps: - run: echo "Only doc changes" diff --git a/__fixtures__/test-project/package.json b/__fixtures__/test-project/package.json index 524294234bec..9f60a562f7b8 100644 --- a/__fixtures__/test-project/package.json +++ b/__fixtures__/test-project/package.json @@ -14,7 +14,7 @@ "root": true }, "engines": { - "node": ">=16.20 <=18.x", + "node": ">=18.16", "yarn": ">=1.15" }, "prisma": { diff --git a/babel.config.js b/babel.config.js index 0eb31e1cbb2f..044f9e66c564 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,7 +2,7 @@ const path = require('path') const packageJSON = require(path.join(__dirname, 'package.json')) -const TARGETS_NODE = '16.20' +const TARGETS_NODE = '18.16' // Run `npx browserslist "defaults, not IE 11, not IE_Mob 11"` to see a list // of target browsers. diff --git a/packages/create-redwood-app/template/package.json b/packages/create-redwood-app/template/package.json index 524294234bec..9f60a562f7b8 100644 --- a/packages/create-redwood-app/template/package.json +++ b/packages/create-redwood-app/template/package.json @@ -14,7 +14,7 @@ "root": true }, "engines": { - "node": ">=16.20 <=18.x", + "node": ">=18.16", "yarn": ">=1.15" }, "prisma": { diff --git a/packages/internal/src/__tests__/build_api.test.ts b/packages/internal/src/__tests__/build_api.test.ts index c46bb09a9e82..8c23fb8d9d9f 100644 --- a/packages/internal/src/__tests__/build_api.test.ts +++ b/packages/internal/src/__tests__/build_api.test.ts @@ -518,7 +518,6 @@ test('core-js polyfill list', () => { expect(list).toMatchInlineSnapshot(` [ "es.regexp.flags", - "es.typed-array.set", "esnext.array.last-index", "esnext.array.last-item", "esnext.composite-key", diff --git a/packages/internal/src/build/api.ts b/packages/internal/src/build/api.ts index da44b98439c6..ed536656321b 100644 --- a/packages/internal/src/build/api.ts +++ b/packages/internal/src/build/api.ts @@ -68,7 +68,7 @@ export const transpileApi = (files: string[], options = {}) => { absWorkingDir: rwjsPaths.api.base, entryPoints: files, platform: 'node', - target: 'node16', + target: 'node18', format: 'cjs', bundle: false, outdir: rwjsPaths.api.dist, diff --git a/packages/internal/src/build/babel/api.ts b/packages/internal/src/build/babel/api.ts index e0afa19bd75a..140440df01ba 100644 --- a/packages/internal/src/build/babel/api.ts +++ b/packages/internal/src/build/babel/api.ts @@ -15,7 +15,7 @@ import { getCommonPlugins, } from './common' -export const TARGETS_NODE = '16.20' +export const TARGETS_NODE = '18.16' // Warning! Use the minor core-js version: "corejs: '3.6'", instead of "corejs: 3", // because we want to include the features added in the minor version. // https://github.com/zloirock/core-js/blob/master/README.md#babelpreset-env