rollup 2.52.6 → 2.52.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/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.6
4
- Thu, 01 Jul 2021 05:19:49 GMT - commit 9cb15d65bb023d32ae0180f0db583ea992c475b9
3
+ Rollup.js v2.52.7
4
+ Fri, 02 Jul 2021 03:59:47 GMT - commit b2218ccda2765c48ae1db8bade9ec6889aaab250
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.6
4
- Thu, 01 Jul 2021 05:19:49 GMT - commit 9cb15d65bb023d32ae0180f0db583ea992c475b9
3
+ Rollup.js v2.52.7
4
+ Fri, 02 Jul 2021 03:59:47 GMT - commit b2218ccda2765c48ae1db8bade9ec6889aaab250
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.6
4
- Thu, 01 Jul 2021 05:19:49 GMT - commit 9cb15d65bb023d32ae0180f0db583ea992c475b9
3
+ Rollup.js v2.52.7
4
+ Fri, 02 Jul 2021 03:59:47 GMT - commit b2218ccda2765c48ae1db8bade9ec6889aaab250
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.6
4
- Thu, 01 Jul 2021 05:19:49 GMT - commit 9cb15d65bb023d32ae0180f0db583ea992c475b9
3
+ Rollup.js v2.52.7
4
+ Fri, 02 Jul 2021 03:59:47 GMT - commit b2218ccda2765c48ae1db8bade9ec6889aaab250
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.6
4
- Thu, 01 Jul 2021 05:19:49 GMT - commit 9cb15d65bb023d32ae0180f0db583ea992c475b9
3
+ Rollup.js v2.52.7
4
+ Fri, 02 Jul 2021 03:59:47 GMT - commit b2218ccda2765c48ae1db8bade9ec6889aaab250
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.52.6";
35
+ var version$1 = "2.52.7";
36
36
 
37
37
  function ensureArray(items) {
38
38
  if (Array.isArray(items)) {
@@ -5628,6 +5628,7 @@ class RestElement extends NodeBase {
5628
5628
  class FunctionNode extends NodeBase {
5629
5629
  constructor() {
5630
5630
  super(...arguments);
5631
+ this.deoptimizedReturn = false;
5631
5632
  this.isPrototypeDeoptimized = false;
5632
5633
  }
5633
5634
  createScope(parentScope) {
@@ -5658,7 +5659,18 @@ class FunctionNode extends NodeBase {
5658
5659
  }
5659
5660
  }
5660
5661
  getReturnExpressionWhenCalledAtPath(path) {
5661
- return !this.async && path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
5662
+ if (path.length !== 0) {
5663
+ return UNKNOWN_EXPRESSION;
5664
+ }
5665
+ if (this.async) {
5666
+ if (!this.deoptimizedReturn) {
5667
+ this.deoptimizedReturn = true;
5668
+ this.scope.getReturnExpression().deoptimizePath(UNKNOWN_PATH);
5669
+ this.context.requestTreeshakingPass();
5670
+ }
5671
+ return UNKNOWN_EXPRESSION;
5672
+ }
5673
+ return this.scope.getReturnExpression();
5662
5674
  }
5663
5675
  hasEffects() {
5664
5676
  return this.id !== null && this.id.hasEffects();
@@ -6420,6 +6432,10 @@ class BlockStatement extends NodeBase {
6420
6432
  }
6421
6433
 
6422
6434
  class ArrowFunctionExpression extends NodeBase {
6435
+ constructor() {
6436
+ super(...arguments);
6437
+ this.deoptimizedReturn = false;
6438
+ }
6423
6439
  createScope(parentScope) {
6424
6440
  this.scope = new ReturnValueScope(parentScope, this.context);
6425
6441
  }
@@ -6433,7 +6449,18 @@ class ArrowFunctionExpression extends NodeBase {
6433
6449
  // Arrow functions do not mutate their context
6434
6450
  deoptimizeThisOnEventAtPath() { }
6435
6451
  getReturnExpressionWhenCalledAtPath(path) {
6436
- return !this.async && path.length === 0 ? this.scope.getReturnExpression() : UNKNOWN_EXPRESSION;
6452
+ if (path.length !== 0) {
6453
+ return UNKNOWN_EXPRESSION;
6454
+ }
6455
+ if (this.async) {
6456
+ if (!this.deoptimizedReturn) {
6457
+ this.deoptimizedReturn = true;
6458
+ this.scope.getReturnExpression().deoptimizePath(UNKNOWN_PATH);
6459
+ this.context.requestTreeshakingPass();
6460
+ }
6461
+ return UNKNOWN_EXPRESSION;
6462
+ }
6463
+ return this.scope.getReturnExpression();
6437
6464
  }
6438
6465
  hasEffects() {
6439
6466
  return false;
@@ -6640,6 +6667,7 @@ class AwaitExpression extends NodeBase {
6640
6667
  applyDeoptimizations() {
6641
6668
  this.deoptimized = true;
6642
6669
  this.argument.deoptimizePath(UNKNOWN_PATH);
6670
+ this.context.requestTreeshakingPass();
6643
6671
  }
6644
6672
  }
6645
6673
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.6
4
- Thu, 01 Jul 2021 05:19:49 GMT - commit 9cb15d65bb023d32ae0180f0db583ea992c475b9
3
+ Rollup.js v2.52.7
4
+ Fri, 02 Jul 2021 03:59:47 GMT - commit b2218ccda2765c48ae1db8bade9ec6889aaab250
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.6
4
- Thu, 01 Jul 2021 05:19:49 GMT - commit 9cb15d65bb023d32ae0180f0db583ea992c475b9
3
+ Rollup.js v2.52.7
4
+ Fri, 02 Jul 2021 03:59:47 GMT - commit b2218ccda2765c48ae1db8bade9ec6889aaab250
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.52.6",
3
+ "version": "2.52.7",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",