From af33af0030cde0f6ffd9f6506c152d18848d13e5 Mon Sep 17 00:00:00 2001 From: Anton Gilgur <4970083+agilgur5@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:55:21 -0400 Subject: [PATCH] chore(deps): upgrade to node v20 (#536) - 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 --- .nvmrc | 2 +- package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.nvmrc b/.nvmrc index 958b5a36..9a2a0e21 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v14 +v20 diff --git a/package.json b/package.json index 53645a69..b759a642 100644 --- a/package.json +++ b/package.json @@ -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": {