Skip to content

Commit

Permalink
fix(deps): upgrade rollup 4.22.4+ to ensure avoiding XSS (#18180)
Browse files Browse the repository at this point in the history
Co-authored-by: Sholom Aber <[email protected]>
  • Loading branch information
delihiros and SholomAber authored Sep 30, 2024
1 parent a44b0a2 commit ea1d0b9
Show file tree
Hide file tree
Showing 4 changed files with 446 additions and 445 deletions.
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

0 comments on commit ea1d0b9

Please sign in to comment.