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

Deprecate Node 14 Support & add Node 20 & switch to es2017 #2370

Merged
merged 4 commits into from
May 3, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/spotty-hornets-hug.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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', '20.x']
yarn-version: ['1.22.19', '3.5.0']
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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', '20.x']

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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', '20.x']

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = (api) => {
{
targets: {
// TODO: can we get this to read from package.json somehow..?
node: '14',
node: '16',
},
},
],
Expand Down
9 changes: 4 additions & 5 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-modular-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-modular-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/modular-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/modular-scripts/src/__tests__/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/modular-scripts/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/modular-scripts/src/test/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/modular-scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2016",
"target": "es2017",
"downlevelIteration": true,
"lib": ["dom", "dom.iterable", "esnext", "WebWorker"],
"allowJs": true,
Expand Down