rollup 2.53.2 → 2.53.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.53.2
4
- Thu, 15 Jul 2021 04:13:48 GMT - commit ea96ab0b57f52aaacc55baa84bd640b67029dcca
3
+ Rollup.js v2.53.3
4
+ Wed, 21 Jul 2021 06:45:44 GMT - commit ae8f57f926433f9ef3a3ecdd39b224674c7e68af
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.53.2
4
- Thu, 15 Jul 2021 04:13:48 GMT - commit ea96ab0b57f52aaacc55baa84bd640b67029dcca
3
+ Rollup.js v2.53.3
4
+ Wed, 21 Jul 2021 06:45:44 GMT - commit ae8f57f926433f9ef3a3ecdd39b224674c7e68af
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -13,7 +13,7 @@ import { createHash as createHash$1 } from 'crypto';
13
13
  import fs, { lstatSync, realpathSync, readdirSync } from 'fs';
14
14
  import { EventEmitter } from 'events';
15
15
 
16
- var version$1 = "2.53.2";
16
+ var version$1 = "2.53.3";
17
17
 
18
18
  var charToInteger = {};
19
19
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -2933,8 +2933,8 @@ const MAX_PATH_DEPTH = 7;
2933
2933
  class LocalVariable extends Variable {
2934
2934
  constructor(name, declarator, init, context) {
2935
2935
  super(name);
2936
- this.additionalInitializers = null;
2937
2936
  this.calledFromTryStatement = false;
2937
+ this.additionalInitializers = null;
2938
2938
  this.expressionsToBeDeoptimized = [];
2939
2939
  this.declarations = declarator ? [declarator] : [];
2940
2940
  this.init = init;
@@ -2943,13 +2943,9 @@ class LocalVariable extends Variable {
2943
2943
  }
2944
2944
  addDeclaration(identifier, init) {
2945
2945
  this.declarations.push(identifier);
2946
- if (this.additionalInitializers === null) {
2947
- this.additionalInitializers = this.init === null ? [] : [this.init];
2948
- this.init = UNKNOWN_EXPRESSION;
2949
- this.isReassigned = true;
2950
- }
2946
+ const additionalInitializers = this.markInitializersForDeoptimization();
2951
2947
  if (init !== null) {
2952
- this.additionalInitializers.push(init);
2948
+ additionalInitializers.push(init);
2953
2949
  }
2954
2950
  }
2955
2951
  consolidateInitializers() {
@@ -3065,6 +3061,14 @@ class LocalVariable extends Variable {
3065
3061
  markCalledFromTryStatement() {
3066
3062
  this.calledFromTryStatement = true;
3067
3063
  }
3064
+ markInitializersForDeoptimization() {
3065
+ if (this.additionalInitializers === null) {
3066
+ this.additionalInitializers = this.init === null ? [] : [this.init];
3067
+ this.init = UNKNOWN_EXPRESSION;
3068
+ this.isReassigned = true;
3069
+ }
3070
+ return this.additionalInitializers;
3071
+ }
3068
3072
  }
3069
3073
 
3070
3074
  class Scope$1 {
@@ -4117,7 +4121,7 @@ class Identifier extends NodeBase {
4117
4121
  variable = this.scope.addDeclaration(this, this.context, init, true);
4118
4122
  if (treeshake && treeshake.correctVarValueBeforeDeclaration) {
4119
4123
  // Necessary to make sure the init is deoptimized. We cannot call deoptimizePath here.
4120
- this.scope.addDeclaration(this, this.context, UNDEFINED_EXPRESSION, true);
4124
+ variable.markInitializersForDeoptimization();
4121
4125
  }
4122
4126
  break;
4123
4127
  case 'function':
@@ -5953,10 +5957,11 @@ class ArrayPattern extends NodeBase {
5953
5957
  class BlockScope extends ChildScope {
5954
5958
  addDeclaration(identifier, context, init, isHoisted) {
5955
5959
  if (isHoisted) {
5956
- this.parent.addDeclaration(identifier, context, init, isHoisted);
5960
+ const variable = this.parent.addDeclaration(identifier, context, init, isHoisted);
5957
5961
  // Necessary to make sure the init is deoptimized for conditional declarations.
5958
5962
  // We cannot call deoptimizePath here.
5959
- return this.parent.addDeclaration(identifier, context, UNDEFINED_EXPRESSION, isHoisted);
5963
+ variable.markInitializersForDeoptimization();
5964
+ return variable;
5960
5965
  }
5961
5966
  else {
5962
5967
  return super.addDeclaration(identifier, context, init, false);
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.53.2
4
- Thu, 15 Jul 2021 04:13:48 GMT - commit ea96ab0b57f52aaacc55baa84bd640b67029dcca
3
+ Rollup.js v2.53.3
4
+ Wed, 21 Jul 2021 06:45:44 GMT - commit ae8f57f926433f9ef3a3ecdd39b224674c7e68af
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.53.2
4
- Thu, 15 Jul 2021 04:13:48 GMT - commit ea96ab0b57f52aaacc55baa84bd640b67029dcca
3
+ Rollup.js v2.53.3
4
+ Wed, 21 Jul 2021 06:45:44 GMT - commit ae8f57f926433f9ef3a3ecdd39b224674c7e68af
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup