From 1067967fb080bfe2be56ba94b20a4bba0c0d4bfd Mon Sep 17 00:00:00 2001 From: Alberto Brusa Date: Wed, 3 May 2023 10:50:15 +0100 Subject: [PATCH 1/4] Remove node 14 from test workflow --- .github/workflows/integration.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static.yml | 2 +- .github/workflows/test-windows.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/validate.yml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f5f1bff01..83ff612d1 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node-version: ['14.18.0', '16.x', '18.x'] + node-version: ['16.x', '18.x'] yarn-version: ['1.22.19', '3.5.0'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2de272ccc..abfe230a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3.3.0 with: - node-version: '14.18.0' + node-version: '18.x' registry-url: https://registry.npmjs.org/ cache: 'yarn' diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 30baebf9d..a5eac57a0 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -29,7 +29,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3.3.0 with: - node-version: '14.18.0' + node-version: '18.x' cache: 'yarn' - name: 'Install Dependencies' diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 265e447e6..bad87a156 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: os: [windows-latest] - node-version: ['14.18.0', '16.x', '18.x'] + node-version: ['16.x', '18.x'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3feb22e46..543698600 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node-version: ['14.18.0', '16.x', '18.x'] + node-version: ['16.x', '18.x'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 722185a63..1f73ec5c5 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 14 + - name: Use Node.js 18 uses: actions/setup-node@v3.3.0 with: - node-version: 14 + node-version: 18 cache: 'yarn' - name: Install Dependencies run: yarn --frozen-lockfile From 98262d3be6ab94de12177e4f115a70dac851a724 Mon Sep 17 00:00:00 2001 From: Alberto Brusa Date: Wed, 3 May 2023 11:14:26 +0100 Subject: [PATCH 2/4] Change engines & tests to Node 16, 18 & 20 && change target to ES2017 --- .github/workflows/integration.yml | 2 +- .github/workflows/test-windows.yml | 2 +- .github/workflows/test.yml | 2 +- babel.config.js | 2 +- package.json | 2 +- packages/create-modular-react-app/package.json | 2 +- packages/eslint-config-modular-app/package.json | 2 +- packages/modular-scripts/package.json | 2 +- packages/modular-scripts/src/__tests__/build.test.ts | 2 +- packages/modular-scripts/src/__tests__/index.test.ts | 6 +++--- packages/modular-scripts/src/test/config.ts | 2 +- packages/modular-scripts/tsconfig.json | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 83ff612d1..159a50ac5 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node-version: ['16.x', '18.x'] + node-version: ['16.x', '18.x', '20.x'] yarn-version: ['1.22.19', '3.5.0'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index bad87a156..d49e4de1e 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: os: [windows-latest] - node-version: ['16.x', '18.x'] + node-version: ['16.x', '18.x', '20.x'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 543698600..9c8403967 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node-version: ['16.x', '18.x'] + node-version: ['16.x', '18.x', '20.x'] steps: - uses: actions/checkout@v3 diff --git a/babel.config.js b/babel.config.js index 78a9d5831..35ccd849d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -13,7 +13,7 @@ module.exports = (api) => { { targets: { // TODO: can we get this to read from package.json somehow..? - node: '14', + node: '16', }, }, ], diff --git a/package.json b/package.json index 34e8aed13..438b0a58d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "packages/**" ], "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0" + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0" }, "repository": "https://github.com/jpmorganchase/modular.git", "scripts": { diff --git a/packages/create-modular-react-app/package.json b/packages/create-modular-react-app/package.json index 649ced90a..447e38beb 100644 --- a/packages/create-modular-react-app/package.json +++ b/packages/create-modular-react-app/package.json @@ -11,7 +11,7 @@ "./package.json": "./package.json" }, "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0" + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0" }, "scripts": { "create-modular-react-app": "ts-node src/cli.ts", diff --git a/packages/eslint-config-modular-app/package.json b/packages/eslint-config-modular-app/package.json index 1c5ff02db..2564cef97 100644 --- a/packages/eslint-config-modular-app/package.json +++ b/packages/eslint-config-modular-app/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "main": "index.js", "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0" + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0" }, "exports": { ".": "./index.js", diff --git a/packages/modular-scripts/package.json b/packages/modular-scripts/package.json index 45b5dcf98..4e340d28d 100644 --- a/packages/modular-scripts/package.json +++ b/packages/modular-scripts/package.json @@ -18,7 +18,7 @@ "./tsconfig.json": "./tsconfig.json" }, "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0" + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0" }, "scripts": { "modular": "ts-node src/cli.ts", diff --git a/packages/modular-scripts/src/__tests__/build.test.ts b/packages/modular-scripts/src/__tests__/build.test.ts index 23738b13e..764e50833 100644 --- a/packages/modular-scripts/src/__tests__/build.test.ts +++ b/packages/modular-scripts/src/__tests__/build.test.ts @@ -36,7 +36,7 @@ describe('WHEN building with preserve modules', () => { { "dependencies": {}, "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0", + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0", }, "files": [ "dist-cjs", diff --git a/packages/modular-scripts/src/__tests__/index.test.ts b/packages/modular-scripts/src/__tests__/index.test.ts index c770e919c..0d7fd49c2 100644 --- a/packages/modular-scripts/src/__tests__/index.test.ts +++ b/packages/modular-scripts/src/__tests__/index.test.ts @@ -209,7 +209,7 @@ describe('modular-scripts', () => { "react": "17.0.2", }, "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0", + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0", }, "files": [ "dist-cjs", @@ -364,7 +364,7 @@ describe('modular-scripts', () => { { "dependencies": {}, "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0", + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0", }, "files": [ "dist-cjs", @@ -448,7 +448,7 @@ describe('modular-scripts', () => { { "dependencies": {}, "engines": { - "node": "^14.18.0 || >=16.10.0 || >=18.0.0", + "node": ">=16.10.0 || >=18.0.0 || >=20.0.0", }, "files": [ "dist-cjs", diff --git a/packages/modular-scripts/src/test/config.ts b/packages/modular-scripts/src/test/config.ts index dada23148..58674e026 100644 --- a/packages/modular-scripts/src/test/config.ts +++ b/packages/modular-scripts/src/test/config.ts @@ -63,7 +63,7 @@ export function createJestConfig( module: { type: 'commonjs', strictMode: true, noInterop: false }, jsc: { externalHelpers: false, - target: 'es2016', + target: 'es2017', parser: { syntax: 'typescript', tsx: true, diff --git a/packages/modular-scripts/tsconfig.json b/packages/modular-scripts/tsconfig.json index d79bf80af..384d4b249 100644 --- a/packages/modular-scripts/tsconfig.json +++ b/packages/modular-scripts/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2016", + "target": "es2017", "downlevelIteration": true, "lib": ["dom", "dom.iterable", "esnext", "WebWorker"], "allowJs": true, From 1bd17885003e027dd6c2de737309b266391ae9ba Mon Sep 17 00:00:00 2001 From: Alberto Brusa Date: Wed, 3 May 2023 12:04:55 +0100 Subject: [PATCH 3/4] Update docs --- docs/compatibility.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/compatibility.md b/docs/compatibility.md index 7b69ecb52..bc1c01aca 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -38,17 +38,16 @@ If you find any example of v3 features which cause Modular to fail, please ### Yarn v4 and beyond -We aim to support future versions of Yarn, and we've sucessuflly useds Modular +We aim to support future versions of Yarn, and we've successfully used Modular with an unstable release candidate of Yarn 4. If there's something we don't support properly, please [let us know](https://github.com/jpmorganchase/modular/issues). ## Node versions -Modular is tested on the latest three -[Long Term Support versions of Node.js (v14, v16 and v18)](https://github.com/nodejs/release#release-schedule). -Node.js v14 is supported from version `14.18.0` onwards, while Node 16 is -supported from version `16.10.0` onwards. +Modular is tested on the current +[Long Term Support versions of Node.js: v16, v18 and v20](https://github.com/nodejs/release#release-schedule). +Node 16 is supported from version `16.10.0` onwards. ## Platforms From beca4526cb3319a75f51901034cdd3ae781781e4 Mon Sep 17 00:00:00 2001 From: Alberto Brusa Date: Wed, 3 May 2023 12:07:12 +0100 Subject: [PATCH 4/4] changeset --- .changeset/spotty-hornets-hug.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/spotty-hornets-hug.md diff --git a/.changeset/spotty-hornets-hug.md b/.changeset/spotty-hornets-hug.md new file mode 100644 index 000000000..74a6249fe --- /dev/null +++ b/.changeset/spotty-hornets-hug.md @@ -0,0 +1,7 @@ +--- +'create-modular-react-app': major +'eslint-config-modular-app': major +'modular-scripts': major +--- + +Dropped Node 14 support, added Node 20 support. Changed target to ES2017