rollup 2.38.3 → 2.38.4
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/CHANGELOG.md +9 -0
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +28 -32
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +28 -32
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +2 -3
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 v2.38.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.38.4
|
|
4
|
+
Tue, 02 Feb 2021 05:54:38 GMT - commit 991bb98fad1f3f76226bfe6243fd6cc45a19a39b
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -19,7 +19,7 @@ function _interopNamespaceDefaultOnly(e) {
|
|
|
19
19
|
return {__proto__: null, 'default': e};
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var version = "2.38.
|
|
22
|
+
var version = "2.38.4";
|
|
23
23
|
|
|
24
24
|
function ensureArray(items) {
|
|
25
25
|
if (Array.isArray(items)) {
|
|
@@ -2765,7 +2765,7 @@ class NodeBase {
|
|
|
2765
2765
|
}
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
|
-
|
|
2768
|
+
includeAsSingleStatement(context, includeChildrenRecursively) {
|
|
2769
2769
|
this.include(context, includeChildrenRecursively);
|
|
2770
2770
|
}
|
|
2771
2771
|
includeCallArguments(context, args) {
|
|
@@ -7176,7 +7176,7 @@ class DoWhileStatement extends NodeBase {
|
|
|
7176
7176
|
this.included = true;
|
|
7177
7177
|
this.test.include(context, includeChildrenRecursively);
|
|
7178
7178
|
const { brokenFlow } = context;
|
|
7179
|
-
this.body.
|
|
7179
|
+
this.body.includeAsSingleStatement(context, includeChildrenRecursively);
|
|
7180
7180
|
context.brokenFlow = brokenFlow;
|
|
7181
7181
|
}
|
|
7182
7182
|
}
|
|
@@ -7250,11 +7250,11 @@ class ForInStatement extends NodeBase {
|
|
|
7250
7250
|
}
|
|
7251
7251
|
include(context, includeChildrenRecursively) {
|
|
7252
7252
|
this.included = true;
|
|
7253
|
-
this.left.
|
|
7253
|
+
this.left.include(context, includeChildrenRecursively || true);
|
|
7254
7254
|
this.left.deoptimizePath(EMPTY_PATH);
|
|
7255
7255
|
this.right.include(context, includeChildrenRecursively);
|
|
7256
7256
|
const { brokenFlow } = context;
|
|
7257
|
-
this.body.
|
|
7257
|
+
this.body.includeAsSingleStatement(context, includeChildrenRecursively);
|
|
7258
7258
|
context.brokenFlow = brokenFlow;
|
|
7259
7259
|
}
|
|
7260
7260
|
render(code, options) {
|
|
@@ -7284,11 +7284,11 @@ class ForOfStatement extends NodeBase {
|
|
|
7284
7284
|
}
|
|
7285
7285
|
include(context, includeChildrenRecursively) {
|
|
7286
7286
|
this.included = true;
|
|
7287
|
-
this.left.
|
|
7287
|
+
this.left.include(context, includeChildrenRecursively || true);
|
|
7288
7288
|
this.left.deoptimizePath(EMPTY_PATH);
|
|
7289
7289
|
this.right.include(context, includeChildrenRecursively);
|
|
7290
7290
|
const { brokenFlow } = context;
|
|
7291
|
-
this.body.
|
|
7291
|
+
this.body.includeAsSingleStatement(context, includeChildrenRecursively);
|
|
7292
7292
|
context.brokenFlow = brokenFlow;
|
|
7293
7293
|
}
|
|
7294
7294
|
render(code, options) {
|
|
@@ -7324,13 +7324,13 @@ class ForStatement extends NodeBase {
|
|
|
7324
7324
|
include(context, includeChildrenRecursively) {
|
|
7325
7325
|
this.included = true;
|
|
7326
7326
|
if (this.init)
|
|
7327
|
-
this.init.
|
|
7327
|
+
this.init.includeAsSingleStatement(context, includeChildrenRecursively);
|
|
7328
7328
|
if (this.test)
|
|
7329
7329
|
this.test.include(context, includeChildrenRecursively);
|
|
7330
7330
|
const { brokenFlow } = context;
|
|
7331
7331
|
if (this.update)
|
|
7332
7332
|
this.update.include(context, includeChildrenRecursively);
|
|
7333
|
-
this.body.
|
|
7333
|
+
this.body.includeAsSingleStatement(context, includeChildrenRecursively);
|
|
7334
7334
|
context.brokenFlow = brokenFlow;
|
|
7335
7335
|
}
|
|
7336
7336
|
render(code, options) {
|
|
@@ -7471,10 +7471,10 @@ class IfStatement extends NodeBase {
|
|
|
7471
7471
|
this.test.include(context, false);
|
|
7472
7472
|
}
|
|
7473
7473
|
if (testValue && this.consequent.shouldBeIncluded(context)) {
|
|
7474
|
-
this.consequent.
|
|
7474
|
+
this.consequent.includeAsSingleStatement(context, false);
|
|
7475
7475
|
}
|
|
7476
7476
|
if (this.alternate !== null && !testValue && this.alternate.shouldBeIncluded(context)) {
|
|
7477
|
-
this.alternate.
|
|
7477
|
+
this.alternate.includeAsSingleStatement(context, false);
|
|
7478
7478
|
}
|
|
7479
7479
|
}
|
|
7480
7480
|
includeRecursively(includeChildrenRecursively, context) {
|
|
@@ -7489,12 +7489,12 @@ class IfStatement extends NodeBase {
|
|
|
7489
7489
|
const { brokenFlow } = context;
|
|
7490
7490
|
let consequentBrokenFlow = BROKEN_FLOW_NONE;
|
|
7491
7491
|
if (this.consequent.shouldBeIncluded(context)) {
|
|
7492
|
-
this.consequent.
|
|
7492
|
+
this.consequent.includeAsSingleStatement(context, false);
|
|
7493
7493
|
consequentBrokenFlow = context.brokenFlow;
|
|
7494
7494
|
context.brokenFlow = brokenFlow;
|
|
7495
7495
|
}
|
|
7496
7496
|
if (this.alternate !== null && this.alternate.shouldBeIncluded(context)) {
|
|
7497
|
-
this.alternate.
|
|
7497
|
+
this.alternate.includeAsSingleStatement(context, false);
|
|
7498
7498
|
context.brokenFlow =
|
|
7499
7499
|
context.brokenFlow < consequentBrokenFlow ? context.brokenFlow : consequentBrokenFlow;
|
|
7500
7500
|
}
|
|
@@ -9010,11 +9010,13 @@ class VariableDeclaration extends NodeBase {
|
|
|
9010
9010
|
declarator.include(context, includeChildrenRecursively);
|
|
9011
9011
|
}
|
|
9012
9012
|
}
|
|
9013
|
-
|
|
9013
|
+
includeAsSingleStatement(context, includeChildrenRecursively) {
|
|
9014
9014
|
this.included = true;
|
|
9015
9015
|
for (const declarator of this.declarations) {
|
|
9016
|
-
declarator.
|
|
9017
|
-
|
|
9016
|
+
if (includeChildrenRecursively || declarator.shouldBeIncluded(context)) {
|
|
9017
|
+
declarator.include(context, includeChildrenRecursively);
|
|
9018
|
+
declarator.id.include(context, includeChildrenRecursively);
|
|
9019
|
+
}
|
|
9018
9020
|
}
|
|
9019
9021
|
}
|
|
9020
9022
|
initialise() {
|
|
@@ -9023,8 +9025,7 @@ class VariableDeclaration extends NodeBase {
|
|
|
9023
9025
|
}
|
|
9024
9026
|
}
|
|
9025
9027
|
render(code, options, nodeRenderOptions = BLANK) {
|
|
9026
|
-
if (
|
|
9027
|
-
areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
|
|
9028
|
+
if (areAllDeclarationsIncludedAndNotExported(this.declarations, options.exportNamesByVariable)) {
|
|
9028
9029
|
for (const declarator of this.declarations) {
|
|
9029
9030
|
declarator.render(code, options);
|
|
9030
9031
|
}
|
|
@@ -9037,11 +9038,13 @@ class VariableDeclaration extends NodeBase {
|
|
|
9037
9038
|
this.renderReplacedDeclarations(code, options, nodeRenderOptions);
|
|
9038
9039
|
}
|
|
9039
9040
|
}
|
|
9040
|
-
renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, systemPatternExports, options) {
|
|
9041
|
+
renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, systemPatternExports, options, isNoStatement) {
|
|
9041
9042
|
if (code.original.charCodeAt(this.end - 1) === 59 /*";"*/) {
|
|
9042
9043
|
code.remove(this.end - 1, this.end);
|
|
9043
9044
|
}
|
|
9044
|
-
|
|
9045
|
+
if (!isNoStatement) {
|
|
9046
|
+
separatorString += ';';
|
|
9047
|
+
}
|
|
9045
9048
|
if (lastSeparatorPos !== null) {
|
|
9046
9049
|
if (code.original.charCodeAt(actualContentEnd - 1) === 10 /*"\n"*/ &&
|
|
9047
9050
|
(code.original.charCodeAt(this.end) === 10 /*"\n"*/ ||
|
|
@@ -9066,7 +9069,7 @@ class VariableDeclaration extends NodeBase {
|
|
|
9066
9069
|
code.appendLeft(renderedContentEnd, ` ${getSystemExportStatement(systemPatternExports, options)};`);
|
|
9067
9070
|
}
|
|
9068
9071
|
}
|
|
9069
|
-
renderReplacedDeclarations(code, options, { start = this.start, end = this.end }) {
|
|
9072
|
+
renderReplacedDeclarations(code, options, { start = this.start, end = this.end, isNoStatement }) {
|
|
9070
9073
|
const separatedNodes = getCommaSeparatedNodesWithBoundaries(this.declarations, code, this.start + this.kind.length, this.end - (code.original.charCodeAt(this.end - 1) === 59 /*";"*/ ? 1 : 0));
|
|
9071
9074
|
let actualContentEnd, renderedContentEnd;
|
|
9072
9075
|
renderedContentEnd = findNonWhiteSpace(code.original, this.start + this.kind.length);
|
|
@@ -9137,7 +9140,7 @@ class VariableDeclaration extends NodeBase {
|
|
|
9137
9140
|
separatorString = nextSeparatorString;
|
|
9138
9141
|
}
|
|
9139
9142
|
if (hasRenderedContent) {
|
|
9140
|
-
this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, systemPatternExports, options);
|
|
9143
|
+
this.renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, systemPatternExports, options, isNoStatement);
|
|
9141
9144
|
}
|
|
9142
9145
|
else {
|
|
9143
9146
|
code.remove(start, end);
|
|
@@ -9164,13 +9167,6 @@ class VariableDeclarator extends NodeBase {
|
|
|
9164
9167
|
this.init.include(context, includeChildrenRecursively);
|
|
9165
9168
|
}
|
|
9166
9169
|
}
|
|
9167
|
-
includeAllDeclaredVariables(context, includeChildrenRecursively) {
|
|
9168
|
-
this.included = true;
|
|
9169
|
-
this.id.include(context, includeChildrenRecursively);
|
|
9170
|
-
if (this.init) {
|
|
9171
|
-
this.init.include(context, includeChildrenRecursively);
|
|
9172
|
-
}
|
|
9173
|
-
}
|
|
9174
9170
|
render(code, options) {
|
|
9175
9171
|
const renderId = this.id.included;
|
|
9176
9172
|
if (renderId) {
|
|
@@ -9204,7 +9200,7 @@ class WhileStatement extends NodeBase {
|
|
|
9204
9200
|
this.included = true;
|
|
9205
9201
|
this.test.include(context, includeChildrenRecursively);
|
|
9206
9202
|
const { brokenFlow } = context;
|
|
9207
|
-
this.body.
|
|
9203
|
+
this.body.includeAsSingleStatement(context, includeChildrenRecursively);
|
|
9208
9204
|
context.brokenFlow = brokenFlow;
|
|
9209
9205
|
}
|
|
9210
9206
|
}
|
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": "2.38.
|
|
3
|
+
"version": "2.38.4",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"perf": "npm run build:cjs && node --expose-gc scripts/perf.js",
|
|
25
25
|
"perf:debug": "node --inspect-brk scripts/perf-debug.js",
|
|
26
26
|
"perf:init": "node scripts/perf-init.js",
|
|
27
|
-
"prepare": "npm run build",
|
|
28
|
-
"prepublishOnly": "npm ci && npm run lint:nofix && npm run security && npm run build:bootstrap && npm run test:all",
|
|
27
|
+
"prepare": "npm run build:cjs && npm run build:bootstrap",
|
|
29
28
|
"security": "npm audit",
|
|
30
29
|
"test": "npm run build && npm run test:all",
|
|
31
30
|
"test:cjs": "npm run build:cjs && npm run test:only",
|