rollup 3.20.6 → 3.20.7
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/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +16 -11
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.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/rollup.js +16 -11
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +1 -1
package/dist/bin/rollup
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.20.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.20.7
|
|
4
|
+
Fri, 21 Apr 2023 04:31:37 GMT - commit 2820962446b40b7dfab9bdd936be1e230d8b944c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/pr
|
|
|
16
16
|
import { EventEmitter } from 'node:events';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version$1 = "3.20.
|
|
19
|
+
var version$1 = "3.20.7";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -10342,9 +10342,9 @@ class FunctionDeclaration extends FunctionNode {
|
|
|
10342
10342
|
function getDeclarationStart(code, start) {
|
|
10343
10343
|
return findNonWhiteSpace(code, findFirstOccurrenceOutsideComment(code, 'default', start) + 7);
|
|
10344
10344
|
}
|
|
10345
|
-
function
|
|
10346
|
-
const declarationEnd = findFirstOccurrenceOutsideComment(code,
|
|
10347
|
-
code = code.slice(declarationEnd, findFirstOccurrenceOutsideComment(code,
|
|
10345
|
+
function getFunctionIdInsertPosition(code, start) {
|
|
10346
|
+
const declarationEnd = findFirstOccurrenceOutsideComment(code, 'function', start) + 'function'.length;
|
|
10347
|
+
code = code.slice(declarationEnd, findFirstOccurrenceOutsideComment(code, '(', declarationEnd));
|
|
10348
10348
|
const generatorStarPos = findFirstOccurrenceOutsideComment(code, '*');
|
|
10349
10349
|
if (generatorStarPos === -1) {
|
|
10350
10350
|
return declarationEnd;
|
|
@@ -10369,10 +10369,14 @@ class ExportDefaultDeclaration extends NodeBase {
|
|
|
10369
10369
|
const { start, end } = nodeRenderOptions;
|
|
10370
10370
|
const declarationStart = getDeclarationStart(code.original, this.start);
|
|
10371
10371
|
if (this.declaration instanceof FunctionDeclaration) {
|
|
10372
|
-
this.renderNamedDeclaration(code, declarationStart,
|
|
10372
|
+
this.renderNamedDeclaration(code, declarationStart, this.declaration.id === null
|
|
10373
|
+
? getFunctionIdInsertPosition(code.original, declarationStart)
|
|
10374
|
+
: null, options);
|
|
10373
10375
|
}
|
|
10374
10376
|
else if (this.declaration instanceof ClassDeclaration) {
|
|
10375
|
-
this.renderNamedDeclaration(code, declarationStart,
|
|
10377
|
+
this.renderNamedDeclaration(code, declarationStart, this.declaration.id === null
|
|
10378
|
+
? findFirstOccurrenceOutsideComment(code.original, 'class', start) + 'class'.length
|
|
10379
|
+
: null, options);
|
|
10376
10380
|
}
|
|
10377
10381
|
else if (this.variable.getOriginalVariable() !== this.variable) {
|
|
10378
10382
|
// Remove altogether to prevent re-declaring the same variable
|
|
@@ -10395,13 +10399,13 @@ class ExportDefaultDeclaration extends NodeBase {
|
|
|
10395
10399
|
this.declaration.render(code, options);
|
|
10396
10400
|
}
|
|
10397
10401
|
applyDeoptimizations() { }
|
|
10398
|
-
renderNamedDeclaration(code, declarationStart,
|
|
10402
|
+
renderNamedDeclaration(code, declarationStart, idInsertPosition, options) {
|
|
10399
10403
|
const { exportNamesByVariable, format, snippets: { getPropertyAccess } } = options;
|
|
10400
10404
|
const name = this.variable.getName(getPropertyAccess);
|
|
10401
10405
|
// Remove `export default`
|
|
10402
10406
|
code.remove(this.start, declarationStart);
|
|
10403
|
-
if (
|
|
10404
|
-
code.appendLeft(
|
|
10407
|
+
if (idInsertPosition !== null) {
|
|
10408
|
+
code.appendLeft(idInsertPosition, ` ${name}`);
|
|
10405
10409
|
}
|
|
10406
10410
|
if (format === 'system' &&
|
|
10407
10411
|
this.declaration instanceof ClassDeclaration &&
|
|
@@ -10529,6 +10533,7 @@ class ForOfStatement extends NodeBase {
|
|
|
10529
10533
|
applyDeoptimizations() {
|
|
10530
10534
|
this.deoptimized = true;
|
|
10531
10535
|
this.left.deoptimizePath(EMPTY_PATH);
|
|
10536
|
+
this.right.deoptimizePath(UNKNOWN_PATH);
|
|
10532
10537
|
this.context.requestTreeshakingPass();
|
|
10533
10538
|
}
|
|
10534
10539
|
}
|
package/dist/es/shared/watch.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.20.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.20.7
|
|
4
|
+
Fri, 21 Apr 2023 04:31:37 GMT - commit 2820962446b40b7dfab9bdd936be1e230d8b944c
|
|
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$1 = "3.20.
|
|
34
|
+
var version$1 = "3.20.7";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -10840,9 +10840,9 @@ class FunctionDeclaration extends FunctionNode {
|
|
|
10840
10840
|
function getDeclarationStart(code, start) {
|
|
10841
10841
|
return findNonWhiteSpace(code, findFirstOccurrenceOutsideComment(code, 'default', start) + 7);
|
|
10842
10842
|
}
|
|
10843
|
-
function
|
|
10844
|
-
const declarationEnd = findFirstOccurrenceOutsideComment(code,
|
|
10845
|
-
code = code.slice(declarationEnd, findFirstOccurrenceOutsideComment(code,
|
|
10843
|
+
function getFunctionIdInsertPosition(code, start) {
|
|
10844
|
+
const declarationEnd = findFirstOccurrenceOutsideComment(code, 'function', start) + 'function'.length;
|
|
10845
|
+
code = code.slice(declarationEnd, findFirstOccurrenceOutsideComment(code, '(', declarationEnd));
|
|
10846
10846
|
const generatorStarPos = findFirstOccurrenceOutsideComment(code, '*');
|
|
10847
10847
|
if (generatorStarPos === -1) {
|
|
10848
10848
|
return declarationEnd;
|
|
@@ -10867,10 +10867,14 @@ class ExportDefaultDeclaration extends NodeBase {
|
|
|
10867
10867
|
const { start, end } = nodeRenderOptions;
|
|
10868
10868
|
const declarationStart = getDeclarationStart(code.original, this.start);
|
|
10869
10869
|
if (this.declaration instanceof FunctionDeclaration) {
|
|
10870
|
-
this.renderNamedDeclaration(code, declarationStart,
|
|
10870
|
+
this.renderNamedDeclaration(code, declarationStart, this.declaration.id === null
|
|
10871
|
+
? getFunctionIdInsertPosition(code.original, declarationStart)
|
|
10872
|
+
: null, options);
|
|
10871
10873
|
}
|
|
10872
10874
|
else if (this.declaration instanceof ClassDeclaration) {
|
|
10873
|
-
this.renderNamedDeclaration(code, declarationStart,
|
|
10875
|
+
this.renderNamedDeclaration(code, declarationStart, this.declaration.id === null
|
|
10876
|
+
? findFirstOccurrenceOutsideComment(code.original, 'class', start) + 'class'.length
|
|
10877
|
+
: null, options);
|
|
10874
10878
|
}
|
|
10875
10879
|
else if (this.variable.getOriginalVariable() !== this.variable) {
|
|
10876
10880
|
// Remove altogether to prevent re-declaring the same variable
|
|
@@ -10893,13 +10897,13 @@ class ExportDefaultDeclaration extends NodeBase {
|
|
|
10893
10897
|
this.declaration.render(code, options);
|
|
10894
10898
|
}
|
|
10895
10899
|
applyDeoptimizations() { }
|
|
10896
|
-
renderNamedDeclaration(code, declarationStart,
|
|
10900
|
+
renderNamedDeclaration(code, declarationStart, idInsertPosition, options) {
|
|
10897
10901
|
const { exportNamesByVariable, format, snippets: { getPropertyAccess } } = options;
|
|
10898
10902
|
const name = this.variable.getName(getPropertyAccess);
|
|
10899
10903
|
// Remove `export default`
|
|
10900
10904
|
code.remove(this.start, declarationStart);
|
|
10901
|
-
if (
|
|
10902
|
-
code.appendLeft(
|
|
10905
|
+
if (idInsertPosition !== null) {
|
|
10906
|
+
code.appendLeft(idInsertPosition, ` ${name}`);
|
|
10903
10907
|
}
|
|
10904
10908
|
if (format === 'system' &&
|
|
10905
10909
|
this.declaration instanceof ClassDeclaration &&
|
|
@@ -11027,6 +11031,7 @@ class ForOfStatement extends NodeBase {
|
|
|
11027
11031
|
applyDeoptimizations() {
|
|
11028
11032
|
this.deoptimized = true;
|
|
11029
11033
|
this.left.deoptimizePath(EMPTY_PATH);
|
|
11034
|
+
this.right.deoptimizePath(UNKNOWN_PATH);
|
|
11030
11035
|
this.context.requestTreeshakingPass();
|
|
11031
11036
|
}
|
|
11032
11037
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED