Skip to content

Commit

Permalink
Upgrade to Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
frosas committed Apr 11, 2024
1 parent 80f814e commit b6a2954
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.1.0
v20.11.1
6 changes: 6 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
## Should

- Remove NODE_OPTIONS=--openssl-legacy-provider once I stop using the current webpack version

## Could

- Store pings in the local storage
52 changes: 43 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
"dev-lint-typescript": "npm run lint-typescript -- --watch --preserveWatchOutput --pretty",
"dev-test-unit": "onchange -ki 'src/**/*.js' -- npm run test-unit",
"prepare": "husky install",
"webpack": "npm run babel-node -- node_modules/.bin/webpack",
"webpack": "NODE_OPTIONS=--openssl-legacy-provider npm run babel-node -- node_modules/.bin/webpack",
"webpack-analyze": "FILE=`mktemp -t stats` && npm run -s webpack -- --mode production --profile --json > $FILE && npx webpack-bundle-analyzer $FILE dist/browser",
"webpack-dev-server": "npm run babel-node -- node_modules/.bin/webpack serve --mode development"
"webpack-dev-server": "npm run webpack -- serve --mode development"
},
"engines": {
"node": "^20.11.1"
},
"devDependencies": {
"@babel/core": "^7.14.5",
Expand All @@ -29,14 +32,15 @@
"@babel/preset-typescript": "^7.14.5",
"@frosas/eslint-config": "^5.0.0",
"@sentry/browser": "^6.19.7",
"@tsconfig/node20": "^20.1.4",
"@types/babel__core": "^7.1.14",
"@types/chai": "^4.2.18",
"@types/copy-webpack-plugin": "~6.4.1",
"@types/d3-scale": "^4.0.1",
"@types/html-webpack-plugin": "^3.2.5",
"@types/mini-css-extract-plugin": "1.2",
"@types/mocha": "^9.0.0",
"@types/node": "^16.18.96",
"@types/node": "^20.12.7",
"@types/react": "^17.0.11",
"@types/react-dom": "^17.0.7",
"@types/webpack-dev-server": "^3.11.4",
Expand Down
30 changes: 8 additions & 22 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
// See https://www.typescriptlang.org/v2/en/tsconfig

{
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"allowJs": true,

"checkJs": true,

// Aim for the latest ES version. Babel will take care of transpiling to the
"checkJs": true, // Aim for the latest ES version. Babel will take care of transpiling to the
// final targets.
"target": "esnext",

// Enables webpack tree-shaking (?) and code splitting
"module": "esnext",

// Let Babel do it
"target": "esnext", // Enables webpack tree-shaking (?) and code splitting
"module": "esnext", // Let Babel do it
"jsx": "preserve",

"moduleResolution": "node",

// Allow importing defaults from non-ES modules
"moduleResolution": "node", // Allow importing defaults from non-ES modules
"esModuleInterop": true,

"sourceMap": true,

// Disallow features that require cross-file information for emit
"sourceMap": true, // Disallow features that require cross-file information for emit
"isolatedModules": true,

"strict": true,

"noEmit": true
"noEmit": true,
"lib": ["dom"]
},
"exclude": ["node_modules", "dist"]
}

0 comments on commit b6a2954

Please sign in to comment.