Skip to content

Commit ea1d0b9

Browse files
fix(deps): upgrade rollup 4.22.4+ to ensure avoiding XSS (#18180)
Co-authored-by: Sholom Aber <SholomAber@users.noreply.github.com>
1 parent a44b0a2 commit ea1d0b9

File tree

4 files changed

+446
-445
lines changed

4 files changed

+446
-445
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"playwright-chromium": "^1.47.2",
6969
"prettier": "3.3.3",
7070
"rimraf": "^5.0.10",
71-
"rollup": "^4.20.0",
71+
"rollup": "^4.22.5",
7272
"rollup-plugin-esbuild": "^6.1.1",
7373
"simple-git-hooks": "^2.11.1",
7474
"tslib": "^2.7.0",

packages/vite/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"dependencies": {
8888
"esbuild": "^0.24.0",
8989
"postcss": "^8.4.47",
90-
"rollup": "^4.20.0"
90+
"rollup": "^4.22.5"
9191
},
9292
"optionalDependencies": {
9393
"fsevents": "~2.3.3"

packages/vite/src/node/plugins/importAnalysis.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type { StaticImport } from 'mlly'
1313
import { ESM_STATIC_IMPORT_RE, parseStaticImport } from 'mlly'
1414
import { makeLegalIdentifier } from '@rollup/pluginutils'
1515
import type { PartialResolvedId } from 'rollup'
16+
import type { Identifier } from 'estree'
1617
import {
1718
CLIENT_DIR,
1819
CLIENT_PUBLIC_PATH,
@@ -984,7 +985,7 @@ export function transformCjsImport(
984985
) {
985986
// for ExportSpecifier, local name is same as imported name
986987
// prefix the variable name to avoid clashing with other local variables
987-
const importedName = spec.local.name
988+
const importedName = (spec.local as Identifier).name
988989
// we want to specify exported name as variable and re-export it
989990
const exportedName = spec.exported.name
990991
if (exportedName === 'default') {

0 commit comments

Comments
 (0)