rollup 4.9.4 → 4.9.6

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
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.9.4
5
- Sat, 06 Jan 2024 06:38:31 GMT - commit 18372035f167ec104280e1e91ef795e4f7033f1e
4
+ Rollup.js v4.9.6
5
+ Sun, 21 Jan 2024 05:51:51 GMT - commit ecb6b0a430098052781aa6ee04ec92ee70960321
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.9.4
4
- Sat, 06 Jan 2024 06:38:31 GMT - commit 18372035f167ec104280e1e91ef795e4f7033f1e
3
+ Rollup.js v4.9.6
4
+ Sun, 21 Jan 2024 05:51:51 GMT - commit ecb6b0a430098052781aa6ee04ec92ee70960321
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.9.4
4
- Sat, 06 Jan 2024 06:38:31 GMT - commit 18372035f167ec104280e1e91ef795e4f7033f1e
3
+ Rollup.js v4.9.6
4
+ Sun, 21 Jan 2024 05:51:51 GMT - commit ecb6b0a430098052781aa6ee04ec92ee70960321
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.9.4
4
- Sat, 06 Jan 2024 06:38:31 GMT - commit 18372035f167ec104280e1e91ef795e4f7033f1e
3
+ Rollup.js v4.9.6
4
+ Sun, 21 Jan 2024 05:51:51 GMT - commit ecb6b0a430098052781aa6ee04ec92ee70960321
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.9.4
4
- Sat, 06 Jan 2024 06:38:31 GMT - commit 18372035f167ec104280e1e91ef795e4f7033f1e
3
+ Rollup.js v4.9.6
4
+ Sun, 21 Jan 2024 05:51:51 GMT - commit ecb6b0a430098052781aa6ee04ec92ee70960321
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -16,7 +16,7 @@ import { xxhashBase64Url } from '../../native.js';
16
16
  import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
17
17
  import * as tty from 'tty';
18
18
 
19
- var version = "4.9.4";
19
+ var version = "4.9.6";
20
20
 
21
21
  const comma = ','.charCodeAt(0);
22
22
  const semicolon = ';'.charCodeAt(0);
@@ -4822,8 +4822,15 @@ class Method extends ExpressionEntity {
4822
4822
  this.description = description;
4823
4823
  }
4824
4824
  deoptimizeArgumentsOnInteractionAtPath({ args, type }, path) {
4825
- if (type === INTERACTION_CALLED && path.length === 0 && this.description.mutatesSelfAsArray) {
4826
- args[0]?.deoptimizePath(UNKNOWN_INTEGER_PATH);
4825
+ if (type === INTERACTION_CALLED && path.length === 0) {
4826
+ if (this.description.mutatesSelfAsArray) {
4827
+ args[0]?.deoptimizePath(UNKNOWN_INTEGER_PATH);
4828
+ }
4829
+ if (this.description.mutatesArgs) {
4830
+ for (let index = 1; index < args.length; index++) {
4831
+ args[index].deoptimizePath(UNKNOWN_PATH);
4832
+ }
4833
+ }
4827
4834
  }
4828
4835
  }
4829
4836
  getReturnExpressionWhenCalledAtPath(path, { args }) {
@@ -4863,6 +4870,7 @@ class Method extends ExpressionEntity {
4863
4870
  const METHOD_RETURNS_BOOLEAN = [
4864
4871
  new Method({
4865
4872
  callsArgs: null,
4873
+ mutatesArgs: false,
4866
4874
  mutatesSelfAsArray: false,
4867
4875
  returns: null,
4868
4876
  returnsPrimitive: UNKNOWN_LITERAL_BOOLEAN
@@ -4871,6 +4879,7 @@ const METHOD_RETURNS_BOOLEAN = [
4871
4879
  const METHOD_RETURNS_STRING = [
4872
4880
  new Method({
4873
4881
  callsArgs: null,
4882
+ mutatesArgs: false,
4874
4883
  mutatesSelfAsArray: false,
4875
4884
  returns: null,
4876
4885
  returnsPrimitive: UNKNOWN_LITERAL_STRING
@@ -4879,6 +4888,7 @@ const METHOD_RETURNS_STRING = [
4879
4888
  const METHOD_RETURNS_NUMBER = [
4880
4889
  new Method({
4881
4890
  callsArgs: null,
4891
+ mutatesArgs: false,
4882
4892
  mutatesSelfAsArray: false,
4883
4893
  returns: null,
4884
4894
  returnsPrimitive: UNKNOWN_LITERAL_NUMBER
@@ -4887,6 +4897,7 @@ const METHOD_RETURNS_NUMBER = [
4887
4897
  const METHOD_RETURNS_UNKNOWN = [
4888
4898
  new Method({
4889
4899
  callsArgs: null,
4900
+ mutatesArgs: false,
4890
4901
  mutatesSelfAsArray: false,
4891
4902
  returns: null,
4892
4903
  returnsPrimitive: UNKNOWN_EXPRESSION
@@ -5301,6 +5312,7 @@ const NEW_ARRAY_PROPERTIES = [
5301
5312
  const METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_BOOLEAN = [
5302
5313
  new Method({
5303
5314
  callsArgs: [0],
5315
+ mutatesArgs: false,
5304
5316
  mutatesSelfAsArray: 'deopt-only',
5305
5317
  returns: null,
5306
5318
  returnsPrimitive: UNKNOWN_LITERAL_BOOLEAN
@@ -5309,6 +5321,7 @@ const METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_BOOLEAN = [
5309
5321
  const METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NUMBER = [
5310
5322
  new Method({
5311
5323
  callsArgs: [0],
5324
+ mutatesArgs: false,
5312
5325
  mutatesSelfAsArray: 'deopt-only',
5313
5326
  returns: null,
5314
5327
  returnsPrimitive: UNKNOWN_LITERAL_NUMBER
@@ -5317,6 +5330,7 @@ const METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NUMBER = [
5317
5330
  const METHOD_MUTATES_SELF_RETURNS_NEW_ARRAY = [
5318
5331
  new Method({
5319
5332
  callsArgs: null,
5333
+ mutatesArgs: false,
5320
5334
  mutatesSelfAsArray: true,
5321
5335
  returns: () => new ObjectEntity(NEW_ARRAY_PROPERTIES, ARRAY_PROTOTYPE),
5322
5336
  returnsPrimitive: null
@@ -5325,6 +5339,7 @@ const METHOD_MUTATES_SELF_RETURNS_NEW_ARRAY = [
5325
5339
  const METHOD_DEOPTS_SELF_RETURNS_NEW_ARRAY = [
5326
5340
  new Method({
5327
5341
  callsArgs: null,
5342
+ mutatesArgs: false,
5328
5343
  mutatesSelfAsArray: 'deopt-only',
5329
5344
  returns: () => new ObjectEntity(NEW_ARRAY_PROPERTIES, ARRAY_PROTOTYPE),
5330
5345
  returnsPrimitive: null
@@ -5333,14 +5348,16 @@ const METHOD_DEOPTS_SELF_RETURNS_NEW_ARRAY = [
5333
5348
  const METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NEW_ARRAY = [
5334
5349
  new Method({
5335
5350
  callsArgs: [0],
5351
+ mutatesArgs: false,
5336
5352
  mutatesSelfAsArray: 'deopt-only',
5337
5353
  returns: () => new ObjectEntity(NEW_ARRAY_PROPERTIES, ARRAY_PROTOTYPE),
5338
5354
  returnsPrimitive: null
5339
5355
  })
5340
5356
  ];
5341
- const METHOD_MUTATES_SELF_RETURNS_NUMBER = [
5357
+ const METHOD_MUTATES_SELF_AND_ARGS_RETURNS_NUMBER = [
5342
5358
  new Method({
5343
5359
  callsArgs: null,
5360
+ mutatesArgs: true,
5344
5361
  mutatesSelfAsArray: true,
5345
5362
  returns: null,
5346
5363
  returnsPrimitive: UNKNOWN_LITERAL_NUMBER
@@ -5349,6 +5366,7 @@ const METHOD_MUTATES_SELF_RETURNS_NUMBER = [
5349
5366
  const METHOD_MUTATES_SELF_RETURNS_UNKNOWN = [
5350
5367
  new Method({
5351
5368
  callsArgs: null,
5369
+ mutatesArgs: false,
5352
5370
  mutatesSelfAsArray: true,
5353
5371
  returns: null,
5354
5372
  returnsPrimitive: UNKNOWN_EXPRESSION
@@ -5357,6 +5375,7 @@ const METHOD_MUTATES_SELF_RETURNS_UNKNOWN = [
5357
5375
  const METHOD_DEOPTS_SELF_RETURNS_UNKNOWN = [
5358
5376
  new Method({
5359
5377
  callsArgs: null,
5378
+ mutatesArgs: false,
5360
5379
  mutatesSelfAsArray: 'deopt-only',
5361
5380
  returns: null,
5362
5381
  returnsPrimitive: UNKNOWN_EXPRESSION
@@ -5365,6 +5384,7 @@ const METHOD_DEOPTS_SELF_RETURNS_UNKNOWN = [
5365
5384
  const METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN = [
5366
5385
  new Method({
5367
5386
  callsArgs: [0],
5387
+ mutatesArgs: false,
5368
5388
  mutatesSelfAsArray: 'deopt-only',
5369
5389
  returns: null,
5370
5390
  returnsPrimitive: UNKNOWN_EXPRESSION
@@ -5373,6 +5393,7 @@ const METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN = [
5373
5393
  const METHOD_MUTATES_SELF_RETURNS_SELF = [
5374
5394
  new Method({
5375
5395
  callsArgs: null,
5396
+ mutatesArgs: false,
5376
5397
  mutatesSelfAsArray: true,
5377
5398
  returns: 'self',
5378
5399
  returnsPrimitive: null
@@ -5381,6 +5402,7 @@ const METHOD_MUTATES_SELF_RETURNS_SELF = [
5381
5402
  const METHOD_CALLS_ARG_MUTATES_SELF_RETURNS_SELF = [
5382
5403
  new Method({
5383
5404
  callsArgs: [0],
5405
+ mutatesArgs: false,
5384
5406
  mutatesSelfAsArray: true,
5385
5407
  returns: 'self',
5386
5408
  returnsPrimitive: null
@@ -5410,7 +5432,7 @@ const ARRAY_PROTOTYPE = new ObjectEntity({
5410
5432
  lastIndexOf: METHOD_RETURNS_NUMBER,
5411
5433
  map: METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NEW_ARRAY,
5412
5434
  pop: METHOD_MUTATES_SELF_RETURNS_UNKNOWN,
5413
- push: METHOD_MUTATES_SELF_RETURNS_NUMBER,
5435
+ push: METHOD_MUTATES_SELF_AND_ARGS_RETURNS_NUMBER,
5414
5436
  reduce: METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN,
5415
5437
  reduceRight: METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN,
5416
5438
  reverse: METHOD_MUTATES_SELF_RETURNS_SELF,
@@ -5421,7 +5443,7 @@ const ARRAY_PROTOTYPE = new ObjectEntity({
5421
5443
  splice: METHOD_MUTATES_SELF_RETURNS_NEW_ARRAY,
5422
5444
  toLocaleString: METHOD_RETURNS_STRING,
5423
5445
  toString: METHOD_RETURNS_STRING,
5424
- unshift: METHOD_MUTATES_SELF_RETURNS_NUMBER,
5446
+ unshift: METHOD_MUTATES_SELF_AND_ARGS_RETURNS_NUMBER,
5425
5447
  values: METHOD_DEOPTS_SELF_RETURNS_UNKNOWN
5426
5448
  }, OBJECT_PROTOTYPE, true);
5427
5449
 
@@ -16476,10 +16498,10 @@ function commondir(files) {
16476
16498
  if (files.length === 1)
16477
16499
  return dirname(files[0]);
16478
16500
  const commonSegments = files.slice(1).reduce((commonSegments, file) => {
16479
- const pathSegements = file.split(/\/+|\\+/);
16501
+ const pathSegments = file.split(/\/+|\\+/);
16480
16502
  let index;
16481
- for (index = 0; commonSegments[index] === pathSegements[index] &&
16482
- index < Math.min(commonSegments.length, pathSegements.length); index++)
16503
+ for (index = 0; commonSegments[index] === pathSegments[index] &&
16504
+ index < Math.min(commonSegments.length, pathSegments.length); index++)
16483
16505
  ;
16484
16506
  return commonSegments.slice(0, index);
16485
16507
  }, files[0].split(/\/+|\\+/));