From bbb18747499dfc9aeb39edfacf6d341c64f6e1e4 Mon Sep 17 00:00:00 2001 From: Johnson Chen Date: Sun, 12 Oct 2025 21:58:47 +0800 Subject: [PATCH] chore: upgrade happy-dom to version 20.0.0 for security --- package.json | 2 +- pnpm-lock.yaml | 61 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 33a2b02..dd4c187 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "eslint-plugin-pinia": "^0.4.1", "eslint-plugin-vue": "^10.1.0", "globals": "^16.2.0", - "happy-dom": "^17.6.3", + "happy-dom": "^20.0.0", "postcss": "8.5.3", "tailwindcss": "3.3.3", "tailwindcss-animate": "^1.0.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a03db25..26eef98 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: version: 6.0.1(vite@7.1.5(@types/node@22.12.0)(jiti@2.4.2)(yaml@2.6.1))(vue@3.5.13(typescript@5.7.2)) '@vitest/eslint-plugin': specifier: ^1.2.1 - version: 1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2)(vitest@3.1.4(@types/node@22.12.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1)) + version: 1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2)(vitest@3.1.4(@types/node@22.12.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1)) '@vue/eslint-config-typescript': specifier: ^14.5.0 version: 14.5.0(eslint-plugin-vue@10.1.0(eslint@9.27.0(jiti@2.4.2))(vue-eslint-parser@10.1.3(eslint@9.27.0(jiti@2.4.2))))(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2) @@ -148,8 +148,8 @@ importers: specifier: ^16.2.0 version: 16.2.0 happy-dom: - specifier: ^17.6.3 - version: 17.6.3 + specifier: ^20.0.0 + version: 20.0.0 postcss: specifier: 8.5.3 version: 8.5.3 @@ -182,7 +182,7 @@ importers: version: 0.24.0(rollup@4.46.2)(vite@7.1.5(@types/node@22.12.0)(jiti@2.4.2)(yaml@2.6.1)) vitest: specifier: ^3.1.4 - version: 3.1.4(@types/node@22.12.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) + version: 3.1.4(@types/node@22.12.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) vue-tsc: specifier: ^2.2.8 version: 2.2.8(typescript@5.7.2) @@ -228,7 +228,7 @@ importers: version: 5.2.4(vite@6.3.5(@types/node@22.15.32)(jiti@2.4.2)(yaml@2.6.1))(vue@3.5.13(typescript@5.8.3)) '@vitest/eslint-plugin': specifier: ^1.1.39 - version: 1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.4(@types/node@22.15.32)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1)) + version: 1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.4(@types/node@22.15.32)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1)) '@vue/eslint-config-prettier': specifier: ^10.2.0 version: 10.2.0(eslint@9.27.0(jiti@2.4.2))(prettier@3.5.3) @@ -294,7 +294,7 @@ importers: version: 7.7.7(@nuxt/kit@3.15.2(rollup@4.46.2))(rollup@4.46.2)(vite@6.3.5(@types/node@22.15.32)(jiti@2.4.2)(yaml@2.6.1))(vue@3.5.13(typescript@5.8.3)) vitest: specifier: ^3.1.1 - version: 3.1.4(@types/node@22.15.32)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) + version: 3.1.4(@types/node@22.15.32)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) vue-tsc: specifier: ^2.2.8 version: 2.2.8(typescript@5.8.3) @@ -310,7 +310,7 @@ importers: version: 24.3.0 '@vitest/eslint-plugin': specifier: ^1.1.10 - version: 1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/node@24.3.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1)) + version: 1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/node@24.3.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1)) eslint: specifier: ^9.15.0 version: 9.27.0(jiti@2.4.2) @@ -334,7 +334,7 @@ importers: version: 4.5.4(@types/node@24.3.0)(rollup@4.46.2)(typescript@5.8.3)(vite@7.1.2(@types/node@24.3.0)(jiti@2.4.2)(yaml@2.6.1)) vitest: specifier: ^3.2.4 - version: 3.2.4(@types/node@24.3.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) + version: 3.2.4(@types/node@24.3.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) packages: @@ -1656,6 +1656,9 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/node@20.19.21': + resolution: {integrity: sha512-CsGG2P3I5y48RPMfprQGfy4JPRZ6csfC3ltBZSRItG3ngggmNY/qs2uZKp4p9VbrpqNNSMzUZNFZKzgOGnd/VA==} + '@types/node@22.12.0': resolution: {integrity: sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==} @@ -1677,6 +1680,9 @@ packages: '@types/web-bluetooth@0.0.21': resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + '@types/whatwg-mimetype@3.0.2': + resolution: {integrity: sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA==} + '@typescript-eslint/eslint-plugin@8.33.0': resolution: {integrity: sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2908,8 +2914,8 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - happy-dom@17.6.3: - resolution: {integrity: sha512-UVIHeVhxmxedbWPCfgS55Jg2rDfwf2BCKeylcPSqazLz5w3Kri7Q4xdBJubsr/+VUzFLh0VjIvh13RaDA2/Xug==} + happy-dom@20.0.0: + resolution: {integrity: sha512-GkWnwIFxVGCf2raNrxImLo397RdGhLapj5cT3R2PT7FwL62Ze1DROhzmYW7+J3p9105DYMVenEejEbnq5wA37w==} engines: {node: '>=20.0.0'} has-flag@4.0.0: @@ -6145,6 +6151,10 @@ snapshots: '@types/json-schema@7.0.15': {} + '@types/node@20.19.21': + dependencies: + undici-types: 6.21.0 + '@types/node@22.12.0': dependencies: undici-types: 6.20.0 @@ -6167,6 +6177,8 @@ snapshots: '@types/web-bluetooth@0.0.21': {} + '@types/whatwg-mimetype@3.0.2': {} + '@typescript-eslint/eslint-plugin@8.33.0(@typescript-eslint/parser@8.33.0(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -6358,33 +6370,33 @@ snapshots: vite: 7.1.5(@types/node@22.12.0)(jiti@2.4.2)(yaml@2.6.1) vue: 3.5.13(typescript@5.7.2) - '@vitest/eslint-plugin@1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2)(vitest@3.1.4(@types/node@22.12.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1))': + '@vitest/eslint-plugin@1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2)(vitest@3.1.4(@types/node@22.12.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1))': dependencies: '@typescript-eslint/utils': 8.33.0(eslint@9.27.0(jiti@2.4.2))(typescript@5.7.2) eslint: 9.27.0(jiti@2.4.2) optionalDependencies: typescript: 5.7.2 - vitest: 3.1.4(@types/node@22.12.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) + vitest: 3.1.4(@types/node@22.12.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.4(@types/node@22.15.32)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1))': + '@vitest/eslint-plugin@1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.1.4(@types/node@22.15.32)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1))': dependencies: '@typescript-eslint/utils': 8.33.0(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3) eslint: 9.27.0(jiti@2.4.2) optionalDependencies: typescript: 5.8.3 - vitest: 3.1.4(@types/node@22.15.32)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) + vitest: 3.1.4(@types/node@22.15.32)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/node@24.3.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1))': + '@vitest/eslint-plugin@1.2.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/node@24.3.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1))': dependencies: '@typescript-eslint/utils': 8.33.0(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3) eslint: 9.27.0(jiti@2.4.2) optionalDependencies: typescript: 5.8.3 - vitest: 3.2.4(@types/node@24.3.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) + vitest: 3.2.4(@types/node@24.3.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1) transitivePeerDependencies: - supports-color @@ -7847,9 +7859,10 @@ snapshots: graphemer@1.4.0: {} - happy-dom@17.6.3: + happy-dom@20.0.0: dependencies: - webidl-conversions: 7.0.0 + '@types/node': 20.19.21 + '@types/whatwg-mimetype': 3.0.2 whatwg-mimetype: 3.0.0 has-flag@4.0.0: {} @@ -9673,7 +9686,7 @@ snapshots: jiti: 2.4.2 yaml: 2.6.1 - vitest@3.1.4(@types/node@22.12.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1): + vitest@3.1.4(@types/node@22.12.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1): dependencies: '@vitest/expect': 3.1.4 '@vitest/mocker': 3.1.4(vite@6.3.5(@types/node@22.12.0)(jiti@2.4.2)(yaml@2.6.1)) @@ -9698,7 +9711,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.12.0 - happy-dom: 17.6.3 + happy-dom: 20.0.0 jsdom: 26.1.0 transitivePeerDependencies: - jiti @@ -9714,7 +9727,7 @@ snapshots: - tsx - yaml - vitest@3.1.4(@types/node@22.15.32)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1): + vitest@3.1.4(@types/node@22.15.32)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1): dependencies: '@vitest/expect': 3.1.4 '@vitest/mocker': 3.1.4(vite@6.3.5(@types/node@22.15.32)(jiti@2.4.2)(yaml@2.6.1)) @@ -9739,7 +9752,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.15.32 - happy-dom: 17.6.3 + happy-dom: 20.0.0 jsdom: 26.1.0 transitivePeerDependencies: - jiti @@ -9755,7 +9768,7 @@ snapshots: - tsx - yaml - vitest@3.2.4(@types/node@24.3.0)(happy-dom@17.6.3)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1): + vitest@3.2.4(@types/node@24.3.0)(happy-dom@20.0.0)(jiti@2.4.2)(jsdom@26.1.0)(yaml@2.6.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 @@ -9782,7 +9795,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.3.0 - happy-dom: 17.6.3 + happy-dom: 20.0.0 jsdom: 26.1.0 transitivePeerDependencies: - jiti