rollup 2.75.3 → 2.75.4

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.75.3
4
- Sun, 29 May 2022 14:46:24 GMT - commit 279581594d642307218126f20092aaf822084d6a
3
+ Rollup.js v2.75.4
4
+ Tue, 31 May 2022 11:26:29 GMT - commit 0409bf0d8859a43f2d5d40dc23ebf74afadb83f7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.3
4
- Sun, 29 May 2022 14:46:24 GMT - commit 279581594d642307218126f20092aaf822084d6a
3
+ Rollup.js v2.75.4
4
+ Tue, 31 May 2022 11:26:29 GMT - commit 0409bf0d8859a43f2d5d40dc23ebf74afadb83f7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.3
4
- Sun, 29 May 2022 14:46:24 GMT - commit 279581594d642307218126f20092aaf822084d6a
3
+ Rollup.js v2.75.4
4
+ Tue, 31 May 2022 11:26:29 GMT - commit 0409bf0d8859a43f2d5d40dc23ebf74afadb83f7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.3
4
- Sun, 29 May 2022 14:46:24 GMT - commit 279581594d642307218126f20092aaf822084d6a
3
+ Rollup.js v2.75.4
4
+ Tue, 31 May 2022 11:26:29 GMT - commit 0409bf0d8859a43f2d5d40dc23ebf74afadb83f7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.3
4
- Sun, 29 May 2022 14:46:24 GMT - commit 279581594d642307218126f20092aaf822084d6a
3
+ Rollup.js v2.75.4
4
+ Tue, 31 May 2022 11:26:29 GMT - commit 0409bf0d8859a43f2d5d40dc23ebf74afadb83f7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -27,7 +27,7 @@ function _interopNamespaceDefault(e) {
27
27
  return n;
28
28
  }
29
29
 
30
- var version$1 = "2.75.3";
30
+ var version$1 = "2.75.4";
31
31
 
32
32
  function ensureArray$1(items) {
33
33
  if (Array.isArray(items)) {
@@ -2227,6 +2227,7 @@ class ExpressionEntity {
2227
2227
  constructor() {
2228
2228
  this.included = false;
2229
2229
  }
2230
+ deoptimizeCallParameters() { }
2230
2231
  deoptimizePath(_path) { }
2231
2232
  deoptimizeThisOnEventAtPath(_event, _path, thisParameter, _recursionTracker) {
2232
2233
  thisParameter.deoptimizePath(UNKNOWN_PATH);
@@ -5335,6 +5336,11 @@ const INCLUDE_PARAMETERS = 'variables';
5335
5336
  class NodeBase extends ExpressionEntity {
5336
5337
  constructor(esTreeNode, parent, parentScope) {
5337
5338
  super();
5339
+ // Nodes can apply custom deoptimizations once they become part of the
5340
+ // executed code. To do this, they must initialize this as false, implement
5341
+ // applyDeoptimizations and call this from include and hasEffects if they
5342
+ // have custom handlers
5343
+ this.deoptimized = false;
5338
5344
  this.esTreeNode = esTreeNode;
5339
5345
  this.keys = keys[esTreeNode.type] || getAndCreateKeys(esTreeNode);
5340
5346
  this.parent = parent;
@@ -5372,7 +5378,7 @@ class NodeBase extends ExpressionEntity {
5372
5378
  this.scope = parentScope;
5373
5379
  }
5374
5380
  hasEffects(context) {
5375
- if (this.deoptimized === false)
5381
+ if (!this.deoptimized)
5376
5382
  this.applyDeoptimizations();
5377
5383
  for (const key of this.keys) {
5378
5384
  const value = this[key];
@@ -5390,7 +5396,7 @@ class NodeBase extends ExpressionEntity {
5390
5396
  return false;
5391
5397
  }
5392
5398
  include(context, includeChildrenRecursively, _options) {
5393
- if (this.deoptimized === false)
5399
+ if (!this.deoptimized)
5394
5400
  this.applyDeoptimizations();
5395
5401
  this.included = true;
5396
5402
  for (const key of this.keys) {
@@ -5489,10 +5495,6 @@ class NodeBase extends ExpressionEntity {
5489
5495
  }
5490
5496
 
5491
5497
  class SpreadElement extends NodeBase {
5492
- constructor() {
5493
- super(...arguments);
5494
- this.deoptimized = false;
5495
- }
5496
5498
  deoptimizeThisOnEventAtPath(event, path, thisParameter, recursionTracker) {
5497
5499
  if (path.length > 0) {
5498
5500
  this.argument.deoptimizeThisOnEventAtPath(event, [UnknownKey, ...path], thisParameter, recursionTracker);
@@ -6171,7 +6173,6 @@ const ARRAY_PROTOTYPE = new ObjectEntity({
6171
6173
  class ArrayExpression extends NodeBase {
6172
6174
  constructor() {
6173
6175
  super(...arguments);
6174
- this.deoptimized = false;
6175
6176
  this.objectEntity = null;
6176
6177
  }
6177
6178
  deoptimizePath(path) {
@@ -6200,11 +6201,16 @@ class ArrayExpression extends NodeBase {
6200
6201
  let hasSpread = false;
6201
6202
  for (let index = 0; index < this.elements.length; index++) {
6202
6203
  const element = this.elements[index];
6203
- if (hasSpread || element instanceof SpreadElement) {
6204
- if (element) {
6204
+ if (element) {
6205
+ if (hasSpread || element instanceof SpreadElement) {
6205
6206
  hasSpread = true;
6207
+ // This also deoptimizes parameter defaults
6206
6208
  element.deoptimizePath(UNKNOWN_PATH);
6207
6209
  }
6210
+ else {
6211
+ // We do not track parameter defaults in arrays
6212
+ element.deoptimizeCallParameters();
6213
+ }
6208
6214
  }
6209
6215
  }
6210
6216
  this.context.requestTreeshakingPass();
@@ -6298,6 +6304,10 @@ class LocalVariable extends Variable {
6298
6304
  this.additionalInitializers = null;
6299
6305
  }
6300
6306
  }
6307
+ deoptimizeCallParameters() {
6308
+ var _a;
6309
+ (_a = this.init) === null || _a === void 0 ? void 0 : _a.deoptimizeCallParameters();
6310
+ }
6301
6311
  deoptimizePath(path) {
6302
6312
  var _a, _b;
6303
6313
  if (this.isReassigned ||
@@ -6644,10 +6654,6 @@ class ReturnValueScope extends ParameterScope {
6644
6654
  }
6645
6655
 
6646
6656
  class AssignmentPattern extends NodeBase {
6647
- constructor() {
6648
- super(...arguments);
6649
- this.deoptimized = false;
6650
- }
6651
6657
  addExportedVariables(variables, exportNamesByVariable) {
6652
6658
  this.left.addExportedVariables(variables, exportNamesByVariable);
6653
6659
  }
@@ -6883,6 +6889,7 @@ class ExpressionStatement extends NodeBase {
6883
6889
  return this.parent.type !== Program$1;
6884
6890
  return super.shouldBeIncluded(context);
6885
6891
  }
6892
+ applyDeoptimizations() { }
6886
6893
  }
6887
6894
 
6888
6895
  class BlockStatement extends NodeBase {
@@ -6943,7 +6950,6 @@ class BlockStatement extends NodeBase {
6943
6950
  class RestElement extends NodeBase {
6944
6951
  constructor() {
6945
6952
  super(...arguments);
6946
- this.deoptimized = false;
6947
6953
  this.declarationInit = null;
6948
6954
  }
6949
6955
  addExportedVariables(variables, exportNamesByVariable) {
@@ -6981,6 +6987,9 @@ class FunctionBase extends NodeBase {
6981
6987
  deoptimizeCache() {
6982
6988
  this.forceIncludeParameters = true;
6983
6989
  }
6990
+ deoptimizeCallParameters() {
6991
+ this.forceIncludeParameters = true;
6992
+ }
6984
6993
  deoptimizePath(path) {
6985
6994
  this.getObjectEntity().deoptimizePath(path);
6986
6995
  if (path.length === 1 && path[0] === UnknownKey) {
@@ -8143,7 +8152,6 @@ class Identifier extends NodeBase {
8143
8152
  constructor() {
8144
8153
  super(...arguments);
8145
8154
  this.variable = null;
8146
- this.deoptimized = false;
8147
8155
  this.isTDZAccess = null;
8148
8156
  }
8149
8157
  addExportedVariables(variables, exportNamesByVariable) {
@@ -8188,11 +8196,17 @@ class Identifier extends NodeBase {
8188
8196
  variable.kind = kind;
8189
8197
  return [(this.variable = variable)];
8190
8198
  }
8199
+ deoptimizeCallParameters() {
8200
+ this.variable.deoptimizeCallParameters();
8201
+ }
8191
8202
  deoptimizePath(path) {
8203
+ var _a;
8192
8204
  if (path.length === 0 && !this.scope.contains(this.name)) {
8193
8205
  this.disallowImportReassignment();
8194
8206
  }
8195
- this.variable.deoptimizePath(path);
8207
+ // We keep conditional chaining because an unknown Node could have an
8208
+ // Identifier as property that might be deoptimized by default
8209
+ (_a = this.variable) === null || _a === void 0 ? void 0 : _a.deoptimizePath(path);
8196
8210
  }
8197
8211
  deoptimizeThisOnEventAtPath(event, path, thisParameter, recursionTracker) {
8198
8212
  this.variable.deoptimizeThisOnEventAtPath(event, path, thisParameter, recursionTracker);
@@ -8355,10 +8369,6 @@ class ObjectPattern extends NodeBase {
8355
8369
  }
8356
8370
 
8357
8371
  class AssignmentExpression extends NodeBase {
8358
- constructor() {
8359
- super(...arguments);
8360
- this.deoptimized = false;
8361
- }
8362
8372
  hasEffects(context) {
8363
8373
  if (!this.deoptimized)
8364
8374
  this.applyDeoptimizations();
@@ -8604,10 +8614,6 @@ class FunctionNode extends FunctionBase {
8604
8614
  }
8605
8615
 
8606
8616
  class AwaitExpression extends NodeBase {
8607
- constructor() {
8608
- super(...arguments);
8609
- this.deoptimized = false;
8610
- }
8611
8617
  hasEffects() {
8612
8618
  if (!this.deoptimized)
8613
8619
  this.applyDeoptimizations();
@@ -8801,7 +8807,6 @@ class MemberExpression extends NodeBase {
8801
8807
  constructor() {
8802
8808
  super(...arguments);
8803
8809
  this.variable = null;
8804
- this.deoptimized = false;
8805
8810
  this.bound = false;
8806
8811
  this.expressionsToBeDeoptimized = [];
8807
8812
  this.replacement = null;
@@ -9051,7 +9056,6 @@ class MemberExpression extends NodeBase {
9051
9056
  class CallExpressionBase extends NodeBase {
9052
9057
  constructor() {
9053
9058
  super(...arguments);
9054
- this.deoptimized = false;
9055
9059
  this.returnExpression = null;
9056
9060
  this.deoptimizableDependentExpressions = [];
9057
9061
  this.expressionsToBeDeoptimized = new Set();
@@ -9302,6 +9306,7 @@ class ClassBody extends NodeBase {
9302
9306
  }
9303
9307
  super.parseNode(esTreeNode);
9304
9308
  }
9309
+ applyDeoptimizations() { }
9305
9310
  }
9306
9311
 
9307
9312
  class MethodBase extends NodeBase {
@@ -9353,6 +9358,7 @@ class MethodBase extends NodeBase {
9353
9358
  hasEffectsWhenCalledAtPath(path, callOptions, context) {
9354
9359
  return this.getAccessedValue().hasEffectsWhenCalledAtPath(path, callOptions, context);
9355
9360
  }
9361
+ applyDeoptimizations() { }
9356
9362
  getAccessedValue() {
9357
9363
  if (this.accessedValue === null) {
9358
9364
  if (this.kind === 'get') {
@@ -9368,6 +9374,42 @@ class MethodBase extends NodeBase {
9368
9374
  }
9369
9375
 
9370
9376
  class MethodDefinition extends MethodBase {
9377
+ applyDeoptimizations() { }
9378
+ }
9379
+
9380
+ class PropertyDefinition extends NodeBase {
9381
+ deoptimizePath(path) {
9382
+ var _a;
9383
+ (_a = this.value) === null || _a === void 0 ? void 0 : _a.deoptimizePath(path);
9384
+ }
9385
+ deoptimizeThisOnEventAtPath(event, path, thisParameter, recursionTracker) {
9386
+ var _a;
9387
+ (_a = this.value) === null || _a === void 0 ? void 0 : _a.deoptimizeThisOnEventAtPath(event, path, thisParameter, recursionTracker);
9388
+ }
9389
+ getLiteralValueAtPath(path, recursionTracker, origin) {
9390
+ return this.value
9391
+ ? this.value.getLiteralValueAtPath(path, recursionTracker, origin)
9392
+ : UnknownValue;
9393
+ }
9394
+ getReturnExpressionWhenCalledAtPath(path, callOptions, recursionTracker, origin) {
9395
+ return this.value
9396
+ ? this.value.getReturnExpressionWhenCalledAtPath(path, callOptions, recursionTracker, origin)
9397
+ : UNKNOWN_EXPRESSION;
9398
+ }
9399
+ hasEffects(context) {
9400
+ var _a;
9401
+ return this.key.hasEffects(context) || (this.static && !!((_a = this.value) === null || _a === void 0 ? void 0 : _a.hasEffects(context)));
9402
+ }
9403
+ hasEffectsWhenAccessedAtPath(path, context) {
9404
+ return !this.value || this.value.hasEffectsWhenAccessedAtPath(path, context);
9405
+ }
9406
+ hasEffectsWhenAssignedAtPath(path, context) {
9407
+ return !this.value || this.value.hasEffectsWhenAssignedAtPath(path, context);
9408
+ }
9409
+ hasEffectsWhenCalledAtPath(path, callOptions, context) {
9410
+ return !this.value || this.value.hasEffectsWhenCalledAtPath(path, callOptions, context);
9411
+ }
9412
+ applyDeoptimizations() { }
9371
9413
  }
9372
9414
 
9373
9415
  class ObjectMember extends ExpressionEntity {
@@ -9402,7 +9444,6 @@ class ObjectMember extends ExpressionEntity {
9402
9444
  class ClassNode extends NodeBase {
9403
9445
  constructor() {
9404
9446
  super(...arguments);
9405
- this.deoptimized = false;
9406
9447
  this.objectEntity = null;
9407
9448
  }
9408
9449
  createScope(parentScope) {
@@ -9481,6 +9522,7 @@ class ClassNode extends NodeBase {
9481
9522
  this.classConstructor = null;
9482
9523
  }
9483
9524
  applyDeoptimizations() {
9525
+ var _a, _b;
9484
9526
  this.deoptimized = true;
9485
9527
  for (const definition of this.body.body) {
9486
9528
  if (!(definition.static ||
@@ -9488,7 +9530,11 @@ class ClassNode extends NodeBase {
9488
9530
  // Calls to methods are not tracked, ensure that the return value is deoptimized
9489
9531
  definition.deoptimizePath(UNKNOWN_PATH);
9490
9532
  }
9533
+ else if (definition instanceof PropertyDefinition) {
9534
+ (_a = definition.value) === null || _a === void 0 ? void 0 : _a.deoptimizeCallParameters();
9535
+ }
9491
9536
  }
9537
+ (_b = this.superClass) === null || _b === void 0 ? void 0 : _b.deoptimizeCallParameters();
9492
9538
  this.context.requestTreeshakingPass();
9493
9539
  }
9494
9540
  getObjectEntity() {
@@ -9817,6 +9863,7 @@ class ExportAllDeclaration extends NodeBase {
9817
9863
  render(code, _options, nodeRenderOptions) {
9818
9864
  code.remove(nodeRenderOptions.start, nodeRenderOptions.end);
9819
9865
  }
9866
+ applyDeoptimizations() { }
9820
9867
  }
9821
9868
  ExportAllDeclaration.prototype.needsBoundaries = true;
9822
9869
 
@@ -9894,6 +9941,7 @@ class ExportDefaultDeclaration extends NodeBase {
9894
9941
  }
9895
9942
  this.declaration.render(code, options);
9896
9943
  }
9944
+ applyDeoptimizations() { }
9897
9945
  renderNamedDeclaration(code, declarationStart, declarationKeyword, endMarker, needsId, options) {
9898
9946
  const { exportNamesByVariable, format, snippets: { getPropertyAccess } } = options;
9899
9947
  const name = this.variable.getName(getPropertyAccess);
@@ -9948,17 +9996,15 @@ class ExportNamedDeclaration extends NodeBase {
9948
9996
  this.declaration.render(code, options, { end, start });
9949
9997
  }
9950
9998
  }
9999
+ applyDeoptimizations() { }
9951
10000
  }
9952
10001
  ExportNamedDeclaration.prototype.needsBoundaries = true;
9953
10002
 
9954
10003
  class ExportSpecifier extends NodeBase {
10004
+ applyDeoptimizations() { }
9955
10005
  }
9956
10006
 
9957
10007
  class ForInStatement extends NodeBase {
9958
- constructor() {
9959
- super(...arguments);
9960
- this.deoptimized = false;
9961
- }
9962
10008
  createScope(parentScope) {
9963
10009
  this.scope = new BlockScope(parentScope);
9964
10010
  }
@@ -10007,10 +10053,6 @@ class ForInStatement extends NodeBase {
10007
10053
  }
10008
10054
 
10009
10055
  class ForOfStatement extends NodeBase {
10010
- constructor() {
10011
- super(...arguments);
10012
- this.deoptimized = false;
10013
- }
10014
10056
  createScope(parentScope) {
10015
10057
  this.scope = new BlockScope(parentScope);
10016
10058
  }
@@ -10205,6 +10247,7 @@ class IfStatement extends NodeBase {
10205
10247
  }
10206
10248
  this.renderHoistedDeclarations(hoistedDeclarations, code, getPropertyAccess);
10207
10249
  }
10250
+ applyDeoptimizations() { }
10208
10251
  getTestValue() {
10209
10252
  if (this.testValue === unset) {
10210
10253
  return (this.testValue = this.test.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, this));
@@ -10290,10 +10333,12 @@ class ImportDeclaration extends NodeBase {
10290
10333
  render(code, _options, nodeRenderOptions) {
10291
10334
  code.remove(nodeRenderOptions.start, nodeRenderOptions.end);
10292
10335
  }
10336
+ applyDeoptimizations() { }
10293
10337
  }
10294
10338
  ImportDeclaration.prototype.needsBoundaries = true;
10295
10339
 
10296
10340
  class ImportDefaultSpecifier extends NodeBase {
10341
+ applyDeoptimizations() { }
10297
10342
  }
10298
10343
 
10299
10344
  const INTEROP_DEFAULT_VARIABLE = '_interopDefault';
@@ -10552,6 +10597,7 @@ class ImportExpression extends NodeBase {
10552
10597
  setInternalResolution(inlineNamespace) {
10553
10598
  this.inlineNamespace = inlineNamespace;
10554
10599
  }
10600
+ applyDeoptimizations() { }
10555
10601
  getDynamicImportMechanismAndHelper(resolution, exportMode, { compact, dynamicImportFunction, format, generatedCode: { arrowFunctions }, interop }, { _, getDirectReturnFunction, getDirectReturnIifeLeft }, pluginDriver) {
10556
10602
  const mechanism = pluginDriver.hookFirstSync('renderDynamicImport', [
10557
10603
  {
@@ -10660,9 +10706,11 @@ const accessedImportGlobals = {
10660
10706
  };
10661
10707
 
10662
10708
  class ImportNamespaceSpecifier extends NodeBase {
10709
+ applyDeoptimizations() { }
10663
10710
  }
10664
10711
 
10665
10712
  class ImportSpecifier extends NodeBase {
10713
+ applyDeoptimizations() { }
10666
10714
  }
10667
10715
 
10668
10716
  class LabeledStatement extends NodeBase {
@@ -11008,10 +11056,6 @@ const importMetaMechanisms = {
11008
11056
  };
11009
11057
 
11010
11058
  class NewExpression extends NodeBase {
11011
- constructor() {
11012
- super(...arguments);
11013
- this.deoptimized = false;
11014
- }
11015
11059
  hasEffects(context) {
11016
11060
  try {
11017
11061
  for (const argument of this.arguments) {
@@ -11061,6 +11105,42 @@ class NewExpression extends NodeBase {
11061
11105
  }
11062
11106
  }
11063
11107
 
11108
+ class Property extends MethodBase {
11109
+ constructor() {
11110
+ super(...arguments);
11111
+ this.declarationInit = null;
11112
+ }
11113
+ declare(kind, init) {
11114
+ this.declarationInit = init;
11115
+ return this.value.declare(kind, UNKNOWN_EXPRESSION);
11116
+ }
11117
+ hasEffects(context) {
11118
+ if (!this.deoptimized)
11119
+ this.applyDeoptimizations();
11120
+ const propertyReadSideEffects = this.context.options.treeshake
11121
+ .propertyReadSideEffects;
11122
+ return ((this.parent.type === 'ObjectPattern' && propertyReadSideEffects === 'always') ||
11123
+ this.key.hasEffects(context) ||
11124
+ this.value.hasEffects(context));
11125
+ }
11126
+ markDeclarationReached() {
11127
+ this.value.markDeclarationReached();
11128
+ }
11129
+ render(code, options) {
11130
+ if (!this.shorthand) {
11131
+ this.key.render(code, options);
11132
+ }
11133
+ this.value.render(code, options, { isShorthandProperty: this.shorthand });
11134
+ }
11135
+ applyDeoptimizations() {
11136
+ this.deoptimized = true;
11137
+ if (this.declarationInit !== null) {
11138
+ this.declarationInit.deoptimizePath([UnknownKey, UnknownKey]);
11139
+ this.context.requestTreeshakingPass();
11140
+ }
11141
+ }
11142
+ }
11143
+
11064
11144
  class ObjectExpression extends NodeBase {
11065
11145
  constructor() {
11066
11146
  super(...arguments);
@@ -11098,6 +11178,14 @@ class ObjectExpression extends NodeBase {
11098
11178
  code.prependLeft(this.end, ')');
11099
11179
  }
11100
11180
  }
11181
+ applyDeoptimizations() {
11182
+ this.deoptimized = true;
11183
+ for (const property of this.properties) {
11184
+ if (property instanceof Property) {
11185
+ property.value.deoptimizeCallParameters();
11186
+ }
11187
+ }
11188
+ }
11101
11189
  getObjectEntity() {
11102
11190
  if (this.objectEntity !== null) {
11103
11191
  return this.objectEntity;
@@ -11174,77 +11262,7 @@ class Program extends NodeBase {
11174
11262
  super.render(code, options);
11175
11263
  }
11176
11264
  }
11177
- }
11178
-
11179
- class Property extends MethodBase {
11180
- constructor() {
11181
- super(...arguments);
11182
- this.deoptimized = false;
11183
- this.declarationInit = null;
11184
- }
11185
- declare(kind, init) {
11186
- this.declarationInit = init;
11187
- return this.value.declare(kind, UNKNOWN_EXPRESSION);
11188
- }
11189
- hasEffects(context) {
11190
- if (!this.deoptimized)
11191
- this.applyDeoptimizations();
11192
- const propertyReadSideEffects = this.context.options.treeshake
11193
- .propertyReadSideEffects;
11194
- return ((this.parent.type === 'ObjectPattern' && propertyReadSideEffects === 'always') ||
11195
- this.key.hasEffects(context) ||
11196
- this.value.hasEffects(context));
11197
- }
11198
- markDeclarationReached() {
11199
- this.value.markDeclarationReached();
11200
- }
11201
- render(code, options) {
11202
- if (!this.shorthand) {
11203
- this.key.render(code, options);
11204
- }
11205
- this.value.render(code, options, { isShorthandProperty: this.shorthand });
11206
- }
11207
- applyDeoptimizations() {
11208
- this.deoptimized = true;
11209
- if (this.declarationInit !== null) {
11210
- this.declarationInit.deoptimizePath([UnknownKey, UnknownKey]);
11211
- this.context.requestTreeshakingPass();
11212
- }
11213
- }
11214
- }
11215
-
11216
- class PropertyDefinition extends NodeBase {
11217
- deoptimizePath(path) {
11218
- var _a;
11219
- (_a = this.value) === null || _a === void 0 ? void 0 : _a.deoptimizePath(path);
11220
- }
11221
- deoptimizeThisOnEventAtPath(event, path, thisParameter, recursionTracker) {
11222
- var _a;
11223
- (_a = this.value) === null || _a === void 0 ? void 0 : _a.deoptimizeThisOnEventAtPath(event, path, thisParameter, recursionTracker);
11224
- }
11225
- getLiteralValueAtPath(path, recursionTracker, origin) {
11226
- return this.value
11227
- ? this.value.getLiteralValueAtPath(path, recursionTracker, origin)
11228
- : UnknownValue;
11229
- }
11230
- getReturnExpressionWhenCalledAtPath(path, callOptions, recursionTracker, origin) {
11231
- return this.value
11232
- ? this.value.getReturnExpressionWhenCalledAtPath(path, callOptions, recursionTracker, origin)
11233
- : UNKNOWN_EXPRESSION;
11234
- }
11235
- hasEffects(context) {
11236
- var _a;
11237
- return this.key.hasEffects(context) || (this.static && !!((_a = this.value) === null || _a === void 0 ? void 0 : _a.hasEffects(context)));
11238
- }
11239
- hasEffectsWhenAccessedAtPath(path, context) {
11240
- return !this.value || this.value.hasEffectsWhenAccessedAtPath(path, context);
11241
- }
11242
- hasEffectsWhenAssignedAtPath(path, context) {
11243
- return !this.value || this.value.hasEffectsWhenAssignedAtPath(path, context);
11244
- }
11245
- hasEffectsWhenCalledAtPath(path, callOptions, context) {
11246
- return !this.value || this.value.hasEffectsWhenCalledAtPath(path, callOptions, context);
11247
- }
11265
+ applyDeoptimizations() { }
11248
11266
  }
11249
11267
 
11250
11268
  class ReturnStatement extends NodeBase {
@@ -11841,10 +11859,6 @@ const unaryOperators = {
11841
11859
  '~': value => ~value
11842
11860
  };
11843
11861
  class UnaryExpression extends NodeBase {
11844
- constructor() {
11845
- super(...arguments);
11846
- this.deoptimized = false;
11847
- }
11848
11862
  getLiteralValueAtPath(path, recursionTracker, origin) {
11849
11863
  if (path.length > 0)
11850
11864
  return UnknownValue;
@@ -11887,10 +11901,6 @@ class UnknownNode extends NodeBase {
11887
11901
  }
11888
11902
 
11889
11903
  class UpdateExpression extends NodeBase {
11890
- constructor() {
11891
- super(...arguments);
11892
- this.deoptimized = false;
11893
- }
11894
11904
  hasEffects(context) {
11895
11905
  if (!this.deoptimized)
11896
11906
  this.applyDeoptimizations();
@@ -11992,6 +12002,7 @@ class VariableDeclaration extends NodeBase {
11992
12002
  this.renderReplacedDeclarations(code, options);
11993
12003
  }
11994
12004
  }
12005
+ applyDeoptimizations() { }
11995
12006
  renderDeclarationEnd(code, separatorString, lastSeparatorPos, actualContentEnd, renderedContentEnd, systemPatternExports, options) {
11996
12007
  if (code.original.charCodeAt(this.end - 1) === 59 /*";"*/) {
11997
12008
  code.remove(this.end - 1, this.end);
@@ -12148,6 +12159,7 @@ class VariableDeclarator extends NodeBase {
12148
12159
  code.appendLeft(this.end, `${_}=${_}void 0`);
12149
12160
  }
12150
12161
  }
12162
+ applyDeoptimizations() { }
12151
12163
  }
12152
12164
 
12153
12165
  class WhileStatement extends NodeBase {
@@ -12174,10 +12186,6 @@ class WhileStatement extends NodeBase {
12174
12186
  }
12175
12187
 
12176
12188
  class YieldExpression extends NodeBase {
12177
- constructor() {
12178
- super(...arguments);
12179
- this.deoptimized = false;
12180
- }
12181
12189
  hasEffects(context) {
12182
12190
  var _a;
12183
12191
  if (!this.deoptimized)
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.3
4
- Sun, 29 May 2022 14:46:24 GMT - commit 279581594d642307218126f20092aaf822084d6a
3
+ Rollup.js v2.75.4
4
+ Tue, 31 May 2022 11:26:29 GMT - commit 0409bf0d8859a43f2d5d40dc23ebf74afadb83f7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.3
4
- Sun, 29 May 2022 14:46:24 GMT - commit 279581594d642307218126f20092aaf822084d6a
3
+ Rollup.js v2.75.4
4
+ Tue, 31 May 2022 11:26:29 GMT - commit 0409bf0d8859a43f2d5d40dc23ebf74afadb83f7
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup",
3
- "version": "2.75.3",
3
+ "version": "2.75.4",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -24,7 +24,7 @@
24
24
  "perf:init": "node scripts/perf-init.js",
25
25
  "postpublish": "git push && git push --tags",
26
26
  "prepare": "husky install && npm run build",
27
- "prepublishOnly": "npm ci && npm run lint:nofix && npm run security && npm run build:bootstrap && npm run test:all",
27
+ "prepublishOnly": "git pull --ff-only && npm ci && npm run lint:nofix && npm run security && npm run build:bootstrap && npm run test:all",
28
28
  "security": "npm audit",
29
29
  "test": "npm run build && npm run test:all",
30
30
  "test:cjs": "npm run build:cjs && npm run test:only",