Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): upgrade rollup 4.22.4+ to ensure avoiding XSS #18180

Merged
merged 8 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"playwright-chromium": "^1.47.2",
"prettier": "3.3.3",
"rimraf": "^5.0.10",
"rollup": "^4.20.0",
"rollup": "^4.22.5",
"rollup-plugin-esbuild": "^6.1.1",
"simple-git-hooks": "^2.11.1",
"tslib": "^2.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"dependencies": {
"esbuild": "^0.24.0",
"postcss": "^8.4.47",
"rollup": "^4.20.0"
"rollup": "^4.22.5"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
Expand Down
3 changes: 2 additions & 1 deletion packages/vite/src/node/plugins/importAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { StaticImport } from 'mlly'
import { ESM_STATIC_IMPORT_RE, parseStaticImport } from 'mlly'
import { makeLegalIdentifier } from '@rollup/pluginutils'
import type { PartialResolvedId } from 'rollup'
import type { Identifier } from 'estree'
import {
CLIENT_DIR,
CLIENT_PUBLIC_PATH,
Expand Down Expand Up @@ -984,7 +985,7 @@ export function transformCjsImport(
) {
// for ExportSpecifier, local name is same as imported name
// prefix the variable name to avoid clashing with other local variables
const importedName = spec.local.name
const importedName = (spec.local as Identifier).name
// we want to specify exported name as variable and re-export it
const exportedName = spec.exported.name
if (exportedName === 'default') {
Expand Down
Loading