rollup 2.50.5 → 2.50.6
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 +11 -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 +32 -10
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- 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 +32 -10
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +1 -1
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.50.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.50.6
|
|
4
|
+
Thu, 03 Jun 2021 04:54:09 GMT - commit 9f69fe3f53ae50dffe932529a3503e619292d31a
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -32,7 +32,7 @@ function _interopNamespaceDefault(e) {
|
|
|
32
32
|
|
|
33
33
|
var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
34
34
|
|
|
35
|
-
var version$1 = "2.50.
|
|
35
|
+
var version$1 = "2.50.6";
|
|
36
36
|
|
|
37
37
|
function ensureArray(items) {
|
|
38
38
|
if (Array.isArray(items)) {
|
|
@@ -5056,8 +5056,14 @@ class SpreadElement extends NodeBase {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
}
|
|
5058
5058
|
hasEffects(context) {
|
|
5059
|
+
if (!this.deoptimized)
|
|
5060
|
+
this.applyDeoptimizations();
|
|
5061
|
+
const { propertyReadSideEffects } = this.context.options
|
|
5062
|
+
.treeshake;
|
|
5059
5063
|
return (this.argument.hasEffects(context) ||
|
|
5060
|
-
|
|
5064
|
+
(propertyReadSideEffects &&
|
|
5065
|
+
(propertyReadSideEffects === 'always' ||
|
|
5066
|
+
this.argument.hasEffectsWhenAccessedAtPath(UNKNOWN_PATH, context))));
|
|
5061
5067
|
}
|
|
5062
5068
|
applyDeoptimizations() {
|
|
5063
5069
|
this.deoptimized = true;
|
|
@@ -5271,11 +5277,16 @@ class FunctionNode extends NodeBase {
|
|
|
5271
5277
|
hasEffectsWhenCalledAtPath(path, callOptions, context) {
|
|
5272
5278
|
if (path.length > 0)
|
|
5273
5279
|
return true;
|
|
5274
|
-
if (this.async
|
|
5275
|
-
this.
|
|
5276
|
-
.
|
|
5277
|
-
|
|
5278
|
-
|
|
5280
|
+
if (this.async) {
|
|
5281
|
+
const { propertyReadSideEffects } = this.context.options
|
|
5282
|
+
.treeshake;
|
|
5283
|
+
const returnExpression = this.scope.getReturnExpression();
|
|
5284
|
+
if (returnExpression.hasEffectsWhenCalledAtPath(['then'], { args: NO_ARGS, thisParam: null, withNew: false }, context) ||
|
|
5285
|
+
(propertyReadSideEffects &&
|
|
5286
|
+
(propertyReadSideEffects === 'always' ||
|
|
5287
|
+
returnExpression.hasEffectsWhenAccessedAtPath(['then'], context)))) {
|
|
5288
|
+
return true;
|
|
5289
|
+
}
|
|
5279
5290
|
}
|
|
5280
5291
|
for (const param of this.params) {
|
|
5281
5292
|
if (param.hasEffects(context))
|
|
@@ -6016,7 +6027,7 @@ class ArrowFunctionExpression extends NodeBase {
|
|
|
6016
6027
|
// Arrow functions do not mutate their context
|
|
6017
6028
|
deoptimizeThisOnEventAtPath() { }
|
|
6018
6029
|
getReturnExpressionWhenCalledAtPath(path) {
|
|
6019
|
-
return path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
|
|
6030
|
+
return !this.async && path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
|
|
6020
6031
|
}
|
|
6021
6032
|
hasEffects() {
|
|
6022
6033
|
return false;
|
|
@@ -6030,6 +6041,17 @@ class ArrowFunctionExpression extends NodeBase {
|
|
|
6030
6041
|
hasEffectsWhenCalledAtPath(path, _callOptions, context) {
|
|
6031
6042
|
if (path.length > 0)
|
|
6032
6043
|
return true;
|
|
6044
|
+
if (this.async) {
|
|
6045
|
+
const { propertyReadSideEffects } = this.context.options
|
|
6046
|
+
.treeshake;
|
|
6047
|
+
const returnExpression = this.scope.getReturnExpression();
|
|
6048
|
+
if (returnExpression.hasEffectsWhenCalledAtPath(['then'], { args: NO_ARGS, thisParam: null, withNew: false }, context) ||
|
|
6049
|
+
(propertyReadSideEffects &&
|
|
6050
|
+
(propertyReadSideEffects === 'always' ||
|
|
6051
|
+
returnExpression.hasEffectsWhenAccessedAtPath(['then'], context)))) {
|
|
6052
|
+
return true;
|
|
6053
|
+
}
|
|
6054
|
+
}
|
|
6033
6055
|
for (const param of this.params) {
|
|
6034
6056
|
if (param.hasEffects(context))
|
|
6035
6057
|
return true;
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED