diff --git a/package.json b/package.json index f15f5aee17362086ff646c47769dab31c0197417..8d46accc33dafe7eccf26912cc9ea7fe275742d5 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@types/jest": "^27.0.0", "@types/node": "^17.0.31", "@typescript-eslint/parser": "^5.14.0", - "@vitejs/plugin-vue": "^2.3.2", + "@vitejs/plugin-vue": "^2.3.3", "@vitejs/plugin-vue-jsx": "^1.3.10", "@vue/compiler-sfc": "3.2.33", "@vue/reactivity": "3.2.33", @@ -87,7 +87,7 @@ "semver": "^7.3.5", "ts-jest": "^27.0.3", "typescript": "4.6.4", - "vite": "^2.9.8", + "vite": "^2.9.9", "vue": "3.2.33", "vue-router": "^4.0.15", "yorkie": "^2.0.0" diff --git a/packages/playground/ssr/package.json b/packages/playground/ssr/package.json index c207b90a7b8b9ff87843502340c32f41307a6c8c..b1b35b50fbd596fab9686211967d19c4a2205194 100644 --- a/packages/playground/ssr/package.json +++ b/packages/playground/ssr/package.json @@ -21,6 +21,6 @@ "compression": "^1.7.4", "cypress": "^7.3.0", "serve-static": "^1.14.1", - "vite": "^2.9.8" + "vite": "^2.9.9" } } diff --git a/packages/uni-app-vite/package.json b/packages/uni-app-vite/package.json index a2864a7655b0646050ca62c817edc34c5296e19a..7389c6205888a822d25f0082ecf7a771a387d30a 100644 --- a/packages/uni-app-vite/package.json +++ b/packages/uni-app-vite/package.json @@ -26,7 +26,7 @@ "@dcloudio/uni-shared": "3.0.0-alpha-3040820220424005", "@dcloudio/uts": "3.0.0-alpha-3040820220424005", "@rollup/pluginutils": "^4.2.0", - "@vitejs/plugin-vue": "^2.3.2", + "@vitejs/plugin-vue": "^2.3.3", "@vue/compiler-dom": "3.2.33", "@vue/compiler-sfc": "3.2.33", "debug": "^4.3.3", @@ -40,7 +40,7 @@ "@vue/compiler-core": "3.2.33", "esbuild": "^0.14.27", "postcss": "^8.4.13", - "vite": "^2.9.8", + "vite": "^2.9.9", "vue": "3.2.33" } } diff --git a/packages/uni-app-vite/src/nvue/plugins/appCss.ts b/packages/uni-app-vite/src/nvue/plugins/appCss.ts index 17a4950e9a1cac7830b13ac20b1efbe51d2c2a3e..13f2da2f2f05dd1beb2fd0c01d057e4ce0d493eb 100644 --- a/packages/uni-app-vite/src/nvue/plugins/appCss.ts +++ b/packages/uni-app-vite/src/nvue/plugins/appCss.ts @@ -2,7 +2,6 @@ import type { Plugin } from 'vite' import type { PluginContext, RollupError } from 'rollup' import path from 'path' import fs from 'fs-extra' -import qs from 'querystring' import { CompilerError, parse, @@ -156,8 +155,8 @@ function attrsToQuery( for (const name in attrs) { const value = attrs[name] if (!ignoreList.includes(name)) { - query += `&${qs.escape(name)}${ - value ? `=${qs.escape(String(value))}` : `` + query += `&${encodeURIComponent(name)}${ + value ? `=${encodeURIComponent(value)}` : `` }` } } diff --git a/packages/uni-cli-shared/src/vite/utils/url.ts b/packages/uni-cli-shared/src/vite/utils/url.ts index 3eee3087ee38f4a045e99c04d5f53543e3358686..b204abd56c6cffa4dd92bbeb86c5c310c70fa280 100644 --- a/packages/uni-cli-shared/src/vite/utils/url.ts +++ b/packages/uni-cli-shared/src/vite/utils/url.ts @@ -1,5 +1,4 @@ import path from 'path' -import qs from 'querystring' import { EXTNAME_JS_RE, EXTNAME_VUE } from '../../constants' export interface VueQuery { @@ -13,7 +12,7 @@ export interface VueQuery { export function parseVueRequest(id: string) { const [filename, rawQuery] = id.split(`?`, 2) - const query = qs.parse(rawQuery) as VueQuery + const query = Object.fromEntries(new URLSearchParams(rawQuery)) as VueQuery if (query.vue != null) { query.vue = true } diff --git a/packages/vite-plugin-uni/package.json b/packages/vite-plugin-uni/package.json index 5762b37d5f0bc6e60377025b7f3715cddf552a86..f5f07adb8e70171a12ae61b165a67d3c20d15443 100644 --- a/packages/vite-plugin-uni/package.json +++ b/packages/vite-plugin-uni/package.json @@ -29,7 +29,7 @@ "@dcloudio/uni-shared": "3.0.0-alpha-3040820220424005", "@rollup/pluginutils": "^4.2.0", "@vitejs/plugin-legacy": "^1.8.2", - "@vitejs/plugin-vue": "^2.3.2", + "@vitejs/plugin-vue": "^2.3.3", "@vitejs/plugin-vue-jsx": "^1.3.10", "@vue/compiler-core": "3.2.33", "@vue/compiler-dom": "3.2.33", @@ -52,11 +52,11 @@ "@types/sass": "^1.16.0", "@vue/babel-plugin-jsx": "^1.1.1", "chokidar": "^3.5.3", - "vite": "^2.9.8", + "vite": "^2.9.9", "vue": "3.2.33" }, "peerDependencies": { - "vite": "^2.9.8" + "vite": "^2.9.9" }, "uni-app": { "compilerVersion": "3.4.8" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b488f836b61075b4ee392f17e34ee791bf36ead..95ff224c2510ae1b472f64274e687bd6424e8126 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,7 +21,7 @@ importers: '@types/jest': ^27.0.0 '@types/node': ^17.0.31 '@typescript-eslint/parser': ^5.14.0 - '@vitejs/plugin-vue': ^2.3.2 + '@vitejs/plugin-vue': ^2.3.3 '@vitejs/plugin-vue-jsx': ^1.3.10 '@vue/compiler-sfc': 3.2.33 '@vue/reactivity': 3.2.33 @@ -50,7 +50,7 @@ importers: semver: ^7.3.5 ts-jest: ^27.0.3 typescript: 4.6.4 - vite: ^2.9.8 + vite: ^2.9.9 vue: 3.2.33 vue-router: ^4.0.15 yorkie: ^2.0.0 @@ -72,7 +72,7 @@ importers: '@types/jest': 27.5.0 '@types/node': 17.0.31 '@typescript-eslint/parser': 5.22.0_e4zyhrvfnqudwdx5bevnvkluy4 - '@vitejs/plugin-vue': 2.3.2_vite@2.9.8+vue@3.2.33 + '@vitejs/plugin-vue': 2.3.3_vite@2.9.9+vue@3.2.33 '@vitejs/plugin-vue-jsx': 1.3.10 '@vue/compiler-sfc': 3.2.33 '@vue/reactivity': 3.2.33 @@ -101,7 +101,7 @@ importers: semver: 7.3.7 ts-jest: 27.1.4_nnrehbtdwi4vovimszixfn4hgm typescript: 4.6.4 - vite: 2.9.8 + vite: 2.9.9 vue: 3.2.33 vue-router: 4.0.15_vue@3.2.33 yorkie: 2.0.0 @@ -115,7 +115,7 @@ importers: compression: ^1.7.4 cypress: ^7.3.0 serve-static: ^1.14.1 - vite: ^2.9.8 + vite: ^2.9.9 vue: 3.2.33 vue-router: ^4.0.15 vuex: ^4.0.2 @@ -131,7 +131,7 @@ importers: compression: 1.7.4 cypress: 7.7.0 serve-static: 1.15.0 - vite: 2.9.8 + vite: 2.9.9 packages/size-check: specifiers: @@ -215,7 +215,7 @@ importers: '@rollup/pluginutils': ^4.2.0 '@types/debug': ^4.1.7 '@types/fs-extra': ^9.0.13 - '@vitejs/plugin-vue': ^2.3.2 + '@vitejs/plugin-vue': ^2.3.3 '@vue/compiler-core': 3.2.33 '@vue/compiler-dom': 3.2.33 '@vue/compiler-sfc': 3.2.33 @@ -225,7 +225,7 @@ importers: picocolors: ^1.0.0 postcss: ^8.4.13 rollup: ^2.59.0 - vite: ^2.9.8 + vite: ^2.9.9 vue: 3.2.33 dependencies: '@dcloudio/uni-cli-shared': link:../uni-cli-shared @@ -234,7 +234,7 @@ importers: '@dcloudio/uni-shared': link:../uni-shared '@dcloudio/uts': link:../uts '@rollup/pluginutils': 4.2.1 - '@vitejs/plugin-vue': 2.3.2_vite@2.9.8+vue@3.2.33 + '@vitejs/plugin-vue': 2.3.3_vite@2.9.9+vue@3.2.33 '@vue/compiler-dom': 3.2.33 '@vue/compiler-sfc': 3.2.33 debug: 4.3.4 @@ -247,7 +247,7 @@ importers: '@vue/compiler-core': 3.2.33 esbuild: 0.14.38 postcss: 8.4.13 - vite: 2.9.8 + vite: 2.9.9 vue: 3.2.33 packages/uni-app-vue: @@ -829,7 +829,7 @@ importers: '@types/fs-extra': ^9.0.13 '@types/sass': ^1.16.0 '@vitejs/plugin-legacy': ^1.8.2 - '@vitejs/plugin-vue': ^2.3.2 + '@vitejs/plugin-vue': ^2.3.3 '@vitejs/plugin-vue-jsx': ^1.3.10 '@vue/babel-plugin-jsx': ^1.1.1 '@vue/compiler-core': 3.2.33 @@ -845,7 +845,7 @@ importers: hash-sum: ^2.0.0 jsonc-parser: ^3.0.0 picocolors: ^1.0.0 - vite: ^2.9.8 + vite: ^2.9.9 vue: 3.2.33 dependencies: '@babel/core': 7.17.10 @@ -854,8 +854,8 @@ importers: '@dcloudio/uni-cli-shared': link:../uni-cli-shared '@dcloudio/uni-shared': link:../uni-shared '@rollup/pluginutils': 4.2.1 - '@vitejs/plugin-legacy': 1.8.2_vite@2.9.8 - '@vitejs/plugin-vue': 2.3.2_vite@2.9.8+vue@3.2.33 + '@vitejs/plugin-legacy': 1.8.2_vite@2.9.9 + '@vitejs/plugin-vue': 2.3.3_vite@2.9.9+vue@3.2.33 '@vitejs/plugin-vue-jsx': 1.3.10 '@vue/compiler-core': 3.2.33 '@vue/compiler-dom': 3.2.33 @@ -877,7 +877,7 @@ importers: '@types/sass': 1.43.1 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.17.10 chokidar: 3.5.3 - vite: 2.9.8 + vite: 2.9.9 vue: 3.2.33 packages: @@ -2933,7 +2933,7 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@vitejs/plugin-legacy/1.8.2_vite@2.9.8: + /@vitejs/plugin-legacy/1.8.2_vite@2.9.9: resolution: {integrity: sha512-NCOKU+pU+cxLMR9P9RTolEuOK+h+zYBXlknj+zGcKSj/NXBZYgA1GAH1FnO4zijoWRiTaiOm2ha9LQrELE7XHg==} engines: {node: '>=12.0.0'} peerDependencies: @@ -2944,7 +2944,7 @@ packages: magic-string: 0.26.1 regenerator-runtime: 0.13.9 systemjs: 6.12.1 - vite: 2.9.8 + vite: 2.9.9 dev: false /@vitejs/plugin-vue-jsx/1.3.10: @@ -2960,14 +2960,14 @@ packages: transitivePeerDependencies: - supports-color - /@vitejs/plugin-vue/2.3.2_vite@2.9.8+vue@3.2.33: - resolution: {integrity: sha512-umyypfSHS4kQLdYAnJHhaASq7FRzNCdvcRoQ3uYGNk1/M4a+hXUd7ysN7BLhCrWH6uBokyCkFeUAaFDzSaaSrQ==} + /@vitejs/plugin-vue/2.3.3_vite@2.9.9+vue@3.2.33: + resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==} engines: {node: '>=12.0.0'} peerDependencies: vite: ^2.5.10 vue: ^3.2.25 dependencies: - vite: 2.9.8 + vite: 2.9.9 vue: 3.2.33 /@vue/babel-helper-vue-transform-on/1.0.2: @@ -8131,8 +8131,8 @@ packages: extsprintf: 1.3.0 dev: true - /vite/2.9.8: - resolution: {integrity: sha512-zsBGwn5UT3YS0NLSJ7hnR54+vUKfgzMUh/Z9CxF1YKEBVIe213+63jrFLmZphgGI5zXwQCSmqIdbPuE8NJywPw==} + /vite/2.9.9: + resolution: {integrity: sha512-ffaam+NgHfbEmfw/Vuh6BHKKlI/XIAhxE5QSS7gFLIngxg171mg1P3a4LSRME0z2ZU1ScxoKzphkipcYwSD5Ew==} engines: {node: '>=12.2.0'} hasBin: true peerDependencies: