Skip to content

Commit

Permalink
chore(deps): upgrade to node v20 (#536)
Browse files Browse the repository at this point in the history
- node v14 is EoL and has been [since April 2023](https://github.com/nodejs/Release/blob/68840fae8fdaa59bf9431661238dbb86b4390829/README.md?plain=1#L7)
- node v20 is the [current LTS version](https://github.com/nodejs/Release/blob/9cf9c6ed8178e88c74dfa1921a793701e1d162c4/README.md?plain=1#L8)

- due to an old version of Storybook / Webpack, we have to run all Storybook scripts with `NODE_OPTIONS='--openssl-legacy-provider'`
  - this must be used if we use newer versions of node without upgrading Storybook + Webpack
    - unfortunately, upgrading Storybook is significantly easier said than done, especially since there are 3 different Storybook builds in this repo (v1, v2, and `antd`)
      - so put that off for now (or ever? since this repo is not maintained much anymore)
  - note that this is an insecure run-time configuration (which is why it was deprecated and is legacy), but since it is only used in development, it's not a significant vulnerability

Signed-off-by: Anton Gilgur <[email protected]>
  • Loading branch information
agilgur5 authored Jun 3, 2024
1 parent 4836620 commit af33af0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
v20
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"antd"
],
"scripts": {
"build": "build-storybook -o ./dist/storybook",
"build": "NODE_OPTIONS='--openssl-legacy-provider' build-storybook -o ./dist/storybook",
"lint": "eslint --ext .tsx .",
"test": "jest",
"utils:icons": "rm -f src/assets/fonts/* && node ./scripts/icons/generator.js",
"start": "start-storybook -p 6006",
"start-v2": "start-storybook -c ./v2/.storybook -s ./v2/.storybook/images -p 6006",
"build-v2": "build-storybook -o ./dist/storybook-v2 -c ./v2/.storybook",
"start-antd": "start-storybook -c antd/.storybook -s antd/.storybook/images -p 6006",
"start": "NODE_OPTIONS='--openssl-legacy-provider' start-storybook -p 6006",
"start-v2": "NODE_OPTIONS='--openssl-legacy-provider' start-storybook -c ./v2/.storybook -s ./v2/.storybook/images -p 6006",
"build-v2": "NODE_OPTIONS='--openssl-legacy-provider' build-storybook -o ./dist/storybook-v2 -c ./v2/.storybook",
"start-antd": "NODE_OPTIONS='--openssl-legacy-provider' start-storybook -c antd/.storybook -s antd/.storybook/images -p 6006",
"compile-less-antd": "gulp compileLess"
},
"dependencies": {
Expand Down

0 comments on commit af33af0

Please sign in to comment.