@rollup/wasm-node 4.24.2 → 4.24.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.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.24.2
4
- Sun, 27 Oct 2024 15:39:37 GMT - commit 32d0e7dae85121ac0850ec28576a10a6302f84a9
3
+ Rollup.js v4.24.4
4
+ Mon, 04 Nov 2024 08:46:36 GMT - commit cdf34ab5411aac6ac3f6cd21b10d2e58427e88ec
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 = "4.24.2";
34
+ var version = "4.24.4";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -4045,208 +4045,6 @@ function markModuleAndImpureDependenciesAsExecuted(baseModule) {
4045
4045
  }
4046
4046
  }
4047
4047
 
4048
- function assembleMemberDescriptions(memberDescriptions, inheritedDescriptions = null) {
4049
- return Object.create(inheritedDescriptions, memberDescriptions);
4050
- }
4051
- const UNDEFINED_EXPRESSION = new (class UndefinedExpression extends ExpressionEntity {
4052
- getLiteralValueAtPath() {
4053
- return undefined;
4054
- }
4055
- })();
4056
- const returnsUnknown = {
4057
- value: {
4058
- hasEffectsWhenCalled: null,
4059
- returns: UNKNOWN_EXPRESSION
4060
- }
4061
- };
4062
- const UNKNOWN_LITERAL_BOOLEAN = new (class UnknownBoolean extends ExpressionEntity {
4063
- getReturnExpressionWhenCalledAtPath(path) {
4064
- if (path.length === 1) {
4065
- return getMemberReturnExpressionWhenCalled(literalBooleanMembers, path[0]);
4066
- }
4067
- return UNKNOWN_RETURN_EXPRESSION;
4068
- }
4069
- hasEffectsOnInteractionAtPath(path, interaction, context) {
4070
- if (interaction.type === INTERACTION_ACCESSED) {
4071
- return path.length > 1;
4072
- }
4073
- if (interaction.type === INTERACTION_CALLED && path.length === 1) {
4074
- return hasMemberEffectWhenCalled(literalBooleanMembers, path[0], interaction, context);
4075
- }
4076
- return true;
4077
- }
4078
- })();
4079
- const returnsBoolean = {
4080
- value: {
4081
- hasEffectsWhenCalled: null,
4082
- returns: UNKNOWN_LITERAL_BOOLEAN
4083
- }
4084
- };
4085
- const UNKNOWN_LITERAL_NUMBER = new (class UnknownNumber extends ExpressionEntity {
4086
- getReturnExpressionWhenCalledAtPath(path) {
4087
- if (path.length === 1) {
4088
- return getMemberReturnExpressionWhenCalled(literalNumberMembers, path[0]);
4089
- }
4090
- return UNKNOWN_RETURN_EXPRESSION;
4091
- }
4092
- hasEffectsOnInteractionAtPath(path, interaction, context) {
4093
- if (interaction.type === INTERACTION_ACCESSED) {
4094
- return path.length > 1;
4095
- }
4096
- if (interaction.type === INTERACTION_CALLED && path.length === 1) {
4097
- return hasMemberEffectWhenCalled(literalNumberMembers, path[0], interaction, context);
4098
- }
4099
- return true;
4100
- }
4101
- })();
4102
- const returnsNumber = {
4103
- value: {
4104
- hasEffectsWhenCalled: null,
4105
- returns: UNKNOWN_LITERAL_NUMBER
4106
- }
4107
- };
4108
- const UNKNOWN_LITERAL_STRING = new (class UnknownString extends ExpressionEntity {
4109
- getReturnExpressionWhenCalledAtPath(path) {
4110
- if (path.length === 1) {
4111
- return getMemberReturnExpressionWhenCalled(literalStringMembers, path[0]);
4112
- }
4113
- return UNKNOWN_RETURN_EXPRESSION;
4114
- }
4115
- hasEffectsOnInteractionAtPath(path, interaction, context) {
4116
- if (interaction.type === INTERACTION_ACCESSED) {
4117
- return path.length > 1;
4118
- }
4119
- if (interaction.type === INTERACTION_CALLED && path.length === 1) {
4120
- return hasMemberEffectWhenCalled(literalStringMembers, path[0], interaction, context);
4121
- }
4122
- return true;
4123
- }
4124
- })();
4125
- const returnsString = {
4126
- value: {
4127
- hasEffectsWhenCalled: null,
4128
- returns: UNKNOWN_LITERAL_STRING
4129
- }
4130
- };
4131
- const stringReplace = {
4132
- value: {
4133
- hasEffectsWhenCalled({ args }, context) {
4134
- const argument1 = args[2];
4135
- return (args.length < 3 ||
4136
- (typeof argument1.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, {
4137
- deoptimizeCache() { }
4138
- }) === 'symbol' &&
4139
- argument1.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, context)));
4140
- },
4141
- returns: UNKNOWN_LITERAL_STRING
4142
- }
4143
- };
4144
- const objectMembers = assembleMemberDescriptions({
4145
- hasOwnProperty: returnsBoolean,
4146
- isPrototypeOf: returnsBoolean,
4147
- propertyIsEnumerable: returnsBoolean,
4148
- toLocaleString: returnsString,
4149
- toString: returnsString,
4150
- valueOf: returnsUnknown
4151
- });
4152
- const literalBooleanMembers = assembleMemberDescriptions({
4153
- valueOf: returnsBoolean
4154
- }, objectMembers);
4155
- const literalNumberMembers = assembleMemberDescriptions({
4156
- toExponential: returnsString,
4157
- toFixed: returnsString,
4158
- toLocaleString: returnsString,
4159
- toPrecision: returnsString,
4160
- valueOf: returnsNumber
4161
- }, objectMembers);
4162
- /**
4163
- * RegExp are stateful when they have the global or sticky flags set.
4164
- * But if we actually don't use them, the side effect does not matter.
4165
- * the check logic in `hasEffectsOnInteractionAtPath`.
4166
- */
4167
- const literalRegExpMembers = assembleMemberDescriptions({
4168
- exec: returnsUnknown,
4169
- test: returnsBoolean
4170
- }, objectMembers);
4171
- const literalStringMembers = assembleMemberDescriptions({
4172
- anchor: returnsString,
4173
- at: returnsUnknown,
4174
- big: returnsString,
4175
- blink: returnsString,
4176
- bold: returnsString,
4177
- charAt: returnsString,
4178
- charCodeAt: returnsNumber,
4179
- codePointAt: returnsUnknown,
4180
- concat: returnsString,
4181
- endsWith: returnsBoolean,
4182
- fixed: returnsString,
4183
- fontcolor: returnsString,
4184
- fontsize: returnsString,
4185
- includes: returnsBoolean,
4186
- indexOf: returnsNumber,
4187
- italics: returnsString,
4188
- lastIndexOf: returnsNumber,
4189
- link: returnsString,
4190
- localeCompare: returnsNumber,
4191
- match: returnsUnknown,
4192
- matchAll: returnsUnknown,
4193
- normalize: returnsString,
4194
- padEnd: returnsString,
4195
- padStart: returnsString,
4196
- repeat: returnsString,
4197
- replace: stringReplace,
4198
- replaceAll: stringReplace,
4199
- search: returnsNumber,
4200
- slice: returnsString,
4201
- small: returnsString,
4202
- split: returnsUnknown,
4203
- startsWith: returnsBoolean,
4204
- strike: returnsString,
4205
- sub: returnsString,
4206
- substr: returnsString,
4207
- substring: returnsString,
4208
- sup: returnsString,
4209
- toLocaleLowerCase: returnsString,
4210
- toLocaleUpperCase: returnsString,
4211
- toLowerCase: returnsString,
4212
- toString: returnsString, // overrides the toString() method of the Object object; it does not inherit Object.prototype.toString()
4213
- toUpperCase: returnsString,
4214
- trim: returnsString,
4215
- trimEnd: returnsString,
4216
- trimLeft: returnsString,
4217
- trimRight: returnsString,
4218
- trimStart: returnsString,
4219
- valueOf: returnsString
4220
- }, objectMembers);
4221
- function getLiteralMembersForValue(value) {
4222
- if (value instanceof RegExp) {
4223
- return literalRegExpMembers;
4224
- }
4225
- switch (typeof value) {
4226
- case 'boolean': {
4227
- return literalBooleanMembers;
4228
- }
4229
- case 'number': {
4230
- return literalNumberMembers;
4231
- }
4232
- case 'string': {
4233
- return literalStringMembers;
4234
- }
4235
- }
4236
- return Object.create(null);
4237
- }
4238
- function hasMemberEffectWhenCalled(members, memberName, interaction, context) {
4239
- if (typeof memberName !== 'string' || !members[memberName]) {
4240
- return true;
4241
- }
4242
- return members[memberName].hasEffectsWhenCalled?.(interaction, context) || false;
4243
- }
4244
- function getMemberReturnExpressionWhenCalled(members, memberName) {
4245
- if (typeof memberName !== 'string' || !members[memberName])
4246
- return UNKNOWN_RETURN_EXPRESSION;
4247
- return [members[memberName].returns, false];
4248
- }
4249
-
4250
4048
  // This file is generated by scripts/generate-child-node-keys.js.
4251
4049
  // Do not edit this file directly.
4252
4050
  const childNodeKeys = {
@@ -4488,11 +4286,13 @@ class NodeBase extends ExpressionEntity {
4488
4286
  this[key] = value;
4489
4287
  }
4490
4288
  else if (Array.isArray(value)) {
4491
- this[key] = [];
4289
+ this[key] = new Array(value.length);
4290
+ let index = 0;
4492
4291
  for (const child of value) {
4493
- this[key].push(child === null
4494
- ? null
4495
- : new (this.scope.context.getNodeConstructor(child.type))(this, this.scope).parseNode(child));
4292
+ this[key][index++] =
4293
+ child === null
4294
+ ? null
4295
+ : new (this.scope.context.getNodeConstructor(child.type))(this, this.scope).parseNode(child);
4496
4296
  }
4497
4297
  }
4498
4298
  else {
@@ -4559,6 +4359,215 @@ function createChildNodeKeysForNode(esTreeNode) {
4559
4359
  return Object.keys(esTreeNode).filter(key => typeof esTreeNode[key] === 'object' && key.charCodeAt(0) !== 95 /* _ */);
4560
4360
  }
4561
4361
 
4362
+ function isObjectExpressionNode(node) {
4363
+ return node instanceof NodeBase && node.type === parseAst_js.ObjectExpression;
4364
+ }
4365
+ function isPropertyNode(node) {
4366
+ return node.type === parseAst_js.Property;
4367
+ }
4368
+
4369
+ function assembleMemberDescriptions(memberDescriptions, inheritedDescriptions = null) {
4370
+ return Object.create(inheritedDescriptions, memberDescriptions);
4371
+ }
4372
+ const UNDEFINED_EXPRESSION = new (class UndefinedExpression extends ExpressionEntity {
4373
+ getLiteralValueAtPath() {
4374
+ return undefined;
4375
+ }
4376
+ })();
4377
+ const returnsUnknown = {
4378
+ value: {
4379
+ hasEffectsWhenCalled: null,
4380
+ returns: UNKNOWN_EXPRESSION
4381
+ }
4382
+ };
4383
+ const UNKNOWN_LITERAL_BOOLEAN = new (class UnknownBoolean extends ExpressionEntity {
4384
+ getReturnExpressionWhenCalledAtPath(path) {
4385
+ if (path.length === 1) {
4386
+ return getMemberReturnExpressionWhenCalled(literalBooleanMembers, path[0]);
4387
+ }
4388
+ return UNKNOWN_RETURN_EXPRESSION;
4389
+ }
4390
+ hasEffectsOnInteractionAtPath(path, interaction, context) {
4391
+ if (interaction.type === INTERACTION_ACCESSED) {
4392
+ return path.length > 1;
4393
+ }
4394
+ if (interaction.type === INTERACTION_CALLED && path.length === 1) {
4395
+ return hasMemberEffectWhenCalled(literalBooleanMembers, path[0], interaction, context);
4396
+ }
4397
+ return true;
4398
+ }
4399
+ })();
4400
+ const returnsBoolean = {
4401
+ value: {
4402
+ hasEffectsWhenCalled: null,
4403
+ returns: UNKNOWN_LITERAL_BOOLEAN
4404
+ }
4405
+ };
4406
+ const UNKNOWN_LITERAL_NUMBER = new (class UnknownNumber extends ExpressionEntity {
4407
+ getReturnExpressionWhenCalledAtPath(path) {
4408
+ if (path.length === 1) {
4409
+ return getMemberReturnExpressionWhenCalled(literalNumberMembers, path[0]);
4410
+ }
4411
+ return UNKNOWN_RETURN_EXPRESSION;
4412
+ }
4413
+ hasEffectsOnInteractionAtPath(path, interaction, context) {
4414
+ if (interaction.type === INTERACTION_ACCESSED) {
4415
+ return path.length > 1;
4416
+ }
4417
+ if (interaction.type === INTERACTION_CALLED && path.length === 1) {
4418
+ return hasMemberEffectWhenCalled(literalNumberMembers, path[0], interaction, context);
4419
+ }
4420
+ return true;
4421
+ }
4422
+ })();
4423
+ const returnsNumber = {
4424
+ value: {
4425
+ hasEffectsWhenCalled: null,
4426
+ returns: UNKNOWN_LITERAL_NUMBER
4427
+ }
4428
+ };
4429
+ const UNKNOWN_LITERAL_STRING = new (class UnknownString extends ExpressionEntity {
4430
+ getReturnExpressionWhenCalledAtPath(path) {
4431
+ if (path.length === 1) {
4432
+ return getMemberReturnExpressionWhenCalled(literalStringMembers, path[0]);
4433
+ }
4434
+ return UNKNOWN_RETURN_EXPRESSION;
4435
+ }
4436
+ hasEffectsOnInteractionAtPath(path, interaction, context) {
4437
+ if (interaction.type === INTERACTION_ACCESSED) {
4438
+ return path.length > 1;
4439
+ }
4440
+ if (interaction.type === INTERACTION_CALLED && path.length === 1) {
4441
+ return hasMemberEffectWhenCalled(literalStringMembers, path[0], interaction, context);
4442
+ }
4443
+ return true;
4444
+ }
4445
+ })();
4446
+ const returnsString = {
4447
+ value: {
4448
+ hasEffectsWhenCalled: null,
4449
+ returns: UNKNOWN_LITERAL_STRING
4450
+ }
4451
+ };
4452
+ const stringReplace = {
4453
+ value: {
4454
+ hasEffectsWhenCalled({ args }, context) {
4455
+ const argument1 = args[2];
4456
+ return (args.length < 3 ||
4457
+ (typeof argument1.getLiteralValueAtPath(EMPTY_PATH, SHARED_RECURSION_TRACKER, {
4458
+ deoptimizeCache() { }
4459
+ }) === 'symbol' &&
4460
+ argument1.hasEffectsOnInteractionAtPath(EMPTY_PATH, NODE_INTERACTION_UNKNOWN_CALL, context)));
4461
+ },
4462
+ returns: UNKNOWN_LITERAL_STRING
4463
+ }
4464
+ };
4465
+ const objectMembers = assembleMemberDescriptions({
4466
+ hasOwnProperty: returnsBoolean,
4467
+ isPrototypeOf: returnsBoolean,
4468
+ propertyIsEnumerable: returnsBoolean,
4469
+ toLocaleString: returnsString,
4470
+ toString: returnsString,
4471
+ valueOf: returnsUnknown
4472
+ });
4473
+ const literalBooleanMembers = assembleMemberDescriptions({
4474
+ valueOf: returnsBoolean
4475
+ }, objectMembers);
4476
+ const literalNumberMembers = assembleMemberDescriptions({
4477
+ toExponential: returnsString,
4478
+ toFixed: returnsString,
4479
+ toLocaleString: returnsString,
4480
+ toPrecision: returnsString,
4481
+ valueOf: returnsNumber
4482
+ }, objectMembers);
4483
+ /**
4484
+ * RegExp are stateful when they have the global or sticky flags set.
4485
+ * But if we actually don't use them, the side effect does not matter.
4486
+ * the check logic in `hasEffectsOnInteractionAtPath`.
4487
+ */
4488
+ const literalRegExpMembers = assembleMemberDescriptions({
4489
+ exec: returnsUnknown,
4490
+ test: returnsBoolean
4491
+ }, objectMembers);
4492
+ const literalStringMembers = assembleMemberDescriptions({
4493
+ anchor: returnsString,
4494
+ at: returnsUnknown,
4495
+ big: returnsString,
4496
+ blink: returnsString,
4497
+ bold: returnsString,
4498
+ charAt: returnsString,
4499
+ charCodeAt: returnsNumber,
4500
+ codePointAt: returnsUnknown,
4501
+ concat: returnsString,
4502
+ endsWith: returnsBoolean,
4503
+ fixed: returnsString,
4504
+ fontcolor: returnsString,
4505
+ fontsize: returnsString,
4506
+ includes: returnsBoolean,
4507
+ indexOf: returnsNumber,
4508
+ italics: returnsString,
4509
+ lastIndexOf: returnsNumber,
4510
+ link: returnsString,
4511
+ localeCompare: returnsNumber,
4512
+ match: returnsUnknown,
4513
+ matchAll: returnsUnknown,
4514
+ normalize: returnsString,
4515
+ padEnd: returnsString,
4516
+ padStart: returnsString,
4517
+ repeat: returnsString,
4518
+ replace: stringReplace,
4519
+ replaceAll: stringReplace,
4520
+ search: returnsNumber,
4521
+ slice: returnsString,
4522
+ small: returnsString,
4523
+ split: returnsUnknown,
4524
+ startsWith: returnsBoolean,
4525
+ strike: returnsString,
4526
+ sub: returnsString,
4527
+ substr: returnsString,
4528
+ substring: returnsString,
4529
+ sup: returnsString,
4530
+ toLocaleLowerCase: returnsString,
4531
+ toLocaleUpperCase: returnsString,
4532
+ toLowerCase: returnsString,
4533
+ toString: returnsString, // overrides the toString() method of the Object object; it does not inherit Object.prototype.toString()
4534
+ toUpperCase: returnsString,
4535
+ trim: returnsString,
4536
+ trimEnd: returnsString,
4537
+ trimLeft: returnsString,
4538
+ trimRight: returnsString,
4539
+ trimStart: returnsString,
4540
+ valueOf: returnsString
4541
+ }, objectMembers);
4542
+ function getLiteralMembersForValue(value) {
4543
+ if (value instanceof RegExp) {
4544
+ return literalRegExpMembers;
4545
+ }
4546
+ switch (typeof value) {
4547
+ case 'boolean': {
4548
+ return literalBooleanMembers;
4549
+ }
4550
+ case 'number': {
4551
+ return literalNumberMembers;
4552
+ }
4553
+ case 'string': {
4554
+ return literalStringMembers;
4555
+ }
4556
+ }
4557
+ return Object.create(null);
4558
+ }
4559
+ function hasMemberEffectWhenCalled(members, memberName, interaction, context) {
4560
+ if (typeof memberName !== 'string' || !members[memberName]) {
4561
+ return true;
4562
+ }
4563
+ return members[memberName].hasEffectsWhenCalled?.(interaction, context) || false;
4564
+ }
4565
+ function getMemberReturnExpressionWhenCalled(members, memberName) {
4566
+ if (typeof memberName !== 'string' || !members[memberName])
4567
+ return UNKNOWN_RETURN_EXPRESSION;
4568
+ return [members[memberName].returns, false];
4569
+ }
4570
+
4562
4571
  class SpreadElement extends NodeBase {
4563
4572
  deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
4564
4573
  if (path.length > 0) {
@@ -5516,7 +5525,29 @@ const knownGlobals = {
5516
5525
  resolve: O
5517
5526
  },
5518
5527
  propertyIsEnumerable: O,
5519
- Proxy: O,
5528
+ Proxy: {
5529
+ __proto__: null,
5530
+ [ValueProperties]: {
5531
+ deoptimizeArgumentsOnCall: ({ args: [, target, parameter] }) => {
5532
+ if (isObjectExpressionNode(parameter)) {
5533
+ const hasSpreadElement = parameter.properties.some(property => !isPropertyNode(property));
5534
+ if (!hasSpreadElement) {
5535
+ for (const property of parameter.properties) {
5536
+ property.deoptimizeArgumentsOnInteractionAtPath({
5537
+ args: [null, target],
5538
+ type: INTERACTION_CALLED,
5539
+ withNew: false
5540
+ }, EMPTY_PATH, SHARED_RECURSION_TRACKER);
5541
+ }
5542
+ return;
5543
+ }
5544
+ }
5545
+ target.deoptimizePath(UNKNOWN_PATH);
5546
+ },
5547
+ getLiteralValue: getTruthyLiteralValue,
5548
+ hasEffectsWhenCalled: returnTrue
5549
+ }
5550
+ },
5520
5551
  RangeError: PC,
5521
5552
  ReferenceError: PC,
5522
5553
  Reflect: O,
@@ -9623,14 +9654,16 @@ function getImportBlock(dependencies, importAttributesKey, { _ }) {
9623
9654
  }
9624
9655
  function getExportBlock(exports, { _, cnst }) {
9625
9656
  const exportBlock = [];
9626
- const exportDeclaration = [];
9657
+ const exportDeclaration = new Array(exports.length);
9658
+ let index = 0;
9627
9659
  for (const specifier of exports) {
9628
9660
  if (specifier.expression) {
9629
9661
  exportBlock.push(`${cnst} ${specifier.local}${_}=${_}${specifier.expression};`);
9630
9662
  }
9631
- exportDeclaration.push(specifier.exported === specifier.local
9632
- ? specifier.local
9633
- : `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`);
9663
+ exportDeclaration[index++] =
9664
+ specifier.exported === specifier.local
9665
+ ? specifier.local
9666
+ : `${specifier.local} as ${stringifyIdentifierIfNeeded(specifier.exported)}`;
9634
9667
  }
9635
9668
  if (exportDeclaration.length > 0) {
9636
9669
  exportBlock.push(`export${_}{${_}${exportDeclaration.join(`,${_}`)}${_}};`);
@@ -12951,9 +12984,10 @@ class ClassBody extends NodeBase {
12951
12984
  }
12952
12985
  }
12953
12986
  parseNode(esTreeNode) {
12954
- const body = (this.body = []);
12987
+ const body = (this.body = new Array(esTreeNode.body.length));
12988
+ let index = 0;
12955
12989
  for (const definition of esTreeNode.body) {
12956
- body.push(new (this.scope.context.getNodeConstructor(definition.type))(this, definition.static ? this.scope : this.scope.instanceScope).parseNode(definition));
12990
+ body[index++] = new (this.scope.context.getNodeConstructor(definition.type))(this, definition.static ? this.scope : this.scope.instanceScope).parseNode(definition);
12957
12991
  }
12958
12992
  return super.parseNode(esTreeNode);
12959
12993
  }
@@ -16016,14 +16050,17 @@ const bufferParsers = [
16016
16050
  function classBody(node, position, buffer) {
16017
16051
  const { scope } = node;
16018
16052
  const bodyPosition = buffer[position];
16019
- const body = (node.body = []);
16020
16053
  if (bodyPosition) {
16021
16054
  const length = buffer[bodyPosition];
16055
+ const body = (node.body = new Array(length));
16022
16056
  for (let index = 0; index < length; index++) {
16023
16057
  const nodePosition = buffer[bodyPosition + 1 + index];
16024
- body.push(convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer));
16058
+ body[index] = convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer);
16025
16059
  }
16026
16060
  }
16061
+ else {
16062
+ node.body = [];
16063
+ }
16027
16064
  },
16028
16065
  function classDeclaration(node, position, buffer) {
16029
16066
  const { scope } = node;
@@ -16501,10 +16538,10 @@ function convertNodeList(parent, parentScope, position, buffer) {
16501
16538
  if (position === 0)
16502
16539
  return parseAst_js.EMPTY_ARRAY;
16503
16540
  const length = buffer[position++];
16504
- const list = [];
16541
+ const list = new Array(length);
16505
16542
  for (let index = 0; index < length; index++) {
16506
16543
  const nodePosition = buffer[position++];
16507
- list.push(nodePosition ? convertNode(parent, parentScope, nodePosition, buffer) : null);
16544
+ list[index] = nodePosition ? convertNode(parent, parentScope, nodePosition, buffer) : null;
16508
16545
  }
16509
16546
  return list;
16510
16547
  }
@@ -19381,14 +19418,16 @@ function getChunkAssignments(entries, manualChunkAliasByEntry, minChunkSize, log
19381
19418
  return chunkDefinitions;
19382
19419
  }
19383
19420
  function getChunkDefinitionsFromManualChunks(manualChunkAliasByEntry) {
19384
- const chunkDefinitions = [];
19385
19421
  const modulesInManualChunks = new Set(manualChunkAliasByEntry.keys());
19386
19422
  const manualChunkModulesByAlias = Object.create(null);
19387
19423
  for (const [entry, alias] of manualChunkAliasByEntry) {
19388
19424
  addStaticDependenciesToManualChunk(entry, (manualChunkModulesByAlias[alias] ||= []), modulesInManualChunks);
19389
19425
  }
19390
- for (const [alias, modules] of Object.entries(manualChunkModulesByAlias)) {
19391
- chunkDefinitions.push({ alias, modules });
19426
+ const manualChunks = Object.entries(manualChunkModulesByAlias);
19427
+ const chunkDefinitions = new Array(manualChunks.length);
19428
+ let index = 0;
19429
+ for (const [alias, modules] of manualChunks) {
19430
+ chunkDefinitions[index++] = { alias, modules };
19392
19431
  }
19393
19432
  return { chunkDefinitions, modulesInManualChunks };
19394
19433
  }
@@ -19407,12 +19446,12 @@ function addStaticDependenciesToManualChunk(entry, manualChunkModules, modulesIn
19407
19446
  function analyzeModuleGraph(entries) {
19408
19447
  const dynamicEntryModules = new Set();
19409
19448
  const dependentEntriesByModule = new Map();
19410
- const dynamicImportModulesByEntry = [];
19411
19449
  const allEntriesSet = new Set(entries);
19450
+ const dynamicImportModulesByEntry = new Array(allEntriesSet.size);
19412
19451
  let entryIndex = 0;
19413
19452
  for (const currentEntry of allEntriesSet) {
19414
19453
  const dynamicImportsForCurrentEntry = new Set();
19415
- dynamicImportModulesByEntry.push(dynamicImportsForCurrentEntry);
19454
+ dynamicImportModulesByEntry[entryIndex] = dynamicImportsForCurrentEntry;
19416
19455
  const modulesToHandle = new Set([currentEntry]);
19417
19456
  for (const module of modulesToHandle) {
19418
19457
  getOrCreate(dependentEntriesByModule, module, (getNewSet)).add(entryIndex);
@@ -19457,13 +19496,14 @@ function getDynamicEntries(allEntries, dynamicEntryModules, dynamicImportModules
19457
19496
  dynamicEntries.add(entryIndex);
19458
19497
  }
19459
19498
  }
19460
- const dynamicImportsByEntry = [];
19499
+ const dynamicImportsByEntry = new Array(dynamicImportModulesByEntry.length);
19500
+ let index = 0;
19461
19501
  for (const dynamicImportModules of dynamicImportModulesByEntry) {
19462
19502
  const dynamicImports = new Set();
19463
19503
  for (const dynamicEntry of dynamicImportModules) {
19464
19504
  dynamicImports.add(entryIndexByModule.get(dynamicEntry));
19465
19505
  }
19466
- dynamicImportsByEntry.push(dynamicImports);
19506
+ dynamicImportsByEntry[index++] = dynamicImports;
19467
19507
  }
19468
19508
  return { dynamicEntries, dynamicImportsByEntry };
19469
19509
  }
@@ -19568,9 +19608,10 @@ function removeUnnecessaryDependentEntries(chunkAtoms, alreadyLoadedAtomsByEntry
19568
19608
  function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticDependencyAtomsByEntry, alreadyLoadedAtomsByEntry, minChunkSize) {
19569
19609
  const chunksBySignature = Object.create(null);
19570
19610
  const chunkByModule = new Map();
19571
- const sizeByAtom = [];
19611
+ const sizeByAtom = new Array(chunkAtoms.length);
19572
19612
  let sideEffectAtoms = 0n;
19573
19613
  let atomMask = 1n;
19614
+ let index = 0;
19574
19615
  for (const { dependentEntries, modules } of chunkAtoms) {
19575
19616
  let chunkSignature = 0n;
19576
19617
  let correlatedAtoms = -1n;
@@ -19608,7 +19649,7 @@ function getChunksWithSameDependentEntriesAndCorrelatedAtoms(chunkAtoms, staticD
19608
19649
  if (!pure) {
19609
19650
  sideEffectAtoms |= atomMask;
19610
19651
  }
19611
- sizeByAtom.push(atomSize);
19652
+ sizeByAtom[index++] = atomSize;
19612
19653
  chunk.containedAtoms |= atomMask;
19613
19654
  chunk.modules.push(...modules);
19614
19655
  chunk.pure &&= pure;
@@ -20504,16 +20545,18 @@ class Bundle {
20504
20545
  const includedModules = getIncludedModules(this.graph.modulesById);
20505
20546
  const inputBase = commondir(getAbsoluteEntryModulePaths(includedModules, preserveModules));
20506
20547
  const externalChunkByModule = getExternalChunkByModule(this.graph.modulesById, this.outputOptions, inputBase);
20507
- const chunks = [];
20508
- const chunkByModule = new Map();
20509
- for (const { alias, modules } of inlineDynamicImports
20548
+ const executableModule = inlineDynamicImports
20510
20549
  ? [{ alias: null, modules: includedModules }]
20511
20550
  : preserveModules
20512
20551
  ? includedModules.map(module => ({ alias: null, modules: [module] }))
20513
- : getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog)) {
20552
+ : getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog);
20553
+ const chunks = new Array(executableModule.length);
20554
+ const chunkByModule = new Map();
20555
+ let index = 0;
20556
+ for (const { alias, modules } of executableModule) {
20514
20557
  sortByExecutionOrder(modules);
20515
20558
  const chunk = new Chunk(modules, this.inputOptions, this.outputOptions, this.unsetOptions, this.pluginDriver, this.graph.modulesById, chunkByModule, externalChunkByModule, this.facadeChunkByModule, this.includedNamespaces, alias, getHashPlaceholder, bundle, inputBase, snippets);
20516
- chunks.push(chunk);
20559
+ chunks[index++] = chunk;
20517
20560
  }
20518
20561
  for (const chunk of chunks) {
20519
20562
  chunk.link();
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.24.2
4
- Sun, 27 Oct 2024 15:39:37 GMT - commit 32d0e7dae85121ac0850ec28576a10a6302f84a9
3
+ Rollup.js v4.24.4
4
+ Mon, 04 Nov 2024 08:46:36 GMT - commit cdf34ab5411aac6ac3f6cd21b10d2e58427e88ec
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.24.2
4
- Sun, 27 Oct 2024 15:39:37 GMT - commit 32d0e7dae85121ac0850ec28576a10a6302f84a9
3
+ Rollup.js v4.24.4
4
+ Mon, 04 Nov 2024 08:46:36 GMT - commit cdf34ab5411aac6ac3f6cd21b10d2e58427e88ec
5
5
 
6
6
  https://github.com/rollup/rollup
7
7