rollup 2.52.2 → 2.52.3

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/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
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.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -14,7 +14,7 @@ import * as fs from 'fs';
14
14
  import { lstatSync, realpathSync, readdirSync } from 'fs';
15
15
  import { EventEmitter } from 'events';
16
16
 
17
- var version$1 = "2.52.2";
17
+ var version$1 = "2.52.3";
18
18
 
19
19
  var charToInteger = {};
20
20
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -4105,7 +4105,11 @@ class Identifier extends NodeBase {
4105
4105
  const { treeshake } = this.context.options;
4106
4106
  switch (kind) {
4107
4107
  case 'var':
4108
- variable = this.scope.addDeclaration(this, this.context, treeshake && treeshake.correctVarValueBeforeDeclaration ? UNKNOWN_EXPRESSION : init, true);
4108
+ variable = this.scope.addDeclaration(this, this.context, init, true);
4109
+ if (treeshake && treeshake.correctVarValueBeforeDeclaration) {
4110
+ // Necessary to make sure the init is deoptimized. We cannot call deoptimizePath here.
4111
+ this.scope.addDeclaration(this, this.context, UNDEFINED_EXPRESSION, true);
4112
+ }
4109
4113
  break;
4110
4114
  case 'function':
4111
4115
  // in strict mode, functions are only hoisted within a scope but not across block scopes
@@ -5852,7 +5856,9 @@ class ArrayPattern extends NodeBase {
5852
5856
  class BlockScope extends ChildScope {
5853
5857
  addDeclaration(identifier, context, init, isHoisted) {
5854
5858
  if (isHoisted) {
5855
- return this.parent.addDeclaration(identifier, context, UNKNOWN_EXPRESSION, isHoisted);
5859
+ this.parent.addDeclaration(identifier, context, init, isHoisted);
5860
+ // Necessary to make sure the init is deoptimized. We cannot call deoptimizePath here.
5861
+ return this.parent.addDeclaration(identifier, context, UNDEFINED_EXPRESSION, isHoisted);
5856
5862
  }
5857
5863
  else {
5858
5864
  return super.addDeclaration(identifier, context, init, false);
@@ -6694,8 +6700,7 @@ class CatchScope extends ParameterScope {
6694
6700
  existingParameter.addDeclaration(identifier, init);
6695
6701
  return existingParameter;
6696
6702
  }
6697
- // as parameters are handled differently, all remaining declarations are
6698
- // hoisted
6703
+ // as parameters are handled differently, all remaining declarations are hoisted
6699
6704
  return this.parent.addDeclaration(identifier, context, init, isHoisted);
6700
6705
  }
6701
6706
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
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.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup