rollup 4.9.0 → 4.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/bin/rollup +2 -2
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +33 -28
- package/dist/es/shared/parseAst.js +2 -2
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +33 -28
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +33 -33
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
<a href="https://www.npmjs.com/package/rollup">
|
|
7
7
|
<img src="https://img.shields.io/npm/v/rollup.svg" alt="npm version" >
|
|
8
8
|
</a>
|
|
9
|
+
<a href="https://nodejs.org/en/about/previous-releases">
|
|
10
|
+
<img src="https://img.shields.io/node/v/rollup.svg" alt="node compatibility">
|
|
11
|
+
</a>
|
|
9
12
|
<a href="https://packagephobia.now.sh/result?p=rollup">
|
|
10
13
|
<img src="https://packagephobia.now.sh/badge?p=rollup" alt="install size" >
|
|
11
14
|
</a>
|
|
@@ -13,7 +16,7 @@
|
|
|
13
16
|
<img src="https://codecov.io/gh/rollup/rollup/graph/badge.svg" alt="code coverage" >
|
|
14
17
|
</a>
|
|
15
18
|
<a href="#backers" alt="sponsors on Open Collective">
|
|
16
|
-
|
|
19
|
+
<img src="https://opencollective.com/rollup/backers/badge.svg" alt="backers" >
|
|
17
20
|
</a>
|
|
18
21
|
<a href="#sponsors" alt="Sponsors on Open Collective">
|
|
19
22
|
<img src="https://opencollective.com/rollup/sponsors/badge.svg" alt="sponsors" >
|
|
@@ -21,7 +24,6 @@
|
|
|
21
24
|
<a href="https://github.com/rollup/rollup/blob/master/LICENSE.md">
|
|
22
25
|
<img src="https://img.shields.io/npm/l/rollup.svg" alt="license">
|
|
23
26
|
</a>
|
|
24
|
-
|
|
25
27
|
<a href='https://is.gd/rollup_chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge'>
|
|
26
28
|
<img src='https://img.shields.io/discord/466787075518365708?color=778cd1&label=chat' alt='Join the chat at https://is.gd/rollup_chat'>
|
|
27
29
|
</a>
|
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.9.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.9.2
|
|
5
|
+
Sat, 30 Dec 2023 06:23:00 GMT - commit 347a34745b2679c1192535db3c0f60889861d3ad
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
package/dist/es/getLogFilter.js
CHANGED
package/dist/es/parseAst.js
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.9.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.9.2
|
|
4
|
+
Sat, 30 Dec 2023 06:23:00 GMT - commit 347a34745b2679c1192535db3c0f60889861d3ad
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { xxhashBase64Url } from '../../native.js';
|
|
|
16
16
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version = "4.9.
|
|
19
|
+
var version = "4.9.2";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -2041,11 +2041,10 @@ const RESERVED_NAMES = new Set([
|
|
|
2041
2041
|
'with',
|
|
2042
2042
|
'yield'
|
|
2043
2043
|
]);
|
|
2044
|
-
const RESERVED_NAMES$1 = RESERVED_NAMES;
|
|
2045
2044
|
|
|
2046
2045
|
const illegalCharacters = /[^\w$]/g;
|
|
2047
2046
|
const startsWithDigit = (value) => /\d/.test(value[0]);
|
|
2048
|
-
const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES
|
|
2047
|
+
const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES.has(value) || value === 'arguments';
|
|
2049
2048
|
function isLegal(value) {
|
|
2050
2049
|
if (needsEscape(value)) {
|
|
2051
2050
|
return false;
|
|
@@ -5780,7 +5779,7 @@ function toBase64(value) {
|
|
|
5780
5779
|
function getSafeName(baseName, usedNames, forbiddenNames) {
|
|
5781
5780
|
let safeName = baseName;
|
|
5782
5781
|
let count = 1;
|
|
5783
|
-
while (usedNames.has(safeName) || RESERVED_NAMES
|
|
5782
|
+
while (usedNames.has(safeName) || RESERVED_NAMES.has(safeName) || forbiddenNames?.has(safeName)) {
|
|
5784
5783
|
safeName = `${baseName}$${toBase64(count++)}`;
|
|
5785
5784
|
}
|
|
5786
5785
|
usedNames.add(safeName);
|
|
@@ -7311,7 +7310,9 @@ class Identifier extends NodeBase {
|
|
|
7311
7310
|
// in the same function or at top level of module
|
|
7312
7311
|
return (this.isTDZAccess = true);
|
|
7313
7312
|
}
|
|
7314
|
-
|
|
7313
|
+
// We ignore the case where the module is not yet executed because
|
|
7314
|
+
// moduleSideEffects are false.
|
|
7315
|
+
if (!this.variable.initReached && this.scope.context.module.isExecuted) {
|
|
7315
7316
|
// Either a const/let TDZ violation or
|
|
7316
7317
|
// var use before declaration was encountered.
|
|
7317
7318
|
return (this.isTDZAccess = true);
|
|
@@ -9597,7 +9598,7 @@ class ExportDefaultDeclaration extends NodeBase {
|
|
|
9597
9598
|
const hasTrailingSemicolon = code.original.charCodeAt(this.end - 1) === 59; /*";"*/
|
|
9598
9599
|
const systemExportNames = format === 'system' && exportNamesByVariable.get(this.variable);
|
|
9599
9600
|
if (systemExportNames) {
|
|
9600
|
-
code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports(
|
|
9601
|
+
code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports(${JSON.stringify(systemExportNames[0])}, `);
|
|
9601
9602
|
code.appendRight(hasTrailingSemicolon ? this.end - 1 : this.end, ')' + (hasTrailingSemicolon ? '' : ';'));
|
|
9602
9603
|
}
|
|
9603
9604
|
else {
|
|
@@ -9802,14 +9803,12 @@ class IfStatement extends NodeBase {
|
|
|
9802
9803
|
const { brokenFlow } = context;
|
|
9803
9804
|
if (this.consequent.hasEffects(context))
|
|
9804
9805
|
return true;
|
|
9805
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
9806
9806
|
const consequentBrokenFlow = context.brokenFlow;
|
|
9807
9807
|
context.brokenFlow = brokenFlow;
|
|
9808
9808
|
if (this.alternate === null)
|
|
9809
9809
|
return false;
|
|
9810
9810
|
if (this.alternate.hasEffects(context))
|
|
9811
9811
|
return true;
|
|
9812
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
9813
9812
|
context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
|
|
9814
9813
|
return false;
|
|
9815
9814
|
}
|
|
@@ -9912,13 +9911,11 @@ class IfStatement extends NodeBase {
|
|
|
9912
9911
|
let consequentBrokenFlow = false;
|
|
9913
9912
|
if (this.consequent.shouldBeIncluded(context)) {
|
|
9914
9913
|
this.consequent.include(context, false, { asSingleStatement: true });
|
|
9915
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
9916
9914
|
consequentBrokenFlow = context.brokenFlow;
|
|
9917
9915
|
context.brokenFlow = brokenFlow;
|
|
9918
9916
|
}
|
|
9919
9917
|
if (this.alternate?.shouldBeIncluded(context)) {
|
|
9920
9918
|
this.alternate.include(context, false, { asSingleStatement: true });
|
|
9921
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
9922
9919
|
context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
|
|
9923
9920
|
}
|
|
9924
9921
|
}
|
|
@@ -10543,26 +10540,34 @@ class ImportSpecifier extends NodeBase {
|
|
|
10543
10540
|
|
|
10544
10541
|
class LabeledStatement extends NodeBase {
|
|
10545
10542
|
hasEffects(context) {
|
|
10546
|
-
const brokenFlow = context
|
|
10543
|
+
const { brokenFlow, includedLabels } = context;
|
|
10547
10544
|
context.ignore.labels.add(this.label.name);
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
context.includedLabels.delete(this.label.name);
|
|
10553
|
-
context.brokenFlow = brokenFlow;
|
|
10545
|
+
context.includedLabels = new Set();
|
|
10546
|
+
let bodyHasEffects = false;
|
|
10547
|
+
if (this.body.hasEffects(context)) {
|
|
10548
|
+
bodyHasEffects = true;
|
|
10554
10549
|
}
|
|
10555
|
-
|
|
10550
|
+
else {
|
|
10551
|
+
context.ignore.labels.delete(this.label.name);
|
|
10552
|
+
if (context.includedLabels.has(this.label.name)) {
|
|
10553
|
+
context.includedLabels.delete(this.label.name);
|
|
10554
|
+
context.brokenFlow = brokenFlow;
|
|
10555
|
+
}
|
|
10556
|
+
}
|
|
10557
|
+
context.includedLabels = new Set([...includedLabels, ...context.includedLabels]);
|
|
10558
|
+
return bodyHasEffects;
|
|
10556
10559
|
}
|
|
10557
10560
|
include(context, includeChildrenRecursively) {
|
|
10558
10561
|
this.included = true;
|
|
10559
|
-
const brokenFlow = context
|
|
10562
|
+
const { brokenFlow, includedLabels } = context;
|
|
10563
|
+
context.includedLabels = new Set();
|
|
10560
10564
|
this.body.include(context, includeChildrenRecursively);
|
|
10561
10565
|
if (includeChildrenRecursively || context.includedLabels.has(this.label.name)) {
|
|
10562
10566
|
this.label.include();
|
|
10563
10567
|
context.includedLabels.delete(this.label.name);
|
|
10564
10568
|
context.brokenFlow = brokenFlow;
|
|
10565
10569
|
}
|
|
10570
|
+
context.includedLabels = new Set([...includedLabels, ...context.includedLabels]);
|
|
10566
10571
|
}
|
|
10567
10572
|
render(code, options) {
|
|
10568
10573
|
if (this.label.included) {
|
|
@@ -11306,7 +11311,6 @@ class SwitchStatement extends NodeBase {
|
|
|
11306
11311
|
for (const switchCase of this.cases) {
|
|
11307
11312
|
if (switchCase.hasEffects(context))
|
|
11308
11313
|
return true;
|
|
11309
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
11310
11314
|
onlyHasBrokenFlow &&= context.brokenFlow && !context.hasBreak;
|
|
11311
11315
|
context.hasBreak = false;
|
|
11312
11316
|
context.brokenFlow = brokenFlow;
|
|
@@ -11338,7 +11342,6 @@ class SwitchStatement extends NodeBase {
|
|
|
11338
11342
|
}
|
|
11339
11343
|
if (isCaseIncluded) {
|
|
11340
11344
|
switchCase.include(context, includeChildrenRecursively);
|
|
11341
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
11342
11345
|
onlyHasBrokenFlow &&= context.brokenFlow && !context.hasBreak;
|
|
11343
11346
|
context.hasBreak = false;
|
|
11344
11347
|
context.brokenFlow = brokenFlow;
|
|
@@ -14198,7 +14201,7 @@ function analyzeDependencies(dependencies, exports, t, { _, cnst, getObject, get
|
|
|
14198
14201
|
}
|
|
14199
14202
|
else {
|
|
14200
14203
|
const [key, value] = reexportedNames[0];
|
|
14201
|
-
setter.push(`exports(
|
|
14204
|
+
setter.push(`exports(${JSON.stringify(key)},${_}${value});`);
|
|
14202
14205
|
}
|
|
14203
14206
|
}
|
|
14204
14207
|
setters.push(setter.join(`${n}${t}${t}${t}`));
|
|
@@ -14228,10 +14231,12 @@ function getExportsBlock(exports, t, { _, n }) {
|
|
|
14228
14231
|
return '';
|
|
14229
14232
|
}
|
|
14230
14233
|
if (exports.length === 1) {
|
|
14231
|
-
return `exports(
|
|
14234
|
+
return `exports(${JSON.stringify(exports[0].name)},${_}${exports[0].value});${n}${n}`;
|
|
14232
14235
|
}
|
|
14233
14236
|
return (`exports({${n}` +
|
|
14234
|
-
exports
|
|
14237
|
+
exports
|
|
14238
|
+
.map(({ name, value }) => `${t}${stringifyObjectKeyIfNeeded(name)}:${_}${value}`)
|
|
14239
|
+
.join(`,${n}`) +
|
|
14235
14240
|
`${n}});${n}${n}`);
|
|
14236
14241
|
}
|
|
14237
14242
|
const getSyntheticExportsBlock = (exports, t, snippets) => getExportsBlock(exports
|
|
@@ -14505,7 +14510,7 @@ function assignExportsToMangledNames(exports, exportsByName, exportNamesByVariab
|
|
|
14505
14510
|
nameIndex += 9 * 64 ** (exportName.length - 1);
|
|
14506
14511
|
exportName = toBase64(nameIndex);
|
|
14507
14512
|
}
|
|
14508
|
-
} while (RESERVED_NAMES
|
|
14513
|
+
} while (RESERVED_NAMES.has(exportName) || exportsByName.has(exportName));
|
|
14509
14514
|
}
|
|
14510
14515
|
exportsByName.set(exportName, variable);
|
|
14511
14516
|
exportNamesByVariable.set(variable, [exportName]);
|
|
@@ -16545,7 +16550,7 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
16545
16550
|
];
|
|
16546
16551
|
const isValidPropertyName = reservedNamesAsProps
|
|
16547
16552
|
? (name) => VALID_IDENTIFIER_REGEXP.test(name)
|
|
16548
|
-
: (name) => !RESERVED_NAMES
|
|
16553
|
+
: (name) => !RESERVED_NAMES.has(name) && VALID_IDENTIFIER_REGEXP.test(name);
|
|
16549
16554
|
return {
|
|
16550
16555
|
_,
|
|
16551
16556
|
cnst,
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/parseAst.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.9.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.9.2
|
|
4
|
+
Sat, 30 Dec 2023 06:23:00 GMT - commit 347a34745b2679c1192535db3c0f60889861d3ad
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
|
|
32
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
33
33
|
|
|
34
|
-
var version = "4.9.
|
|
34
|
+
var version = "4.9.2";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -3487,11 +3487,10 @@ const RESERVED_NAMES = new Set([
|
|
|
3487
3487
|
'with',
|
|
3488
3488
|
'yield'
|
|
3489
3489
|
]);
|
|
3490
|
-
const RESERVED_NAMES$1 = RESERVED_NAMES;
|
|
3491
3490
|
|
|
3492
3491
|
const illegalCharacters = /[^\w$]/g;
|
|
3493
3492
|
const startsWithDigit = (value) => /\d/.test(value[0]);
|
|
3494
|
-
const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES
|
|
3493
|
+
const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES.has(value) || value === 'arguments';
|
|
3495
3494
|
function isLegal(value) {
|
|
3496
3495
|
if (needsEscape(value)) {
|
|
3497
3496
|
return false;
|
|
@@ -7214,7 +7213,7 @@ class ParameterVariable extends LocalVariable {
|
|
|
7214
7213
|
function getSafeName(baseName, usedNames, forbiddenNames) {
|
|
7215
7214
|
let safeName = baseName;
|
|
7216
7215
|
let count = 1;
|
|
7217
|
-
while (usedNames.has(safeName) || RESERVED_NAMES
|
|
7216
|
+
while (usedNames.has(safeName) || RESERVED_NAMES.has(safeName) || forbiddenNames?.has(safeName)) {
|
|
7218
7217
|
safeName = `${baseName}$${toBase64(count++)}`;
|
|
7219
7218
|
}
|
|
7220
7219
|
usedNames.add(safeName);
|
|
@@ -8743,7 +8742,9 @@ class Identifier extends NodeBase {
|
|
|
8743
8742
|
// in the same function or at top level of module
|
|
8744
8743
|
return (this.isTDZAccess = true);
|
|
8745
8744
|
}
|
|
8746
|
-
|
|
8745
|
+
// We ignore the case where the module is not yet executed because
|
|
8746
|
+
// moduleSideEffects are false.
|
|
8747
|
+
if (!this.variable.initReached && this.scope.context.module.isExecuted) {
|
|
8747
8748
|
// Either a const/let TDZ violation or
|
|
8748
8749
|
// var use before declaration was encountered.
|
|
8749
8750
|
return (this.isTDZAccess = true);
|
|
@@ -11029,7 +11030,7 @@ class ExportDefaultDeclaration extends NodeBase {
|
|
|
11029
11030
|
const hasTrailingSemicolon = code.original.charCodeAt(this.end - 1) === 59; /*";"*/
|
|
11030
11031
|
const systemExportNames = format === 'system' && exportNamesByVariable.get(this.variable);
|
|
11031
11032
|
if (systemExportNames) {
|
|
11032
|
-
code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports(
|
|
11033
|
+
code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports(${JSON.stringify(systemExportNames[0])}, `);
|
|
11033
11034
|
code.appendRight(hasTrailingSemicolon ? this.end - 1 : this.end, ')' + (hasTrailingSemicolon ? '' : ';'));
|
|
11034
11035
|
}
|
|
11035
11036
|
else {
|
|
@@ -11234,14 +11235,12 @@ class IfStatement extends NodeBase {
|
|
|
11234
11235
|
const { brokenFlow } = context;
|
|
11235
11236
|
if (this.consequent.hasEffects(context))
|
|
11236
11237
|
return true;
|
|
11237
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
11238
11238
|
const consequentBrokenFlow = context.brokenFlow;
|
|
11239
11239
|
context.brokenFlow = brokenFlow;
|
|
11240
11240
|
if (this.alternate === null)
|
|
11241
11241
|
return false;
|
|
11242
11242
|
if (this.alternate.hasEffects(context))
|
|
11243
11243
|
return true;
|
|
11244
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
11245
11244
|
context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
|
|
11246
11245
|
return false;
|
|
11247
11246
|
}
|
|
@@ -11344,13 +11343,11 @@ class IfStatement extends NodeBase {
|
|
|
11344
11343
|
let consequentBrokenFlow = false;
|
|
11345
11344
|
if (this.consequent.shouldBeIncluded(context)) {
|
|
11346
11345
|
this.consequent.include(context, false, { asSingleStatement: true });
|
|
11347
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
11348
11346
|
consequentBrokenFlow = context.brokenFlow;
|
|
11349
11347
|
context.brokenFlow = brokenFlow;
|
|
11350
11348
|
}
|
|
11351
11349
|
if (this.alternate?.shouldBeIncluded(context)) {
|
|
11352
11350
|
this.alternate.include(context, false, { asSingleStatement: true });
|
|
11353
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
11354
11351
|
context.brokenFlow = context.brokenFlow && consequentBrokenFlow;
|
|
11355
11352
|
}
|
|
11356
11353
|
}
|
|
@@ -11975,26 +11972,34 @@ class ImportSpecifier extends NodeBase {
|
|
|
11975
11972
|
|
|
11976
11973
|
class LabeledStatement extends NodeBase {
|
|
11977
11974
|
hasEffects(context) {
|
|
11978
|
-
const brokenFlow = context
|
|
11975
|
+
const { brokenFlow, includedLabels } = context;
|
|
11979
11976
|
context.ignore.labels.add(this.label.name);
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
context.includedLabels.delete(this.label.name);
|
|
11985
|
-
context.brokenFlow = brokenFlow;
|
|
11977
|
+
context.includedLabels = new Set();
|
|
11978
|
+
let bodyHasEffects = false;
|
|
11979
|
+
if (this.body.hasEffects(context)) {
|
|
11980
|
+
bodyHasEffects = true;
|
|
11986
11981
|
}
|
|
11987
|
-
|
|
11982
|
+
else {
|
|
11983
|
+
context.ignore.labels.delete(this.label.name);
|
|
11984
|
+
if (context.includedLabels.has(this.label.name)) {
|
|
11985
|
+
context.includedLabels.delete(this.label.name);
|
|
11986
|
+
context.brokenFlow = brokenFlow;
|
|
11987
|
+
}
|
|
11988
|
+
}
|
|
11989
|
+
context.includedLabels = new Set([...includedLabels, ...context.includedLabels]);
|
|
11990
|
+
return bodyHasEffects;
|
|
11988
11991
|
}
|
|
11989
11992
|
include(context, includeChildrenRecursively) {
|
|
11990
11993
|
this.included = true;
|
|
11991
|
-
const brokenFlow = context
|
|
11994
|
+
const { brokenFlow, includedLabels } = context;
|
|
11995
|
+
context.includedLabels = new Set();
|
|
11992
11996
|
this.body.include(context, includeChildrenRecursively);
|
|
11993
11997
|
if (includeChildrenRecursively || context.includedLabels.has(this.label.name)) {
|
|
11994
11998
|
this.label.include();
|
|
11995
11999
|
context.includedLabels.delete(this.label.name);
|
|
11996
12000
|
context.brokenFlow = brokenFlow;
|
|
11997
12001
|
}
|
|
12002
|
+
context.includedLabels = new Set([...includedLabels, ...context.includedLabels]);
|
|
11998
12003
|
}
|
|
11999
12004
|
render(code, options) {
|
|
12000
12005
|
if (this.label.included) {
|
|
@@ -12738,7 +12743,6 @@ class SwitchStatement extends NodeBase {
|
|
|
12738
12743
|
for (const switchCase of this.cases) {
|
|
12739
12744
|
if (switchCase.hasEffects(context))
|
|
12740
12745
|
return true;
|
|
12741
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
12742
12746
|
onlyHasBrokenFlow &&= context.brokenFlow && !context.hasBreak;
|
|
12743
12747
|
context.hasBreak = false;
|
|
12744
12748
|
context.brokenFlow = brokenFlow;
|
|
@@ -12770,7 +12774,6 @@ class SwitchStatement extends NodeBase {
|
|
|
12770
12774
|
}
|
|
12771
12775
|
if (isCaseIncluded) {
|
|
12772
12776
|
switchCase.include(context, includeChildrenRecursively);
|
|
12773
|
-
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
12774
12777
|
onlyHasBrokenFlow &&= context.brokenFlow && !context.hasBreak;
|
|
12775
12778
|
context.hasBreak = false;
|
|
12776
12779
|
context.brokenFlow = brokenFlow;
|
|
@@ -15623,7 +15626,7 @@ function analyzeDependencies(dependencies, exports, t, { _, cnst, getObject, get
|
|
|
15623
15626
|
}
|
|
15624
15627
|
else {
|
|
15625
15628
|
const [key, value] = reexportedNames[0];
|
|
15626
|
-
setter.push(`exports(
|
|
15629
|
+
setter.push(`exports(${JSON.stringify(key)},${_}${value});`);
|
|
15627
15630
|
}
|
|
15628
15631
|
}
|
|
15629
15632
|
setters.push(setter.join(`${n}${t}${t}${t}`));
|
|
@@ -15653,10 +15656,12 @@ function getExportsBlock(exports, t, { _, n }) {
|
|
|
15653
15656
|
return '';
|
|
15654
15657
|
}
|
|
15655
15658
|
if (exports.length === 1) {
|
|
15656
|
-
return `exports(
|
|
15659
|
+
return `exports(${JSON.stringify(exports[0].name)},${_}${exports[0].value});${n}${n}`;
|
|
15657
15660
|
}
|
|
15658
15661
|
return (`exports({${n}` +
|
|
15659
|
-
exports
|
|
15662
|
+
exports
|
|
15663
|
+
.map(({ name, value }) => `${t}${stringifyObjectKeyIfNeeded(name)}:${_}${value}`)
|
|
15664
|
+
.join(`,${n}`) +
|
|
15660
15665
|
`${n}});${n}${n}`);
|
|
15661
15666
|
}
|
|
15662
15667
|
const getSyntheticExportsBlock = (exports, t, snippets) => getExportsBlock(exports
|
|
@@ -15930,7 +15935,7 @@ function assignExportsToMangledNames(exports, exportsByName, exportNamesByVariab
|
|
|
15930
15935
|
nameIndex += 9 * 64 ** (exportName.length - 1);
|
|
15931
15936
|
exportName = toBase64(nameIndex);
|
|
15932
15937
|
}
|
|
15933
|
-
} while (RESERVED_NAMES
|
|
15938
|
+
} while (RESERVED_NAMES.has(exportName) || exportsByName.has(exportName));
|
|
15934
15939
|
}
|
|
15935
15940
|
exportsByName.set(exportName, variable);
|
|
15936
15941
|
exportNamesByVariable.set(variable, [exportName]);
|
|
@@ -17865,7 +17870,7 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
17865
17870
|
];
|
|
17866
17871
|
const isValidPropertyName = reservedNamesAsProps
|
|
17867
17872
|
? (name) => VALID_IDENTIFIER_REGEXP.test(name)
|
|
17868
|
-
: (name) => !RESERVED_NAMES
|
|
17873
|
+
: (name) => !RESERVED_NAMES.has(name) && VALID_IDENTIFIER_REGEXP.test(name);
|
|
17869
17874
|
return {
|
|
17870
17875
|
_,
|
|
17871
17876
|
cnst,
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.2",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"test:package": "node scripts/test-package.js",
|
|
82
82
|
"test:options": "node scripts/test-options.js",
|
|
83
83
|
"test:only": "mocha test/test.js",
|
|
84
|
-
"test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit",
|
|
84
|
+
"test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit && tsc --noEmit -p scripts",
|
|
85
85
|
"test:browser": "mocha test/browser/index.js",
|
|
86
86
|
"watch": "rollup --config rollup.config.ts --configPlugin typescript --watch"
|
|
87
87
|
},
|
|
@@ -101,19 +101,19 @@
|
|
|
101
101
|
"homepage": "https://rollupjs.org/",
|
|
102
102
|
"optionalDependencies": {
|
|
103
103
|
"fsevents": "~2.3.2",
|
|
104
|
-
"@rollup/rollup-darwin-arm64": "4.9.
|
|
105
|
-
"@rollup/rollup-android-arm64": "4.9.
|
|
106
|
-
"@rollup/rollup-win32-arm64-msvc": "4.9.
|
|
107
|
-
"@rollup/rollup-linux-arm64-gnu": "4.9.
|
|
108
|
-
"@rollup/rollup-linux-arm64-musl": "4.9.
|
|
109
|
-
"@rollup/rollup-android-arm-eabi": "4.9.
|
|
110
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.9.
|
|
111
|
-
"@rollup/rollup-win32-ia32-msvc": "4.9.
|
|
112
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.9.
|
|
113
|
-
"@rollup/rollup-darwin-x64": "4.9.
|
|
114
|
-
"@rollup/rollup-win32-x64-msvc": "4.9.
|
|
115
|
-
"@rollup/rollup-linux-x64-gnu": "4.9.
|
|
116
|
-
"@rollup/rollup-linux-x64-musl": "4.9.
|
|
104
|
+
"@rollup/rollup-darwin-arm64": "4.9.2",
|
|
105
|
+
"@rollup/rollup-android-arm64": "4.9.2",
|
|
106
|
+
"@rollup/rollup-win32-arm64-msvc": "4.9.2",
|
|
107
|
+
"@rollup/rollup-linux-arm64-gnu": "4.9.2",
|
|
108
|
+
"@rollup/rollup-linux-arm64-musl": "4.9.2",
|
|
109
|
+
"@rollup/rollup-android-arm-eabi": "4.9.2",
|
|
110
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.9.2",
|
|
111
|
+
"@rollup/rollup-win32-ia32-msvc": "4.9.2",
|
|
112
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.9.2",
|
|
113
|
+
"@rollup/rollup-darwin-x64": "4.9.2",
|
|
114
|
+
"@rollup/rollup-win32-x64-msvc": "4.9.2",
|
|
115
|
+
"@rollup/rollup-linux-x64-gnu": "4.9.2",
|
|
116
|
+
"@rollup/rollup-linux-x64-musl": "4.9.2"
|
|
117
117
|
},
|
|
118
118
|
"devDependenciesComments": {
|
|
119
119
|
"@rollup/plugin-typescript": "It appears that 11.1.3 breaks sourcemaps"
|
|
@@ -123,26 +123,27 @@
|
|
|
123
123
|
"@codemirror/lang-javascript": "^6.2.1",
|
|
124
124
|
"@codemirror/language": "^6.9.3",
|
|
125
125
|
"@codemirror/search": "^6.5.5",
|
|
126
|
-
"@codemirror/state": "^6.3.
|
|
127
|
-
"@codemirror/view": "^6.22.
|
|
126
|
+
"@codemirror/state": "^6.3.3",
|
|
127
|
+
"@codemirror/view": "^6.22.3",
|
|
128
128
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
129
129
|
"@mermaid-js/mermaid-cli": "^10.6.1",
|
|
130
130
|
"@napi-rs/cli": "^2.17.0",
|
|
131
131
|
"@rollup/plugin-alias": "^5.1.0",
|
|
132
132
|
"@rollup/plugin-buble": "^1.0.3",
|
|
133
133
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
134
|
-
"@rollup/plugin-json": "^6.0
|
|
134
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
135
135
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
136
136
|
"@rollup/plugin-replace": "^5.0.5",
|
|
137
137
|
"@rollup/plugin-terser": "^0.4.4",
|
|
138
138
|
"@rollup/plugin-typescript": "11.1.5",
|
|
139
139
|
"@rollup/pluginutils": "^5.1.0",
|
|
140
140
|
"@types/estree": "1.0.5",
|
|
141
|
+
"@types/inquirer": "^9.0.7",
|
|
141
142
|
"@types/mocha": "^10.0.6",
|
|
142
143
|
"@types/node": "18.0.0",
|
|
143
144
|
"@types/yargs-parser": "^21.0.3",
|
|
144
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
145
|
-
"@typescript-eslint/parser": "^6.
|
|
145
|
+
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
146
|
+
"@typescript-eslint/parser": "^6.16.0",
|
|
146
147
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
147
148
|
"@vue/eslint-config-typescript": "^12.0.0",
|
|
148
149
|
"acorn": "^8.11.2",
|
|
@@ -152,15 +153,15 @@
|
|
|
152
153
|
"chokidar": "^3.5.3",
|
|
153
154
|
"colorette": "^2.0.20",
|
|
154
155
|
"concurrently": "^8.2.2",
|
|
155
|
-
"core-js": "^3.
|
|
156
|
+
"core-js": "^3.34.0",
|
|
156
157
|
"date-time": "^4.0.0",
|
|
157
158
|
"es5-shim": "^4.6.7",
|
|
158
159
|
"es6-shim": "^0.35.8",
|
|
159
|
-
"eslint": "^8.
|
|
160
|
+
"eslint": "^8.56.0",
|
|
160
161
|
"eslint-config-prettier": "^9.1.0",
|
|
161
|
-
"eslint-plugin-import": "^2.29.
|
|
162
|
-
"eslint-plugin-prettier": "^5.
|
|
163
|
-
"eslint-plugin-unicorn": "^
|
|
162
|
+
"eslint-plugin-import": "^2.29.1",
|
|
163
|
+
"eslint-plugin-prettier": "^5.1.2",
|
|
164
|
+
"eslint-plugin-unicorn": "^50.0.1",
|
|
164
165
|
"eslint-plugin-vue": "^9.19.2",
|
|
165
166
|
"fixturify": "^3.0.0",
|
|
166
167
|
"flru": "^1.0.2",
|
|
@@ -175,26 +176,25 @@
|
|
|
175
176
|
"mocha": "^10.2.0",
|
|
176
177
|
"nyc": "^15.1.0",
|
|
177
178
|
"pinia": "^2.1.7",
|
|
178
|
-
"prettier": "^3.1.
|
|
179
|
+
"prettier": "^3.1.1",
|
|
179
180
|
"pretty-bytes": "^6.1.1",
|
|
180
181
|
"pretty-ms": "^8.0.0",
|
|
181
182
|
"requirejs": "^2.3.6",
|
|
182
|
-
"rollup": "^4.
|
|
183
|
+
"rollup": "^4.9.1",
|
|
183
184
|
"rollup-plugin-license": "^3.2.0",
|
|
184
185
|
"rollup-plugin-string": "^3.0.0",
|
|
185
|
-
"rollup-plugin-thatworks": "^1.0.4",
|
|
186
186
|
"semver": "^7.5.4",
|
|
187
187
|
"shx": "^0.3.4",
|
|
188
188
|
"signal-exit": "^4.1.0",
|
|
189
189
|
"source-map": "^0.7.4",
|
|
190
190
|
"source-map-support": "^0.5.21",
|
|
191
191
|
"systemjs": "^6.14.2",
|
|
192
|
-
"terser": "^5.
|
|
192
|
+
"terser": "^5.26.0",
|
|
193
193
|
"tslib": "^2.6.2",
|
|
194
|
-
"typescript": "^5.3.
|
|
195
|
-
"vite": "^5.0.
|
|
196
|
-
"vitepress": "^1.0.0-rc.
|
|
197
|
-
"vue": "^3.3.
|
|
194
|
+
"typescript": "^5.3.3",
|
|
195
|
+
"vite": "^5.0.10",
|
|
196
|
+
"vitepress": "^1.0.0-rc.32",
|
|
197
|
+
"vue": "^3.3.13",
|
|
198
198
|
"wasm-pack": "^0.12.1",
|
|
199
199
|
"weak-napi": "^2.0.2",
|
|
200
200
|
"yargs-parser": "^21.1.1"
|