rollup 3.4.0-0 → 3.4.0-1

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/bin/rollup CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v3.4.0-0
6
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
5
+ Rollup.js v3.4.0-1
6
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
7
7
 
8
8
  https://github.com/rollup/rollup
9
9
 
package/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -16,7 +16,7 @@ import { promises } from 'node:fs';
16
16
  import { EventEmitter } from 'node:events';
17
17
  import * as tty from 'tty';
18
18
 
19
- var version$1 = "3.4.0-0";
19
+ var version$1 = "3.4.0-1";
20
20
 
21
21
  var charToInteger = {};
22
22
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -1776,7 +1776,7 @@ class ExpressionEntity {
1776
1776
  return UnknownValue;
1777
1777
  }
1778
1778
  getReturnExpressionWhenCalledAtPath(_path, _interaction, _recursionTracker, _origin) {
1779
- return UNKNOWN_EXPRESSION;
1779
+ return UNKNOWN_RETURN_EXPRESSION;
1780
1780
  }
1781
1781
  hasEffectsOnInteractionAtPath(_path, _interaction, _context) {
1782
1782
  return true;
@@ -1795,6 +1795,10 @@ class ExpressionEntity {
1795
1795
  }
1796
1796
  const UNKNOWN_EXPRESSION = new (class UnknownExpression extends ExpressionEntity {
1797
1797
  })();
1798
+ const UNKNOWN_RETURN_EXPRESSION = [
1799
+ UNKNOWN_EXPRESSION,
1800
+ false
1801
+ ];
1798
1802
 
1799
1803
  const INTERACTION_ACCESSED = 0;
1800
1804
  const INTERACTION_ASSIGNED = 1;
@@ -4930,7 +4934,7 @@ const UNKNOWN_LITERAL_BOOLEAN = new (class UnknownBoolean extends ExpressionEnti
4930
4934
  if (path.length === 1) {
4931
4935
  return getMemberReturnExpressionWhenCalled(literalBooleanMembers, path[0]);
4932
4936
  }
4933
- return UNKNOWN_EXPRESSION;
4937
+ return UNKNOWN_RETURN_EXPRESSION;
4934
4938
  }
4935
4939
  hasEffectsOnInteractionAtPath(path, interaction, context) {
4936
4940
  if (interaction.type === INTERACTION_ACCESSED) {
@@ -4953,7 +4957,7 @@ const UNKNOWN_LITERAL_NUMBER = new (class UnknownNumber extends ExpressionEntity
4953
4957
  if (path.length === 1) {
4954
4958
  return getMemberReturnExpressionWhenCalled(literalNumberMembers, path[0]);
4955
4959
  }
4956
- return UNKNOWN_EXPRESSION;
4960
+ return UNKNOWN_RETURN_EXPRESSION;
4957
4961
  }
4958
4962
  hasEffectsOnInteractionAtPath(path, interaction, context) {
4959
4963
  if (interaction.type === INTERACTION_ACCESSED) {
@@ -4976,7 +4980,7 @@ const UNKNOWN_LITERAL_STRING = new (class UnknownString extends ExpressionEntity
4976
4980
  if (path.length === 1) {
4977
4981
  return getMemberReturnExpressionWhenCalled(literalStringMembers, path[0]);
4978
4982
  }
4979
- return UNKNOWN_EXPRESSION;
4983
+ return UNKNOWN_RETURN_EXPRESSION;
4980
4984
  }
4981
4985
  hasEffectsOnInteractionAtPath(path, interaction, context) {
4982
4986
  if (interaction.type === INTERACTION_ACCESSED) {
@@ -5097,8 +5101,8 @@ function hasMemberEffectWhenCalled(members, memberName, interaction, context) {
5097
5101
  }
5098
5102
  function getMemberReturnExpressionWhenCalled(members, memberName) {
5099
5103
  if (typeof memberName !== 'string' || !members[memberName])
5100
- return UNKNOWN_EXPRESSION;
5101
- return members[memberName].returns;
5104
+ return UNKNOWN_RETURN_EXPRESSION;
5105
+ return [members[memberName].returns, false];
5102
5106
  }
5103
5107
 
5104
5108
  // AST walker module for Mozilla Parser API compatible trees
@@ -5748,12 +5752,15 @@ class Method extends ExpressionEntity {
5748
5752
  }
5749
5753
  getReturnExpressionWhenCalledAtPath(path, { thisArg }) {
5750
5754
  if (path.length > 0) {
5751
- return UNKNOWN_EXPRESSION;
5755
+ return UNKNOWN_RETURN_EXPRESSION;
5752
5756
  }
5753
- return (this.description.returnsPrimitive ||
5754
- (this.description.returns === 'self'
5755
- ? thisArg || UNKNOWN_EXPRESSION
5756
- : this.description.returns()));
5757
+ return [
5758
+ this.description.returnsPrimitive ||
5759
+ (this.description.returns === 'self'
5760
+ ? thisArg || UNKNOWN_EXPRESSION
5761
+ : this.description.returns()),
5762
+ false
5763
+ ];
5757
5764
  }
5758
5765
  hasEffectsOnInteractionAtPath(path, interaction, context) {
5759
5766
  const { type } = interaction;
@@ -5996,7 +6003,7 @@ class ObjectEntity extends ExpressionEntity {
5996
6003
  }
5997
6004
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
5998
6005
  if (path.length === 0) {
5999
- return UNKNOWN_EXPRESSION;
6006
+ return UNKNOWN_RETURN_EXPRESSION;
6000
6007
  }
6001
6008
  const [key, ...subPath] = path;
6002
6009
  const expressionAtPath = this.getMemberExpressionAndTrackDeopt(key, origin);
@@ -6006,7 +6013,7 @@ class ObjectEntity extends ExpressionEntity {
6006
6013
  if (this.prototypeExpression) {
6007
6014
  return this.prototypeExpression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
6008
6015
  }
6009
- return UNKNOWN_EXPRESSION;
6016
+ return UNKNOWN_RETURN_EXPRESSION;
6010
6017
  }
6011
6018
  hasEffectsOnInteractionAtPath(path, interaction, context) {
6012
6019
  const [key, ...subPath] = path;
@@ -6478,12 +6485,12 @@ class LocalVariable extends Variable {
6478
6485
  }
6479
6486
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
6480
6487
  if (this.isReassigned || !this.init) {
6481
- return UNKNOWN_EXPRESSION;
6488
+ return UNKNOWN_RETURN_EXPRESSION;
6482
6489
  }
6483
6490
  return recursionTracker.withTrackedEntityAtPath(path, this.init, () => {
6484
6491
  this.expressionsToBeDeoptimized.push(origin);
6485
6492
  return this.init.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
6486
- }, UNKNOWN_EXPRESSION);
6493
+ }, UNKNOWN_RETURN_EXPRESSION);
6487
6494
  }
6488
6495
  hasEffectsOnInteractionAtPath(path, interaction, context) {
6489
6496
  switch (interaction.type) {
@@ -7830,7 +7837,8 @@ class Identifier extends NodeBase {
7830
7837
  return this.getVariableRespectingTDZ().getLiteralValueAtPath(path, recursionTracker, origin);
7831
7838
  }
7832
7839
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
7833
- return this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
7840
+ const [expression, isPure] = this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
7841
+ return [expression, isPure || this.isPureFunction(path)];
7834
7842
  }
7835
7843
  hasEffects(context) {
7836
7844
  if (!this.deoptimized)
@@ -7840,6 +7848,7 @@ class Identifier extends NodeBase {
7840
7848
  }
7841
7849
  return (this.context.options.treeshake.unknownGlobalSideEffects &&
7842
7850
  this.variable instanceof GlobalVariable &&
7851
+ !this.isPureFunction(EMPTY_PATH) &&
7843
7852
  this.variable.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_ACCESS, context));
7844
7853
  }
7845
7854
  hasEffectsOnInteractionAtPath(path, interaction, context) {
@@ -7940,6 +7949,9 @@ class Identifier extends NodeBase {
7940
7949
  let currentPureFunction = this.context.manualPureFunctions[this.name];
7941
7950
  for (const segment of path) {
7942
7951
  if (currentPureFunction) {
7952
+ if (currentPureFunction[PureFunctionKey]) {
7953
+ return true;
7954
+ }
7943
7955
  currentPureFunction = currentPureFunction[segment];
7944
7956
  }
7945
7957
  else {
@@ -8269,9 +8281,9 @@ class FunctionBase extends NodeBase {
8269
8281
  this.scope.getReturnExpression().deoptimizePath(UNKNOWN_PATH);
8270
8282
  this.context.requestTreeshakingPass();
8271
8283
  }
8272
- return UNKNOWN_EXPRESSION;
8284
+ return UNKNOWN_RETURN_EXPRESSION;
8273
8285
  }
8274
- return this.scope.getReturnExpression();
8286
+ return [this.scope.getReturnExpression(), false];
8275
8287
  }
8276
8288
  hasEffectsOnInteractionAtPath(path, interaction, context) {
8277
8289
  if (path.length > 0 || interaction.type !== INTERACTION_CALLED) {
@@ -8870,7 +8882,7 @@ class Literal extends NodeBase {
8870
8882
  }
8871
8883
  getReturnExpressionWhenCalledAtPath(path) {
8872
8884
  if (path.length !== 1)
8873
- return UNKNOWN_EXPRESSION;
8885
+ return UNKNOWN_RETURN_EXPRESSION;
8874
8886
  return getMemberReturnExpressionWhenCalled(this.members, path[0]);
8875
8887
  }
8876
8888
  hasEffectsOnInteractionAtPath(path, interaction, context) {
@@ -9023,13 +9035,13 @@ class MemberExpression extends NodeBase {
9023
9035
  return this.variable.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9024
9036
  }
9025
9037
  if (this.isUndefined) {
9026
- return UNDEFINED_EXPRESSION;
9038
+ return [UNDEFINED_EXPRESSION, false];
9027
9039
  }
9028
9040
  this.expressionsToBeDeoptimized.push(origin);
9029
9041
  if (path.length < MAX_PATH_DEPTH) {
9030
9042
  return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(), ...path], interaction, recursionTracker, origin);
9031
9043
  }
9032
- return UNKNOWN_EXPRESSION;
9044
+ return UNKNOWN_RETURN_EXPRESSION;
9033
9045
  }
9034
9046
  hasEffects(context) {
9035
9047
  if (!this.deoptimized)
@@ -9206,8 +9218,8 @@ class CallExpressionBase extends NodeBase {
9206
9218
  this.expressionsToBeDeoptimized = new Set();
9207
9219
  }
9208
9220
  deoptimizeCache() {
9209
- if (this.returnExpression !== UNKNOWN_EXPRESSION) {
9210
- this.returnExpression = UNKNOWN_EXPRESSION;
9221
+ if (this.returnExpression?.[0] !== UNKNOWN_EXPRESSION) {
9222
+ this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
9211
9223
  for (const expression of this.deoptimizableDependentExpressions) {
9212
9224
  expression.deoptimizeCache();
9213
9225
  }
@@ -9221,13 +9233,15 @@ class CallExpressionBase extends NodeBase {
9221
9233
  this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(path, this)) {
9222
9234
  return;
9223
9235
  }
9224
- const returnExpression = this.getReturnExpression();
9236
+ const [returnExpression] = this.getReturnExpression();
9225
9237
  if (returnExpression !== UNKNOWN_EXPRESSION) {
9226
9238
  returnExpression.deoptimizePath(path);
9227
9239
  }
9228
9240
  }
9229
9241
  deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
9230
- const returnExpression = this.getReturnExpression(recursionTracker);
9242
+ const [returnExpression, isPure] = this.getReturnExpression(recursionTracker);
9243
+ if (isPure)
9244
+ return;
9231
9245
  if (returnExpression === UNKNOWN_EXPRESSION) {
9232
9246
  interaction.thisArg.deoptimizePath(UNKNOWN_PATH);
9233
9247
  }
@@ -9239,7 +9253,7 @@ class CallExpressionBase extends NodeBase {
9239
9253
  }
9240
9254
  }
9241
9255
  getLiteralValueAtPath(path, recursionTracker, origin) {
9242
- const returnExpression = this.getReturnExpression(recursionTracker);
9256
+ const [returnExpression] = this.getReturnExpression(recursionTracker);
9243
9257
  if (returnExpression === UNKNOWN_EXPRESSION) {
9244
9258
  return UnknownValue;
9245
9259
  }
@@ -9250,13 +9264,14 @@ class CallExpressionBase extends NodeBase {
9250
9264
  }
9251
9265
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
9252
9266
  const returnExpression = this.getReturnExpression(recursionTracker);
9253
- if (this.returnExpression === UNKNOWN_EXPRESSION) {
9254
- return UNKNOWN_EXPRESSION;
9267
+ if (returnExpression[0] === UNKNOWN_EXPRESSION) {
9268
+ return returnExpression;
9255
9269
  }
9256
9270
  return recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
9257
9271
  this.deoptimizableDependentExpressions.push(origin);
9258
- return returnExpression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9259
- }, UNKNOWN_EXPRESSION);
9272
+ const [expression, isPure] = returnExpression[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9273
+ return [expression, isPure || returnExpression[1]];
9274
+ }, UNKNOWN_RETURN_EXPRESSION);
9260
9275
  }
9261
9276
  hasEffectsOnInteractionAtPath(path, interaction, context) {
9262
9277
  const { type } = interaction;
@@ -9271,7 +9286,9 @@ class CallExpressionBase extends NodeBase {
9271
9286
  : context.accessed).trackEntityAtPathAndGetIfTracked(path, this)) {
9272
9287
  return false;
9273
9288
  }
9274
- return this.getReturnExpression().hasEffectsOnInteractionAtPath(path, interaction, context);
9289
+ const [returnExpression, isPure] = this.getReturnExpression();
9290
+ return ((type === INTERACTION_ASSIGNED || !isPure) &&
9291
+ returnExpression.hasEffectsOnInteractionAtPath(path, interaction, context));
9275
9292
  }
9276
9293
  }
9277
9294
 
@@ -9350,7 +9367,7 @@ class CallExpression extends CallExpressionBase {
9350
9367
  }
9351
9368
  getReturnExpression(recursionTracker = SHARED_RECURSION_TRACKER) {
9352
9369
  if (this.returnExpression === null) {
9353
- this.returnExpression = UNKNOWN_EXPRESSION;
9370
+ this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
9354
9371
  return (this.returnExpression = this.callee.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, this.interaction, recursionTracker, this));
9355
9372
  }
9356
9373
  return this.returnExpression;
@@ -9434,7 +9451,7 @@ class MethodBase extends NodeBase {
9434
9451
  // expressions, there is no known situation where a getter is deoptimized.
9435
9452
  deoptimizeCache() { }
9436
9453
  deoptimizePath(path) {
9437
- this.getAccessedValue().deoptimizePath(path);
9454
+ this.getAccessedValue()[0].deoptimizePath(path);
9438
9455
  }
9439
9456
  deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
9440
9457
  if (interaction.type === INTERACTION_ACCESSED && this.kind === 'get' && path.length === 0) {
@@ -9453,13 +9470,13 @@ class MethodBase extends NodeBase {
9453
9470
  withNew: false
9454
9471
  }, EMPTY_PATH, recursionTracker);
9455
9472
  }
9456
- this.getAccessedValue().deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker);
9473
+ this.getAccessedValue()[0].deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker);
9457
9474
  }
9458
9475
  getLiteralValueAtPath(path, recursionTracker, origin) {
9459
- return this.getAccessedValue().getLiteralValueAtPath(path, recursionTracker, origin);
9476
+ return this.getAccessedValue()[0].getLiteralValueAtPath(path, recursionTracker, origin);
9460
9477
  }
9461
9478
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
9462
- return this.getAccessedValue().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9479
+ return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9463
9480
  }
9464
9481
  hasEffects(context) {
9465
9482
  return this.key.hasEffects(context);
@@ -9482,17 +9499,17 @@ class MethodBase extends NodeBase {
9482
9499
  withNew: false
9483
9500
  }, context);
9484
9501
  }
9485
- return this.getAccessedValue().hasEffectsOnInteractionAtPath(path, interaction, context);
9502
+ return this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(path, interaction, context);
9486
9503
  }
9487
9504
  applyDeoptimizations() { }
9488
9505
  getAccessedValue() {
9489
9506
  if (this.accessedValue === null) {
9490
9507
  if (this.kind === 'get') {
9491
- this.accessedValue = UNKNOWN_EXPRESSION;
9508
+ this.accessedValue = UNKNOWN_RETURN_EXPRESSION;
9492
9509
  return (this.accessedValue = this.value.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, SHARED_RECURSION_TRACKER, this));
9493
9510
  }
9494
9511
  else {
9495
- return (this.accessedValue = this.value);
9512
+ return (this.accessedValue = [this.value, false]);
9496
9513
  }
9497
9514
  }
9498
9515
  return this.accessedValue;
@@ -9705,7 +9722,10 @@ class MultiExpression extends ExpressionEntity {
9705
9722
  }
9706
9723
  }
9707
9724
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
9708
- return new MultiExpression(this.expressions.map(expression => expression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)));
9725
+ return [
9726
+ new MultiExpression(this.expressions.map(expression => expression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0])),
9727
+ false
9728
+ ];
9709
9729
  }
9710
9730
  hasEffectsOnInteractionAtPath(path, interaction, context) {
9711
9731
  for (const expression of this.expressions) {
@@ -9757,10 +9777,13 @@ class ConditionalExpression extends NodeBase {
9757
9777
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
9758
9778
  const usedBranch = this.getUsedBranch();
9759
9779
  if (!usedBranch)
9760
- return new MultiExpression([
9761
- this.consequent.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin),
9762
- this.alternate.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)
9763
- ]);
9780
+ return [
9781
+ new MultiExpression([
9782
+ this.consequent.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0],
9783
+ this.alternate.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0]
9784
+ ]),
9785
+ false
9786
+ ];
9764
9787
  this.expressionsToBeDeoptimized.push(origin);
9765
9788
  return usedBranch.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9766
9789
  }
@@ -10885,10 +10908,13 @@ class LogicalExpression extends NodeBase {
10885
10908
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
10886
10909
  const usedBranch = this.getUsedBranch();
10887
10910
  if (!usedBranch)
10888
- return new MultiExpression([
10889
- this.left.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin),
10890
- this.right.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)
10891
- ]);
10911
+ return [
10912
+ new MultiExpression([
10913
+ this.left.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0],
10914
+ this.right.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0]
10915
+ ]),
10916
+ false
10917
+ ];
10892
10918
  this.expressionsToBeDeoptimized.push(origin);
10893
10919
  return usedBranch.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
10894
10920
  }
@@ -11314,7 +11340,7 @@ class PropertyDefinition extends NodeBase {
11314
11340
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
11315
11341
  return this.value
11316
11342
  ? this.value.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)
11317
- : UNKNOWN_EXPRESSION;
11343
+ : UNKNOWN_RETURN_EXPRESSION;
11318
11344
  }
11319
11345
  hasEffects(context) {
11320
11346
  return this.key.hasEffects(context) || (this.static && !!this.value?.hasEffects(context));
@@ -11605,7 +11631,7 @@ class TaggedTemplateExpression extends CallExpressionBase {
11605
11631
  this.quasi.include(context, includeChildrenRecursively);
11606
11632
  }
11607
11633
  this.tag.includeCallArguments(context, this.interaction.args);
11608
- const returnExpression = this.getReturnExpression();
11634
+ const [returnExpression] = this.getReturnExpression();
11609
11635
  if (!returnExpression.included) {
11610
11636
  returnExpression.include(context, false);
11611
11637
  }
@@ -11635,7 +11661,7 @@ class TaggedTemplateExpression extends CallExpressionBase {
11635
11661
  }
11636
11662
  getReturnExpression(recursionTracker = SHARED_RECURSION_TRACKER) {
11637
11663
  if (this.returnExpression === null) {
11638
- this.returnExpression = UNKNOWN_EXPRESSION;
11664
+ this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
11639
11665
  return (this.returnExpression = this.tag.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, this.interaction, recursionTracker, this));
11640
11666
  }
11641
11667
  return this.returnExpression;
@@ -11668,7 +11694,7 @@ class TemplateLiteral extends NodeBase {
11668
11694
  }
11669
11695
  getReturnExpressionWhenCalledAtPath(path) {
11670
11696
  if (path.length !== 1) {
11671
- return UNKNOWN_EXPRESSION;
11697
+ return UNKNOWN_RETURN_EXPRESSION;
11672
11698
  }
11673
11699
  return getMemberReturnExpressionWhenCalled(literalStringMembers, path[0]);
11674
11700
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
31
31
 
32
32
  const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
33
33
 
34
- var version$1 = "3.4.0-0";
34
+ var version$1 = "3.4.0-1";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -2923,7 +2923,7 @@ class ExpressionEntity {
2923
2923
  return UnknownValue;
2924
2924
  }
2925
2925
  getReturnExpressionWhenCalledAtPath(_path, _interaction, _recursionTracker, _origin) {
2926
- return UNKNOWN_EXPRESSION;
2926
+ return UNKNOWN_RETURN_EXPRESSION;
2927
2927
  }
2928
2928
  hasEffectsOnInteractionAtPath(_path, _interaction, _context) {
2929
2929
  return true;
@@ -2942,6 +2942,10 @@ class ExpressionEntity {
2942
2942
  }
2943
2943
  const UNKNOWN_EXPRESSION = new (class UnknownExpression extends ExpressionEntity {
2944
2944
  })();
2945
+ const UNKNOWN_RETURN_EXPRESSION = [
2946
+ UNKNOWN_EXPRESSION,
2947
+ false
2948
+ ];
2945
2949
 
2946
2950
  const INTERACTION_ACCESSED = 0;
2947
2951
  const INTERACTION_ASSIGNED = 1;
@@ -5445,7 +5449,7 @@ const UNKNOWN_LITERAL_BOOLEAN = new (class UnknownBoolean extends ExpressionEnti
5445
5449
  if (path.length === 1) {
5446
5450
  return getMemberReturnExpressionWhenCalled(literalBooleanMembers, path[0]);
5447
5451
  }
5448
- return UNKNOWN_EXPRESSION;
5452
+ return UNKNOWN_RETURN_EXPRESSION;
5449
5453
  }
5450
5454
  hasEffectsOnInteractionAtPath(path, interaction, context) {
5451
5455
  if (interaction.type === INTERACTION_ACCESSED) {
@@ -5468,7 +5472,7 @@ const UNKNOWN_LITERAL_NUMBER = new (class UnknownNumber extends ExpressionEntity
5468
5472
  if (path.length === 1) {
5469
5473
  return getMemberReturnExpressionWhenCalled(literalNumberMembers, path[0]);
5470
5474
  }
5471
- return UNKNOWN_EXPRESSION;
5475
+ return UNKNOWN_RETURN_EXPRESSION;
5472
5476
  }
5473
5477
  hasEffectsOnInteractionAtPath(path, interaction, context) {
5474
5478
  if (interaction.type === INTERACTION_ACCESSED) {
@@ -5491,7 +5495,7 @@ const UNKNOWN_LITERAL_STRING = new (class UnknownString extends ExpressionEntity
5491
5495
  if (path.length === 1) {
5492
5496
  return getMemberReturnExpressionWhenCalled(literalStringMembers, path[0]);
5493
5497
  }
5494
- return UNKNOWN_EXPRESSION;
5498
+ return UNKNOWN_RETURN_EXPRESSION;
5495
5499
  }
5496
5500
  hasEffectsOnInteractionAtPath(path, interaction, context) {
5497
5501
  if (interaction.type === INTERACTION_ACCESSED) {
@@ -5612,8 +5616,8 @@ function hasMemberEffectWhenCalled(members, memberName, interaction, context) {
5612
5616
  }
5613
5617
  function getMemberReturnExpressionWhenCalled(members, memberName) {
5614
5618
  if (typeof memberName !== 'string' || !members[memberName])
5615
- return UNKNOWN_EXPRESSION;
5616
- return members[memberName].returns;
5619
+ return UNKNOWN_RETURN_EXPRESSION;
5620
+ return [members[memberName].returns, false];
5617
5621
  }
5618
5622
 
5619
5623
  // AST walker module for Mozilla Parser API compatible trees
@@ -6263,12 +6267,15 @@ class Method extends ExpressionEntity {
6263
6267
  }
6264
6268
  getReturnExpressionWhenCalledAtPath(path, { thisArg }) {
6265
6269
  if (path.length > 0) {
6266
- return UNKNOWN_EXPRESSION;
6270
+ return UNKNOWN_RETURN_EXPRESSION;
6267
6271
  }
6268
- return (this.description.returnsPrimitive ||
6269
- (this.description.returns === 'self'
6270
- ? thisArg || UNKNOWN_EXPRESSION
6271
- : this.description.returns()));
6272
+ return [
6273
+ this.description.returnsPrimitive ||
6274
+ (this.description.returns === 'self'
6275
+ ? thisArg || UNKNOWN_EXPRESSION
6276
+ : this.description.returns()),
6277
+ false
6278
+ ];
6272
6279
  }
6273
6280
  hasEffectsOnInteractionAtPath(path, interaction, context) {
6274
6281
  const { type } = interaction;
@@ -6511,7 +6518,7 @@ class ObjectEntity extends ExpressionEntity {
6511
6518
  }
6512
6519
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
6513
6520
  if (path.length === 0) {
6514
- return UNKNOWN_EXPRESSION;
6521
+ return UNKNOWN_RETURN_EXPRESSION;
6515
6522
  }
6516
6523
  const [key, ...subPath] = path;
6517
6524
  const expressionAtPath = this.getMemberExpressionAndTrackDeopt(key, origin);
@@ -6521,7 +6528,7 @@ class ObjectEntity extends ExpressionEntity {
6521
6528
  if (this.prototypeExpression) {
6522
6529
  return this.prototypeExpression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
6523
6530
  }
6524
- return UNKNOWN_EXPRESSION;
6531
+ return UNKNOWN_RETURN_EXPRESSION;
6525
6532
  }
6526
6533
  hasEffectsOnInteractionAtPath(path, interaction, context) {
6527
6534
  const [key, ...subPath] = path;
@@ -6993,12 +7000,12 @@ class LocalVariable extends Variable {
6993
7000
  }
6994
7001
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
6995
7002
  if (this.isReassigned || !this.init) {
6996
- return UNKNOWN_EXPRESSION;
7003
+ return UNKNOWN_RETURN_EXPRESSION;
6997
7004
  }
6998
7005
  return recursionTracker.withTrackedEntityAtPath(path, this.init, () => {
6999
7006
  this.expressionsToBeDeoptimized.push(origin);
7000
7007
  return this.init.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
7001
- }, UNKNOWN_EXPRESSION);
7008
+ }, UNKNOWN_RETURN_EXPRESSION);
7002
7009
  }
7003
7010
  hasEffectsOnInteractionAtPath(path, interaction, context) {
7004
7011
  switch (interaction.type) {
@@ -8345,7 +8352,8 @@ class Identifier extends NodeBase {
8345
8352
  return this.getVariableRespectingTDZ().getLiteralValueAtPath(path, recursionTracker, origin);
8346
8353
  }
8347
8354
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
8348
- return this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
8355
+ const [expression, isPure] = this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
8356
+ return [expression, isPure || this.isPureFunction(path)];
8349
8357
  }
8350
8358
  hasEffects(context) {
8351
8359
  if (!this.deoptimized)
@@ -8355,6 +8363,7 @@ class Identifier extends NodeBase {
8355
8363
  }
8356
8364
  return (this.context.options.treeshake.unknownGlobalSideEffects &&
8357
8365
  this.variable instanceof GlobalVariable &&
8366
+ !this.isPureFunction(EMPTY_PATH) &&
8358
8367
  this.variable.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_ACCESS, context));
8359
8368
  }
8360
8369
  hasEffectsOnInteractionAtPath(path, interaction, context) {
@@ -8455,6 +8464,9 @@ class Identifier extends NodeBase {
8455
8464
  let currentPureFunction = this.context.manualPureFunctions[this.name];
8456
8465
  for (const segment of path) {
8457
8466
  if (currentPureFunction) {
8467
+ if (currentPureFunction[PureFunctionKey]) {
8468
+ return true;
8469
+ }
8458
8470
  currentPureFunction = currentPureFunction[segment];
8459
8471
  }
8460
8472
  else {
@@ -8784,9 +8796,9 @@ class FunctionBase extends NodeBase {
8784
8796
  this.scope.getReturnExpression().deoptimizePath(UNKNOWN_PATH);
8785
8797
  this.context.requestTreeshakingPass();
8786
8798
  }
8787
- return UNKNOWN_EXPRESSION;
8799
+ return UNKNOWN_RETURN_EXPRESSION;
8788
8800
  }
8789
- return this.scope.getReturnExpression();
8801
+ return [this.scope.getReturnExpression(), false];
8790
8802
  }
8791
8803
  hasEffectsOnInteractionAtPath(path, interaction, context) {
8792
8804
  if (path.length > 0 || interaction.type !== INTERACTION_CALLED) {
@@ -9385,7 +9397,7 @@ class Literal extends NodeBase {
9385
9397
  }
9386
9398
  getReturnExpressionWhenCalledAtPath(path) {
9387
9399
  if (path.length !== 1)
9388
- return UNKNOWN_EXPRESSION;
9400
+ return UNKNOWN_RETURN_EXPRESSION;
9389
9401
  return getMemberReturnExpressionWhenCalled(this.members, path[0]);
9390
9402
  }
9391
9403
  hasEffectsOnInteractionAtPath(path, interaction, context) {
@@ -9538,13 +9550,13 @@ class MemberExpression extends NodeBase {
9538
9550
  return this.variable.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9539
9551
  }
9540
9552
  if (this.isUndefined) {
9541
- return UNDEFINED_EXPRESSION;
9553
+ return [UNDEFINED_EXPRESSION, false];
9542
9554
  }
9543
9555
  this.expressionsToBeDeoptimized.push(origin);
9544
9556
  if (path.length < MAX_PATH_DEPTH) {
9545
9557
  return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(), ...path], interaction, recursionTracker, origin);
9546
9558
  }
9547
- return UNKNOWN_EXPRESSION;
9559
+ return UNKNOWN_RETURN_EXPRESSION;
9548
9560
  }
9549
9561
  hasEffects(context) {
9550
9562
  if (!this.deoptimized)
@@ -9721,8 +9733,8 @@ class CallExpressionBase extends NodeBase {
9721
9733
  this.expressionsToBeDeoptimized = new Set();
9722
9734
  }
9723
9735
  deoptimizeCache() {
9724
- if (this.returnExpression !== UNKNOWN_EXPRESSION) {
9725
- this.returnExpression = UNKNOWN_EXPRESSION;
9736
+ if (this.returnExpression?.[0] !== UNKNOWN_EXPRESSION) {
9737
+ this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
9726
9738
  for (const expression of this.deoptimizableDependentExpressions) {
9727
9739
  expression.deoptimizeCache();
9728
9740
  }
@@ -9736,13 +9748,15 @@ class CallExpressionBase extends NodeBase {
9736
9748
  this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(path, this)) {
9737
9749
  return;
9738
9750
  }
9739
- const returnExpression = this.getReturnExpression();
9751
+ const [returnExpression] = this.getReturnExpression();
9740
9752
  if (returnExpression !== UNKNOWN_EXPRESSION) {
9741
9753
  returnExpression.deoptimizePath(path);
9742
9754
  }
9743
9755
  }
9744
9756
  deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
9745
- const returnExpression = this.getReturnExpression(recursionTracker);
9757
+ const [returnExpression, isPure] = this.getReturnExpression(recursionTracker);
9758
+ if (isPure)
9759
+ return;
9746
9760
  if (returnExpression === UNKNOWN_EXPRESSION) {
9747
9761
  interaction.thisArg.deoptimizePath(UNKNOWN_PATH);
9748
9762
  }
@@ -9754,7 +9768,7 @@ class CallExpressionBase extends NodeBase {
9754
9768
  }
9755
9769
  }
9756
9770
  getLiteralValueAtPath(path, recursionTracker, origin) {
9757
- const returnExpression = this.getReturnExpression(recursionTracker);
9771
+ const [returnExpression] = this.getReturnExpression(recursionTracker);
9758
9772
  if (returnExpression === UNKNOWN_EXPRESSION) {
9759
9773
  return UnknownValue;
9760
9774
  }
@@ -9765,13 +9779,14 @@ class CallExpressionBase extends NodeBase {
9765
9779
  }
9766
9780
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
9767
9781
  const returnExpression = this.getReturnExpression(recursionTracker);
9768
- if (this.returnExpression === UNKNOWN_EXPRESSION) {
9769
- return UNKNOWN_EXPRESSION;
9782
+ if (returnExpression[0] === UNKNOWN_EXPRESSION) {
9783
+ return returnExpression;
9770
9784
  }
9771
9785
  return recursionTracker.withTrackedEntityAtPath(path, returnExpression, () => {
9772
9786
  this.deoptimizableDependentExpressions.push(origin);
9773
- return returnExpression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9774
- }, UNKNOWN_EXPRESSION);
9787
+ const [expression, isPure] = returnExpression[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9788
+ return [expression, isPure || returnExpression[1]];
9789
+ }, UNKNOWN_RETURN_EXPRESSION);
9775
9790
  }
9776
9791
  hasEffectsOnInteractionAtPath(path, interaction, context) {
9777
9792
  const { type } = interaction;
@@ -9786,7 +9801,9 @@ class CallExpressionBase extends NodeBase {
9786
9801
  : context.accessed).trackEntityAtPathAndGetIfTracked(path, this)) {
9787
9802
  return false;
9788
9803
  }
9789
- return this.getReturnExpression().hasEffectsOnInteractionAtPath(path, interaction, context);
9804
+ const [returnExpression, isPure] = this.getReturnExpression();
9805
+ return ((type === INTERACTION_ASSIGNED || !isPure) &&
9806
+ returnExpression.hasEffectsOnInteractionAtPath(path, interaction, context));
9790
9807
  }
9791
9808
  }
9792
9809
 
@@ -9865,7 +9882,7 @@ class CallExpression extends CallExpressionBase {
9865
9882
  }
9866
9883
  getReturnExpression(recursionTracker = SHARED_RECURSION_TRACKER) {
9867
9884
  if (this.returnExpression === null) {
9868
- this.returnExpression = UNKNOWN_EXPRESSION;
9885
+ this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
9869
9886
  return (this.returnExpression = this.callee.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, this.interaction, recursionTracker, this));
9870
9887
  }
9871
9888
  return this.returnExpression;
@@ -9949,7 +9966,7 @@ class MethodBase extends NodeBase {
9949
9966
  // expressions, there is no known situation where a getter is deoptimized.
9950
9967
  deoptimizeCache() { }
9951
9968
  deoptimizePath(path) {
9952
- this.getAccessedValue().deoptimizePath(path);
9969
+ this.getAccessedValue()[0].deoptimizePath(path);
9953
9970
  }
9954
9971
  deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
9955
9972
  if (interaction.type === INTERACTION_ACCESSED && this.kind === 'get' && path.length === 0) {
@@ -9968,13 +9985,13 @@ class MethodBase extends NodeBase {
9968
9985
  withNew: false
9969
9986
  }, EMPTY_PATH, recursionTracker);
9970
9987
  }
9971
- this.getAccessedValue().deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker);
9988
+ this.getAccessedValue()[0].deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker);
9972
9989
  }
9973
9990
  getLiteralValueAtPath(path, recursionTracker, origin) {
9974
- return this.getAccessedValue().getLiteralValueAtPath(path, recursionTracker, origin);
9991
+ return this.getAccessedValue()[0].getLiteralValueAtPath(path, recursionTracker, origin);
9975
9992
  }
9976
9993
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
9977
- return this.getAccessedValue().getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9994
+ return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
9978
9995
  }
9979
9996
  hasEffects(context) {
9980
9997
  return this.key.hasEffects(context);
@@ -9997,17 +10014,17 @@ class MethodBase extends NodeBase {
9997
10014
  withNew: false
9998
10015
  }, context);
9999
10016
  }
10000
- return this.getAccessedValue().hasEffectsOnInteractionAtPath(path, interaction, context);
10017
+ return this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(path, interaction, context);
10001
10018
  }
10002
10019
  applyDeoptimizations() { }
10003
10020
  getAccessedValue() {
10004
10021
  if (this.accessedValue === null) {
10005
10022
  if (this.kind === 'get') {
10006
- this.accessedValue = UNKNOWN_EXPRESSION;
10023
+ this.accessedValue = UNKNOWN_RETURN_EXPRESSION;
10007
10024
  return (this.accessedValue = this.value.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, SHARED_RECURSION_TRACKER, this));
10008
10025
  }
10009
10026
  else {
10010
- return (this.accessedValue = this.value);
10027
+ return (this.accessedValue = [this.value, false]);
10011
10028
  }
10012
10029
  }
10013
10030
  return this.accessedValue;
@@ -10220,7 +10237,10 @@ class MultiExpression extends ExpressionEntity {
10220
10237
  }
10221
10238
  }
10222
10239
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
10223
- return new MultiExpression(this.expressions.map(expression => expression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)));
10240
+ return [
10241
+ new MultiExpression(this.expressions.map(expression => expression.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0])),
10242
+ false
10243
+ ];
10224
10244
  }
10225
10245
  hasEffectsOnInteractionAtPath(path, interaction, context) {
10226
10246
  for (const expression of this.expressions) {
@@ -10272,10 +10292,13 @@ class ConditionalExpression extends NodeBase {
10272
10292
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
10273
10293
  const usedBranch = this.getUsedBranch();
10274
10294
  if (!usedBranch)
10275
- return new MultiExpression([
10276
- this.consequent.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin),
10277
- this.alternate.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)
10278
- ]);
10295
+ return [
10296
+ new MultiExpression([
10297
+ this.consequent.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0],
10298
+ this.alternate.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0]
10299
+ ]),
10300
+ false
10301
+ ];
10279
10302
  this.expressionsToBeDeoptimized.push(origin);
10280
10303
  return usedBranch.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
10281
10304
  }
@@ -11400,10 +11423,13 @@ class LogicalExpression extends NodeBase {
11400
11423
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
11401
11424
  const usedBranch = this.getUsedBranch();
11402
11425
  if (!usedBranch)
11403
- return new MultiExpression([
11404
- this.left.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin),
11405
- this.right.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)
11406
- ]);
11426
+ return [
11427
+ new MultiExpression([
11428
+ this.left.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0],
11429
+ this.right.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)[0]
11430
+ ]),
11431
+ false
11432
+ ];
11407
11433
  this.expressionsToBeDeoptimized.push(origin);
11408
11434
  return usedBranch.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin);
11409
11435
  }
@@ -11829,7 +11855,7 @@ class PropertyDefinition extends NodeBase {
11829
11855
  getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin) {
11830
11856
  return this.value
11831
11857
  ? this.value.getReturnExpressionWhenCalledAtPath(path, interaction, recursionTracker, origin)
11832
- : UNKNOWN_EXPRESSION;
11858
+ : UNKNOWN_RETURN_EXPRESSION;
11833
11859
  }
11834
11860
  hasEffects(context) {
11835
11861
  return this.key.hasEffects(context) || (this.static && !!this.value?.hasEffects(context));
@@ -12120,7 +12146,7 @@ class TaggedTemplateExpression extends CallExpressionBase {
12120
12146
  this.quasi.include(context, includeChildrenRecursively);
12121
12147
  }
12122
12148
  this.tag.includeCallArguments(context, this.interaction.args);
12123
- const returnExpression = this.getReturnExpression();
12149
+ const [returnExpression] = this.getReturnExpression();
12124
12150
  if (!returnExpression.included) {
12125
12151
  returnExpression.include(context, false);
12126
12152
  }
@@ -12150,7 +12176,7 @@ class TaggedTemplateExpression extends CallExpressionBase {
12150
12176
  }
12151
12177
  getReturnExpression(recursionTracker = SHARED_RECURSION_TRACKER) {
12152
12178
  if (this.returnExpression === null) {
12153
- this.returnExpression = UNKNOWN_EXPRESSION;
12179
+ this.returnExpression = UNKNOWN_RETURN_EXPRESSION;
12154
12180
  return (this.returnExpression = this.tag.getReturnExpressionWhenCalledAtPath(EMPTY_PATH, this.interaction, recursionTracker, this));
12155
12181
  }
12156
12182
  return this.returnExpression;
@@ -12183,7 +12209,7 @@ class TemplateLiteral extends NodeBase {
12183
12209
  }
12184
12210
  getReturnExpressionWhenCalledAtPath(path) {
12185
12211
  if (path.length !== 1) {
12186
- return UNKNOWN_EXPRESSION;
12212
+ return UNKNOWN_RETURN_EXPRESSION;
12187
12213
  }
12188
12214
  return getMemberReturnExpressionWhenCalled(literalStringMembers, path[0]);
12189
12215
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.4.0-0
4
- Fri, 18 Nov 2022 07:39:24 GMT - commit 6c70b960636630638055594175dbfed0d4b7cd15
3
+ Rollup.js v3.4.0-1
4
+ Mon, 21 Nov 2022 05:22:41 GMT - commit f7a081a72fd85e7e80e3cbefa55fbfd88eb52a3f
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": "3.4.0-0",
3
+ "version": "3.4.0-1",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",