From 4ec116512e7985d6187a75da400428da81d40849 Mon Sep 17 00:00:00 2001 From: Jacob Pihl Date: Wed, 23 Oct 2024 15:31:31 +0200 Subject: [PATCH 1/3] Uprade node to v20 LTS --- .nvmrc | 2 +- docker-compose.yml | 2 +- package.json | 2 +- yarn.lock | 14 +++++++++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.nvmrc b/.nvmrc index d1c51cd98..9a2a0e219 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16.14.2 \ No newline at end of file +v20 diff --git a/docker-compose.yml b/docker-compose.yml index 37d5471c0..153baf5c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: node: # Remember to keep version updated with the .nvmrc file. # The .nvmrc file is used in Github Actions and for "dockerless" development. - image: node:16.14.2 + image: node:20 user: node init: true working_dir: /home/node/app diff --git a/package.json b/package.json index 231c3341b..f680e3807 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@testing-library/react": "^12.1.5", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.13", - "@types/node": "^16.0.0", + "@types/node": "^20.0.0", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "@types/react-helmet": "^6.1.11", diff --git a/yarn.lock b/yarn.lock index a67f4dc2a..c37a41165 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3091,11 +3091,18 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.3.tgz#463fc47f13ec0688a33aec75d078a0541a447199" integrity sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ== -"@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^16.0.0": +"@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0": version "16.11.43" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.43.tgz#555e5a743f76b6b897d47f945305b618525ddbe6" integrity sha512-GqWykok+3uocgfAJM8imbozrqLnPyTrpFlrryURQlw1EesPUCx5XxTiucWDSFF9/NUEXDuD4bnvHm8xfVGWTpQ== +"@types/node@^20.8.9": + version "20.16.15" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.15.tgz#826f97ca53a213d190124ca6a972206f06a88b69" + integrity sha512-DV58qQz9dBMqVVn+qnKwGa51QzCD4YM/tQM16qLKxdf5tqz5W4QwtrMzjSTbabN1cFTSuyxVYBy+QWHjWW8X/g== + dependencies: + undici-types "~6.19.2" + "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -16035,6 +16042,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + unfetch@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" From 5bec709210287a8442ca80a83b4f5d67d840cbdc Mon Sep 17 00:00:00 2001 From: Jacob Pihl Date: Wed, 23 Oct 2024 15:33:52 +0200 Subject: [PATCH 2/3] Temporary OpenSSL workaround Due to a change in the OpenSSL API in Node 17, storybook fails to run without openssl-legacy-provider. This can be omitted by upgrading Storybook to version 7 or higher. https://github.com/storybookjs/storybook/issues/19692#issuecomment-1297542268 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f680e3807..22902c81a 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.1.0", "repository": "https://github.com/danskernesdigitalebibliotek/dpl-design-system", "scripts": { - "storybook": "start-storybook -p 6006 -s public", - "storybook:axe": "build-storybook && axe-storybook", - "build-storybook": "build-storybook -s public", + "storybook": "NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006 -s public", + "storybook:axe": "NODE_OPTIONS=--openssl-legacy-provider build-storybook && axe-storybook", + "build-storybook": "NODE_OPTIONS=--openssl-legacy-provider build-storybook -s public", "js:eslint": "eslint 'src/**/*.{js,ts,tsx}' --max-warnings=0", "js:prettier": "prettier 'src/**/*.{js,ts,tsx}'", "js:lint": "concurrently 'yarn:js:eslint' 'yarn:js:prettier -- --check' --raw", From b435a3f024bf27f7172a3cac74fb7eda729c8956 Mon Sep 17 00:00:00 2001 From: Jacob Pihl Date: Wed, 23 Oct 2024 15:39:47 +0200 Subject: [PATCH 3/3] Update yarn.lock --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index c37a41165..cbc0f0361 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3096,7 +3096,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.43.tgz#555e5a743f76b6b897d47f945305b618525ddbe6" integrity sha512-GqWykok+3uocgfAJM8imbozrqLnPyTrpFlrryURQlw1EesPUCx5XxTiucWDSFF9/NUEXDuD4bnvHm8xfVGWTpQ== -"@types/node@^20.8.9": +"@types/node@^20.0.0": version "20.16.15" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.15.tgz#826f97ca53a213d190124ca6a972206f06a88b69" integrity sha512-DV58qQz9dBMqVVn+qnKwGa51QzCD4YM/tQM16qLKxdf5tqz5W4QwtrMzjSTbabN1cFTSuyxVYBy+QWHjWW8X/g==