rollup 2.50.4 → 2.50.5

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/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.50.4
4
- Sat, 29 May 2021 04:39:28 GMT - commit 184eb6006e0e9a7f170a9208f923af0d568a31b6
3
+ Rollup.js v2.50.5
4
+ Sun, 30 May 2021 18:56:20 GMT - commit b3d130b1a5448a2abc07fa3d7cde749c3169d220
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.50.4
4
- Sat, 29 May 2021 04:39:28 GMT - commit 184eb6006e0e9a7f170a9208f923af0d568a31b6
3
+ Rollup.js v2.50.5
4
+ Sun, 30 May 2021 18:56:20 GMT - commit b3d130b1a5448a2abc07fa3d7cde749c3169d220
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.50.4
4
- Sat, 29 May 2021 04:39:28 GMT - commit 184eb6006e0e9a7f170a9208f923af0d568a31b6
3
+ Rollup.js v2.50.5
4
+ Sun, 30 May 2021 18:56:20 GMT - commit b3d130b1a5448a2abc07fa3d7cde749c3169d220
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.50.4
4
- Sat, 29 May 2021 04:39:28 GMT - commit 184eb6006e0e9a7f170a9208f923af0d568a31b6
3
+ Rollup.js v2.50.5
4
+ Sun, 30 May 2021 18:56:20 GMT - commit b3d130b1a5448a2abc07fa3d7cde749c3169d220
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.50.4
4
- Sat, 29 May 2021 04:39:28 GMT - commit 184eb6006e0e9a7f170a9208f923af0d568a31b6
3
+ Rollup.js v2.50.5
4
+ Sun, 30 May 2021 18:56:20 GMT - commit b3d130b1a5448a2abc07fa3d7cde749c3169d220
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.4";
35
+ var version$1 = "2.50.5";
36
36
 
37
37
  function ensureArray(items) {
38
38
  if (Array.isArray(items)) {
@@ -3465,10 +3465,11 @@ const knownGlobals = {
3465
3465
  Promise: {
3466
3466
  __proto__: null,
3467
3467
  [ValueProperties]: IMPURE,
3468
- all: PF,
3468
+ all: O,
3469
3469
  prototype: O,
3470
- race: PF,
3471
- resolve: PF
3470
+ race: O,
3471
+ reject: O,
3472
+ resolve: O
3472
3473
  },
3473
3474
  propertyIsEnumerable: O,
3474
3475
  Proxy: O,
@@ -5251,7 +5252,7 @@ class FunctionNode extends NodeBase {
5251
5252
  }
5252
5253
  }
5253
5254
  getReturnExpressionWhenCalledAtPath(path) {
5254
- return path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
5255
+ return !this.async && path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
5255
5256
  }
5256
5257
  hasEffects() {
5257
5258
  return this.id !== null && this.id.hasEffects();
@@ -5270,6 +5271,12 @@ class FunctionNode extends NodeBase {
5270
5271
  hasEffectsWhenCalledAtPath(path, callOptions, context) {
5271
5272
  if (path.length > 0)
5272
5273
  return true;
5274
+ if (this.async &&
5275
+ this.scope
5276
+ .getReturnExpression()
5277
+ .hasEffectsWhenCalledAtPath(['then'], { args: NO_ARGS, thisParam: null, withNew: false }, context)) {
5278
+ return true;
5279
+ }
5273
5280
  for (const param of this.params) {
5274
5281
  if (param.hasEffects(context))
5275
5282
  return true;
@@ -6178,7 +6185,14 @@ class AssignmentPattern extends NodeBase {
6178
6185
 
6179
6186
  class AwaitExpression extends NodeBase {
6180
6187
  hasEffects(context) {
6181
- return !context.ignore.returnAwaitYield || this.argument.hasEffects(context);
6188
+ const { propertyReadSideEffects } = this.context.options
6189
+ .treeshake;
6190
+ return (!context.ignore.returnAwaitYield ||
6191
+ this.argument.hasEffects(context) ||
6192
+ this.argument.hasEffectsWhenCalledAtPath(['then'], { args: NO_ARGS, thisParam: null, withNew: false }, context) ||
6193
+ (propertyReadSideEffects &&
6194
+ (propertyReadSideEffects === 'always' ||
6195
+ this.argument.hasEffectsWhenAccessedAtPath(['then'], context))));
6182
6196
  }
6183
6197
  include(context, includeChildrenRecursively) {
6184
6198
  if (!this.included) {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.50.4
4
- Sat, 29 May 2021 04:39:28 GMT - commit 184eb6006e0e9a7f170a9208f923af0d568a31b6
3
+ Rollup.js v2.50.5
4
+ Sun, 30 May 2021 18:56:20 GMT - commit b3d130b1a5448a2abc07fa3d7cde749c3169d220
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.50.4
4
- Sat, 29 May 2021 04:39:28 GMT - commit 184eb6006e0e9a7f170a9208f923af0d568a31b6
3
+ Rollup.js v2.50.5
4
+ Sun, 30 May 2021 18:56:20 GMT - commit b3d130b1a5448a2abc07fa3d7cde749c3169d220
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup",
3
- "version": "2.50.4",
3
+ "version": "2.50.5",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",