rollup 4.8.0 → 4.9.0
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/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 +36 -20
- 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 +36 -20
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +14 -14
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.9.0
|
|
5
|
+
Wed, 13 Dec 2023 09:23:48 GMT - commit c5337ef28a71c796e768a9f0edb3d7259a93f1aa
|
|
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.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.9.0
|
|
4
|
+
Wed, 13 Dec 2023 09:23:48 GMT - commit c5337ef28a71c796e768a9f0edb3d7259a93f1aa
|
|
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.
|
|
19
|
+
var version = "4.9.0";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -2060,6 +2060,20 @@ function makeLegal(value) {
|
|
|
2060
2060
|
value = `_${value}`;
|
|
2061
2061
|
return value || '_';
|
|
2062
2062
|
}
|
|
2063
|
+
const VALID_IDENTIFIER_REGEXP = /^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u;
|
|
2064
|
+
const NUMBER_REGEXP = /^\d+$/;
|
|
2065
|
+
function stringifyObjectKeyIfNeeded(key) {
|
|
2066
|
+
if (VALID_IDENTIFIER_REGEXP.test(key) || NUMBER_REGEXP.test(key)) {
|
|
2067
|
+
return key;
|
|
2068
|
+
}
|
|
2069
|
+
return JSON.stringify(key);
|
|
2070
|
+
}
|
|
2071
|
+
function stringifyIdentifierIfNeeded(key) {
|
|
2072
|
+
if (VALID_IDENTIFIER_REGEXP.test(key)) {
|
|
2073
|
+
return key;
|
|
2074
|
+
}
|
|
2075
|
+
return JSON.stringify(key);
|
|
2076
|
+
}
|
|
2063
2077
|
|
|
2064
2078
|
class ExternalModule {
|
|
2065
2079
|
constructor(options, id, moduleSideEffects, meta, renormalizeRenderPath, attributes) {
|
|
@@ -7849,7 +7863,7 @@ function getSystemExportStatement(exportedVariables, { exportNamesByVariable, sn
|
|
|
7849
7863
|
if (exportedVariables.length === 1 &&
|
|
7850
7864
|
exportNamesByVariable.get(exportedVariables[0]).length === 1) {
|
|
7851
7865
|
const variable = exportedVariables[0];
|
|
7852
|
-
return `exports(
|
|
7866
|
+
return `exports(${JSON.stringify(exportNamesByVariable.get(variable)[0])},${_}${variable.getName(getPropertyAccess)}${modifier})`;
|
|
7853
7867
|
}
|
|
7854
7868
|
else {
|
|
7855
7869
|
const fields = [];
|
|
@@ -7861,8 +7875,9 @@ function getSystemExportStatement(exportedVariables, { exportNamesByVariable, sn
|
|
|
7861
7875
|
return `exports(${getObject(fields, { lineBreakIndent: null })})`;
|
|
7862
7876
|
}
|
|
7863
7877
|
}
|
|
7878
|
+
// This is only invoked if there is exactly one export name
|
|
7864
7879
|
function renderSystemExportExpression(exportedVariable, expressionStart, expressionEnd, code, { exportNamesByVariable, snippets: { _ } }) {
|
|
7865
|
-
code.prependRight(expressionStart, `exports(
|
|
7880
|
+
code.prependRight(expressionStart, `exports(${JSON.stringify(exportNamesByVariable.get(exportedVariable)[0])},${_}`);
|
|
7866
7881
|
code.appendLeft(expressionEnd, ')');
|
|
7867
7882
|
}
|
|
7868
7883
|
function renderSystemExportFunction(exportedVariables, expressionStart, expressionEnd, needsParens, code, options) {
|
|
@@ -12182,7 +12197,7 @@ class NamespaceVariable extends Variable {
|
|
|
12182
12197
|
if (this.referencedEarly || variable.isReassigned || variable === this) {
|
|
12183
12198
|
return [
|
|
12184
12199
|
null,
|
|
12185
|
-
`get ${name}${_}()${_}{${_}return ${variable.getName(getPropertyAccess)}${s}${_}}`
|
|
12200
|
+
`get ${stringifyObjectKeyIfNeeded(name)}${_}()${_}{${_}return ${variable.getName(getPropertyAccess)}${s}${_}}`
|
|
12186
12201
|
];
|
|
12187
12202
|
}
|
|
12188
12203
|
return [name, variable.getName(getPropertyAccess)];
|
|
@@ -13220,7 +13235,7 @@ class Module {
|
|
|
13220
13235
|
this.addSource(source, node);
|
|
13221
13236
|
if (node.exported) {
|
|
13222
13237
|
// export * as name from './other'
|
|
13223
|
-
const name = node.exported.name;
|
|
13238
|
+
const name = node.exported instanceof Literal ? node.exported.value : node.exported.name;
|
|
13224
13239
|
this.assertUniqueExportName(name, node.exported.start);
|
|
13225
13240
|
this.reexportDescriptions.set(name, {
|
|
13226
13241
|
localName: '*',
|
|
@@ -13552,7 +13567,7 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
13552
13567
|
name: null
|
|
13553
13568
|
});
|
|
13554
13569
|
exportBlock +=
|
|
13555
|
-
`Object.defineProperty(exports,${_}
|
|
13570
|
+
`Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}{${n}` +
|
|
13556
13571
|
`${t}enumerable:${_}true,${n}` +
|
|
13557
13572
|
`${t}get:${_}${left}${importName}${right}${n}});`;
|
|
13558
13573
|
}
|
|
@@ -13930,7 +13945,7 @@ function getImportBlock(dependencies, { _ }) {
|
|
|
13930
13945
|
importBlock.push(`import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${importedNames
|
|
13931
13946
|
.map(specifier => specifier.imported === specifier.local
|
|
13932
13947
|
? specifier.imported
|
|
13933
|
-
: `${specifier.imported} as ${specifier.local}`)
|
|
13948
|
+
: `${stringifyIdentifierIfNeeded(specifier.imported)} as ${specifier.local}`)
|
|
13934
13949
|
.join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
|
|
13935
13950
|
}
|
|
13936
13951
|
}
|
|
@@ -13958,14 +13973,16 @@ function getImportBlock(dependencies, { _ }) {
|
|
|
13958
13973
|
importBlock.push(`import${_}*${_}as ${name} from${_}${pathWithAssertion}`);
|
|
13959
13974
|
}
|
|
13960
13975
|
for (const specifier of namespaceReexports) {
|
|
13961
|
-
importBlock.push(`export${_}{${_}${name === specifier.reexported
|
|
13976
|
+
importBlock.push(`export${_}{${_}${name === specifier.reexported
|
|
13977
|
+
? name
|
|
13978
|
+
: `${name} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`} };`);
|
|
13962
13979
|
}
|
|
13963
13980
|
}
|
|
13964
13981
|
if (namedReexports.length > 0) {
|
|
13965
13982
|
importBlock.push(`export${_}{${_}${namedReexports
|
|
13966
13983
|
.map(specifier => specifier.imported === specifier.reexported
|
|
13967
|
-
? specifier.imported
|
|
13968
|
-
: `${specifier.imported} as ${specifier.reexported}`)
|
|
13984
|
+
? stringifyIdentifierIfNeeded(specifier.imported)
|
|
13985
|
+
: `${stringifyIdentifierIfNeeded(specifier.imported)} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`)
|
|
13969
13986
|
.join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
|
|
13970
13987
|
}
|
|
13971
13988
|
}
|
|
@@ -13981,7 +13998,7 @@ function getExportBlock(exports, { _, cnst }) {
|
|
|
13981
13998
|
}
|
|
13982
13999
|
exportDeclaration.push(specifier.exported === specifier.local
|
|
13983
14000
|
? specifier.local
|
|
13984
|
-
: `${specifier.local} as ${specifier.exported}`);
|
|
14001
|
+
: `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`);
|
|
13985
14002
|
}
|
|
13986
14003
|
if (exportDeclaration.length > 0) {
|
|
13987
14004
|
exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
|
|
@@ -14397,7 +14414,7 @@ function deconflictImportsEsmOrSystem(usedNames, imports, dependenciesToBeDeconf
|
|
|
14397
14414
|
: module.suggestedVariableName, usedNames, variable.forbiddenNames));
|
|
14398
14415
|
}
|
|
14399
14416
|
else {
|
|
14400
|
-
variable.setRenderNames(null, getSafeName(name, usedNames, variable.forbiddenNames));
|
|
14417
|
+
variable.setRenderNames(null, getSafeName(makeLegal(name), usedNames, variable.forbiddenNames));
|
|
14401
14418
|
}
|
|
14402
14419
|
}
|
|
14403
14420
|
for (const variable of syntheticExports) {
|
|
@@ -16527,8 +16544,8 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
16527
16544
|
: `${s}${lineBreakIndent ? `${n}${lineBreakIndent.base}` : _}}`
|
|
16528
16545
|
];
|
|
16529
16546
|
const isValidPropertyName = reservedNamesAsProps
|
|
16530
|
-
? (name) =>
|
|
16531
|
-
: (name) => !RESERVED_NAMES$1.has(name) &&
|
|
16547
|
+
? (name) => VALID_IDENTIFIER_REGEXP.test(name)
|
|
16548
|
+
: (name) => !RESERVED_NAMES$1.has(name) && VALID_IDENTIFIER_REGEXP.test(name);
|
|
16532
16549
|
return {
|
|
16533
16550
|
_,
|
|
16534
16551
|
cnst,
|
|
@@ -16549,10 +16566,10 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
16549
16566
|
.map(([key, value]) => {
|
|
16550
16567
|
if (key === null)
|
|
16551
16568
|
return `${prefix}${value}`;
|
|
16552
|
-
const
|
|
16553
|
-
return key === value && objectShorthand &&
|
|
16569
|
+
const keyInObject = stringifyObjectKeyIfNeeded(key);
|
|
16570
|
+
return key === value && objectShorthand && key === keyInObject
|
|
16554
16571
|
? prefix + key
|
|
16555
|
-
: `${prefix}${
|
|
16572
|
+
: `${prefix}${keyInObject}:${_}${value}`;
|
|
16556
16573
|
})
|
|
16557
16574
|
.join(`,`)}${fields.length === 0 ? '' : lineBreakIndent ? `${n}${lineBreakIndent.base}` : _}}`;
|
|
16558
16575
|
},
|
|
@@ -16562,7 +16579,6 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
16562
16579
|
};
|
|
16563
16580
|
}
|
|
16564
16581
|
const wrapIfNeeded = (code, needsParens) => needsParens ? `(${code})` : code;
|
|
16565
|
-
const validPropertyName = /^(?!\d)[\w$]+$/;
|
|
16566
16582
|
|
|
16567
16583
|
class Source {
|
|
16568
16584
|
constructor(filename, content) {
|
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.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.9.0
|
|
4
|
+
Wed, 13 Dec 2023 09:23:48 GMT - commit c5337ef28a71c796e768a9f0edb3d7259a93f1aa
|
|
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.
|
|
34
|
+
var version = "4.9.0";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -3506,6 +3506,20 @@ function makeLegal(value) {
|
|
|
3506
3506
|
value = `_${value}`;
|
|
3507
3507
|
return value || '_';
|
|
3508
3508
|
}
|
|
3509
|
+
const VALID_IDENTIFIER_REGEXP = /^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u;
|
|
3510
|
+
const NUMBER_REGEXP = /^\d+$/;
|
|
3511
|
+
function stringifyObjectKeyIfNeeded(key) {
|
|
3512
|
+
if (VALID_IDENTIFIER_REGEXP.test(key) || NUMBER_REGEXP.test(key)) {
|
|
3513
|
+
return key;
|
|
3514
|
+
}
|
|
3515
|
+
return JSON.stringify(key);
|
|
3516
|
+
}
|
|
3517
|
+
function stringifyIdentifierIfNeeded(key) {
|
|
3518
|
+
if (VALID_IDENTIFIER_REGEXP.test(key)) {
|
|
3519
|
+
return key;
|
|
3520
|
+
}
|
|
3521
|
+
return JSON.stringify(key);
|
|
3522
|
+
}
|
|
3509
3523
|
|
|
3510
3524
|
class ExternalModule {
|
|
3511
3525
|
constructor(options, id, moduleSideEffects, meta, renormalizeRenderPath, attributes) {
|
|
@@ -9281,7 +9295,7 @@ function getSystemExportStatement(exportedVariables, { exportNamesByVariable, sn
|
|
|
9281
9295
|
if (exportedVariables.length === 1 &&
|
|
9282
9296
|
exportNamesByVariable.get(exportedVariables[0]).length === 1) {
|
|
9283
9297
|
const variable = exportedVariables[0];
|
|
9284
|
-
return `exports(
|
|
9298
|
+
return `exports(${JSON.stringify(exportNamesByVariable.get(variable)[0])},${_}${variable.getName(getPropertyAccess)}${modifier})`;
|
|
9285
9299
|
}
|
|
9286
9300
|
else {
|
|
9287
9301
|
const fields = [];
|
|
@@ -9293,8 +9307,9 @@ function getSystemExportStatement(exportedVariables, { exportNamesByVariable, sn
|
|
|
9293
9307
|
return `exports(${getObject(fields, { lineBreakIndent: null })})`;
|
|
9294
9308
|
}
|
|
9295
9309
|
}
|
|
9310
|
+
// This is only invoked if there is exactly one export name
|
|
9296
9311
|
function renderSystemExportExpression(exportedVariable, expressionStart, expressionEnd, code, { exportNamesByVariable, snippets: { _ } }) {
|
|
9297
|
-
code.prependRight(expressionStart, `exports(
|
|
9312
|
+
code.prependRight(expressionStart, `exports(${JSON.stringify(exportNamesByVariable.get(exportedVariable)[0])},${_}`);
|
|
9298
9313
|
code.appendLeft(expressionEnd, ')');
|
|
9299
9314
|
}
|
|
9300
9315
|
function renderSystemExportFunction(exportedVariables, expressionStart, expressionEnd, needsParens, code, options) {
|
|
@@ -13614,7 +13629,7 @@ class NamespaceVariable extends Variable {
|
|
|
13614
13629
|
if (this.referencedEarly || variable.isReassigned || variable === this) {
|
|
13615
13630
|
return [
|
|
13616
13631
|
null,
|
|
13617
|
-
`get ${name}${_}()${_}{${_}return ${variable.getName(getPropertyAccess)}${s}${_}}`
|
|
13632
|
+
`get ${stringifyObjectKeyIfNeeded(name)}${_}()${_}{${_}return ${variable.getName(getPropertyAccess)}${s}${_}}`
|
|
13618
13633
|
];
|
|
13619
13634
|
}
|
|
13620
13635
|
return [name, variable.getName(getPropertyAccess)];
|
|
@@ -14645,7 +14660,7 @@ class Module {
|
|
|
14645
14660
|
this.addSource(source, node);
|
|
14646
14661
|
if (node.exported) {
|
|
14647
14662
|
// export * as name from './other'
|
|
14648
|
-
const name = node.exported.name;
|
|
14663
|
+
const name = node.exported instanceof Literal ? node.exported.value : node.exported.name;
|
|
14649
14664
|
this.assertUniqueExportName(name, node.exported.start);
|
|
14650
14665
|
this.reexportDescriptions.set(name, {
|
|
14651
14666
|
localName: '*',
|
|
@@ -14977,7 +14992,7 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
14977
14992
|
name: null
|
|
14978
14993
|
});
|
|
14979
14994
|
exportBlock +=
|
|
14980
|
-
`Object.defineProperty(exports,${_}
|
|
14995
|
+
`Object.defineProperty(exports,${_}${JSON.stringify(specifier.reexported)},${_}{${n}` +
|
|
14981
14996
|
`${t}enumerable:${_}true,${n}` +
|
|
14982
14997
|
`${t}get:${_}${left}${importName}${right}${n}});`;
|
|
14983
14998
|
}
|
|
@@ -15355,7 +15370,7 @@ function getImportBlock(dependencies, { _ }) {
|
|
|
15355
15370
|
importBlock.push(`import ${defaultImport ? `${defaultImport.local},${_}` : ''}{${_}${importedNames
|
|
15356
15371
|
.map(specifier => specifier.imported === specifier.local
|
|
15357
15372
|
? specifier.imported
|
|
15358
|
-
: `${specifier.imported} as ${specifier.local}`)
|
|
15373
|
+
: `${stringifyIdentifierIfNeeded(specifier.imported)} as ${specifier.local}`)
|
|
15359
15374
|
.join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
|
|
15360
15375
|
}
|
|
15361
15376
|
}
|
|
@@ -15383,14 +15398,16 @@ function getImportBlock(dependencies, { _ }) {
|
|
|
15383
15398
|
importBlock.push(`import${_}*${_}as ${name} from${_}${pathWithAssertion}`);
|
|
15384
15399
|
}
|
|
15385
15400
|
for (const specifier of namespaceReexports) {
|
|
15386
|
-
importBlock.push(`export${_}{${_}${name === specifier.reexported
|
|
15401
|
+
importBlock.push(`export${_}{${_}${name === specifier.reexported
|
|
15402
|
+
? name
|
|
15403
|
+
: `${name} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`} };`);
|
|
15387
15404
|
}
|
|
15388
15405
|
}
|
|
15389
15406
|
if (namedReexports.length > 0) {
|
|
15390
15407
|
importBlock.push(`export${_}{${_}${namedReexports
|
|
15391
15408
|
.map(specifier => specifier.imported === specifier.reexported
|
|
15392
|
-
? specifier.imported
|
|
15393
|
-
: `${specifier.imported} as ${specifier.reexported}`)
|
|
15409
|
+
? stringifyIdentifierIfNeeded(specifier.imported)
|
|
15410
|
+
: `${stringifyIdentifierIfNeeded(specifier.imported)} as ${stringifyIdentifierIfNeeded(specifier.reexported)}`)
|
|
15394
15411
|
.join(`,${_}`)}${_}}${_}from${_}${pathWithAssertion}`);
|
|
15395
15412
|
}
|
|
15396
15413
|
}
|
|
@@ -15406,7 +15423,7 @@ function getExportBlock(exports, { _, cnst }) {
|
|
|
15406
15423
|
}
|
|
15407
15424
|
exportDeclaration.push(specifier.exported === specifier.local
|
|
15408
15425
|
? specifier.local
|
|
15409
|
-
: `${specifier.local} as ${specifier.exported}`);
|
|
15426
|
+
: `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`);
|
|
15410
15427
|
}
|
|
15411
15428
|
if (exportDeclaration.length > 0) {
|
|
15412
15429
|
exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
|
|
@@ -15822,7 +15839,7 @@ function deconflictImportsEsmOrSystem(usedNames, imports, dependenciesToBeDeconf
|
|
|
15822
15839
|
: module.suggestedVariableName, usedNames, variable.forbiddenNames));
|
|
15823
15840
|
}
|
|
15824
15841
|
else {
|
|
15825
|
-
variable.setRenderNames(null, getSafeName(name, usedNames, variable.forbiddenNames));
|
|
15842
|
+
variable.setRenderNames(null, getSafeName(makeLegal(name), usedNames, variable.forbiddenNames));
|
|
15826
15843
|
}
|
|
15827
15844
|
}
|
|
15828
15845
|
for (const variable of syntheticExports) {
|
|
@@ -17847,8 +17864,8 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
17847
17864
|
: `${s}${lineBreakIndent ? `${n}${lineBreakIndent.base}` : _}}`
|
|
17848
17865
|
];
|
|
17849
17866
|
const isValidPropertyName = reservedNamesAsProps
|
|
17850
|
-
? (name) =>
|
|
17851
|
-
: (name) => !RESERVED_NAMES$1.has(name) &&
|
|
17867
|
+
? (name) => VALID_IDENTIFIER_REGEXP.test(name)
|
|
17868
|
+
: (name) => !RESERVED_NAMES$1.has(name) && VALID_IDENTIFIER_REGEXP.test(name);
|
|
17852
17869
|
return {
|
|
17853
17870
|
_,
|
|
17854
17871
|
cnst,
|
|
@@ -17869,10 +17886,10 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
17869
17886
|
.map(([key, value]) => {
|
|
17870
17887
|
if (key === null)
|
|
17871
17888
|
return `${prefix}${value}`;
|
|
17872
|
-
const
|
|
17873
|
-
return key === value && objectShorthand &&
|
|
17889
|
+
const keyInObject = stringifyObjectKeyIfNeeded(key);
|
|
17890
|
+
return key === value && objectShorthand && key === keyInObject
|
|
17874
17891
|
? prefix + key
|
|
17875
|
-
: `${prefix}${
|
|
17892
|
+
: `${prefix}${keyInObject}:${_}${value}`;
|
|
17876
17893
|
})
|
|
17877
17894
|
.join(`,`)}${fields.length === 0 ? '' : lineBreakIndent ? `${n}${lineBreakIndent.base}` : _}}`;
|
|
17878
17895
|
},
|
|
@@ -17882,7 +17899,6 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con
|
|
|
17882
17899
|
};
|
|
17883
17900
|
}
|
|
17884
17901
|
const wrapIfNeeded = (code, needsParens) => needsParens ? `(${code})` : code;
|
|
17885
|
-
const validPropertyName = /^(?!\d)[\w$]+$/;
|
|
17886
17902
|
|
|
17887
17903
|
class Source {
|
|
17888
17904
|
constructor(filename, content) {
|
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.
|
|
3
|
+
"version": "4.9.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -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.
|
|
105
|
-
"@rollup/rollup-android-arm64": "4.
|
|
106
|
-
"@rollup/rollup-win32-arm64-msvc": "4.
|
|
107
|
-
"@rollup/rollup-linux-arm64-gnu": "4.
|
|
108
|
-
"@rollup/rollup-linux-arm64-musl": "4.
|
|
109
|
-
"@rollup/rollup-android-arm-eabi": "4.
|
|
110
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.
|
|
111
|
-
"@rollup/rollup-win32-ia32-msvc": "4.
|
|
112
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.
|
|
113
|
-
"@rollup/rollup-darwin-x64": "4.
|
|
114
|
-
"@rollup/rollup-win32-x64-msvc": "4.
|
|
115
|
-
"@rollup/rollup-linux-x64-gnu": "4.
|
|
116
|
-
"@rollup/rollup-linux-x64-musl": "4.
|
|
104
|
+
"@rollup/rollup-darwin-arm64": "4.9.0",
|
|
105
|
+
"@rollup/rollup-android-arm64": "4.9.0",
|
|
106
|
+
"@rollup/rollup-win32-arm64-msvc": "4.9.0",
|
|
107
|
+
"@rollup/rollup-linux-arm64-gnu": "4.9.0",
|
|
108
|
+
"@rollup/rollup-linux-arm64-musl": "4.9.0",
|
|
109
|
+
"@rollup/rollup-android-arm-eabi": "4.9.0",
|
|
110
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.9.0",
|
|
111
|
+
"@rollup/rollup-win32-ia32-msvc": "4.9.0",
|
|
112
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.9.0",
|
|
113
|
+
"@rollup/rollup-darwin-x64": "4.9.0",
|
|
114
|
+
"@rollup/rollup-win32-x64-msvc": "4.9.0",
|
|
115
|
+
"@rollup/rollup-linux-x64-gnu": "4.9.0",
|
|
116
|
+
"@rollup/rollup-linux-x64-musl": "4.9.0"
|
|
117
117
|
},
|
|
118
118
|
"devDependenciesComments": {
|
|
119
119
|
"@rollup/plugin-typescript": "It appears that 11.1.3 breaks sourcemaps"
|