rollup 4.17.0 → 4.17.2

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.17.0
5
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
4
+ Rollup.js v4.17.2
5
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
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.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -16,7 +16,7 @@ import { performance } from 'node:perf_hooks';
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.17.0";
19
+ var version = "4.17.2";
20
20
 
21
21
  const comma = ','.charCodeAt(0);
22
22
  const semicolon = ';'.charCodeAt(0);
@@ -7952,6 +7952,9 @@ class FunctionBase extends NodeBase {
7952
7952
  const parameter = this.params[position];
7953
7953
  // Only the "this" argument arg[0] can be null
7954
7954
  const argument = args[position + 1];
7955
+ if (argument instanceof SpreadElement) {
7956
+ this.deoptimizeParameterVariableValues();
7957
+ }
7955
7958
  if (hasRest || parameter instanceof RestElement) {
7956
7959
  hasRest = true;
7957
7960
  argument.deoptimizePath(UNKNOWN_PATH);
@@ -11186,21 +11189,17 @@ const importMetaMechanisms = {
11186
11189
 
11187
11190
  class NewExpression extends NodeBase {
11188
11191
  hasEffects(context) {
11189
- try {
11190
- for (const argument of this.arguments) {
11191
- if (argument.hasEffects(context))
11192
- return true;
11193
- }
11194
- if (this.annotationPure) {
11195
- return false;
11196
- }
11197
- return (this.callee.hasEffects(context) ||
11198
- this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
11192
+ if (!this.deoptimized)
11193
+ this.applyDeoptimizations();
11194
+ for (const argument of this.arguments) {
11195
+ if (argument.hasEffects(context))
11196
+ return true;
11199
11197
  }
11200
- finally {
11201
- if (!this.deoptimized)
11202
- this.applyDeoptimizations();
11198
+ if (this.annotationPure) {
11199
+ return false;
11203
11200
  }
11201
+ return (this.callee.hasEffects(context) ||
11202
+ this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
11204
11203
  }
11205
11204
  hasEffectsOnInteractionAtPath(path, { type }) {
11206
11205
  return path.length > 0 || type !== INTERACTION_ACCESSED;
@@ -11757,18 +11756,14 @@ class TaggedTemplateExpression extends CallExpressionBase {
11757
11756
  }
11758
11757
  }
11759
11758
  hasEffects(context) {
11760
- try {
11761
- for (const argument of this.quasi.expressions) {
11762
- if (argument.hasEffects(context))
11763
- return true;
11764
- }
11765
- return (this.tag.hasEffects(context) ||
11766
- this.tag.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
11767
- }
11768
- finally {
11769
- if (!this.deoptimized)
11770
- this.applyDeoptimizations();
11759
+ if (!this.deoptimized)
11760
+ this.applyDeoptimizations();
11761
+ for (const argument of this.quasi.expressions) {
11762
+ if (argument.hasEffects(context))
11763
+ return true;
11771
11764
  }
11765
+ return (this.tag.hasEffects(context) ||
11766
+ this.tag.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
11772
11767
  }
11773
11768
  include(context, includeChildrenRecursively) {
11774
11769
  if (!this.deoptimized)
@@ -13539,7 +13534,7 @@ function getPersistedLabel(label, level) {
13539
13534
  return label;
13540
13535
  }
13541
13536
  default: {
13542
- return `${' '.repeat(level - 4)}- ${label}`;
13537
+ return `- ${label}`;
13543
13538
  }
13544
13539
  }
13545
13540
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/parseAst.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
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 v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
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.17.0";
34
+ var version = "4.17.2";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -9394,6 +9394,9 @@ class FunctionBase extends NodeBase {
9394
9394
  const parameter = this.params[position];
9395
9395
  // Only the "this" argument arg[0] can be null
9396
9396
  const argument = args[position + 1];
9397
+ if (argument instanceof SpreadElement) {
9398
+ this.deoptimizeParameterVariableValues();
9399
+ }
9397
9400
  if (hasRest || parameter instanceof RestElement) {
9398
9401
  hasRest = true;
9399
9402
  argument.deoptimizePath(UNKNOWN_PATH);
@@ -12628,21 +12631,17 @@ const importMetaMechanisms = {
12628
12631
 
12629
12632
  class NewExpression extends NodeBase {
12630
12633
  hasEffects(context) {
12631
- try {
12632
- for (const argument of this.arguments) {
12633
- if (argument.hasEffects(context))
12634
- return true;
12635
- }
12636
- if (this.annotationPure) {
12637
- return false;
12638
- }
12639
- return (this.callee.hasEffects(context) ||
12640
- this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
12634
+ if (!this.deoptimized)
12635
+ this.applyDeoptimizations();
12636
+ for (const argument of this.arguments) {
12637
+ if (argument.hasEffects(context))
12638
+ return true;
12641
12639
  }
12642
- finally {
12643
- if (!this.deoptimized)
12644
- this.applyDeoptimizations();
12640
+ if (this.annotationPure) {
12641
+ return false;
12645
12642
  }
12643
+ return (this.callee.hasEffects(context) ||
12644
+ this.callee.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
12646
12645
  }
12647
12646
  hasEffectsOnInteractionAtPath(path, { type }) {
12648
12647
  return path.length > 0 || type !== INTERACTION_ACCESSED;
@@ -13199,18 +13198,14 @@ class TaggedTemplateExpression extends CallExpressionBase {
13199
13198
  }
13200
13199
  }
13201
13200
  hasEffects(context) {
13202
- try {
13203
- for (const argument of this.quasi.expressions) {
13204
- if (argument.hasEffects(context))
13205
- return true;
13206
- }
13207
- return (this.tag.hasEffects(context) ||
13208
- this.tag.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
13209
- }
13210
- finally {
13211
- if (!this.deoptimized)
13212
- this.applyDeoptimizations();
13201
+ if (!this.deoptimized)
13202
+ this.applyDeoptimizations();
13203
+ for (const argument of this.quasi.expressions) {
13204
+ if (argument.hasEffects(context))
13205
+ return true;
13213
13206
  }
13207
+ return (this.tag.hasEffects(context) ||
13208
+ this.tag.hasEffectsOnInteractionAtPath(EMPTY_PATH, this.interaction, context));
13214
13209
  }
13215
13210
  include(context, includeChildrenRecursively) {
13216
13211
  if (!this.deoptimized)
@@ -14974,7 +14969,7 @@ function getPersistedLabel(label, level) {
14974
14969
  return label;
14975
14970
  }
14976
14971
  default: {
14977
- return `${' '.repeat(level - 4)}- ${label}`;
14972
+ return `- ${label}`;
14978
14973
  }
14979
14974
  }
14980
14975
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.17.0
4
- Sat, 27 Apr 2024 11:29:22 GMT - commit 91352494fc722bcd5e8e922cd1497b34aec57a67
3
+ Rollup.js v4.17.2
4
+ Tue, 30 Apr 2024 05:00:09 GMT - commit 5e955a1c2c5e080f80f20f650da9b44909d65d56
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": "4.17.0",
3
+ "version": "4.17.2",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -50,6 +50,7 @@
50
50
  "dev": "vitepress dev docs",
51
51
  "build:cjs": "rollup --config rollup.config.ts --configPlugin typescript --configTest --forceExit",
52
52
  "build:bootstrap": "shx mv dist dist-build && node dist-build/bin/rollup --config rollup.config.ts --configPlugin typescript --forceExit && shx rm -rf dist-build",
53
+ "build:bootstrap:cjs": "shx mv dist dist-build && node dist-build/bin/rollup --config rollup.config.ts --configPlugin typescript --configTest --forceExit && shx rm -rf dist-build",
53
54
  "build:docs": "vitepress build docs",
54
55
  "build:ast-converters": "node scripts/generate-ast-converters.js",
55
56
  "preview:docs": "vitepress preview docs",
@@ -66,7 +67,7 @@
66
67
  "lint:markdown:nofix": "prettier --check \"**/*.md\"",
67
68
  "lint:rust": "cd rust && cargo fmt && cargo clippy --fix --allow-dirty",
68
69
  "lint:rust:nofix": "cd rust && cargo fmt --check && cargo clippy",
69
- "perf": "npm run build && node --expose-gc scripts/perf-report/index.js",
70
+ "perf": "npm run build:bootstrap:cjs && node --expose-gc scripts/perf-report/index.js",
70
71
  "prepare": "husky && node scripts/check-release.js || npm run build:prepare",
71
72
  "prepublishOnly": "node scripts/check-release.js && node scripts/prepublish.js",
72
73
  "postpublish": "node scripts/postpublish.js",
@@ -104,22 +105,22 @@
104
105
  "homepage": "https://rollupjs.org/",
105
106
  "optionalDependencies": {
106
107
  "fsevents": "~2.3.2",
107
- "@rollup/rollup-darwin-arm64": "4.17.0",
108
- "@rollup/rollup-android-arm64": "4.17.0",
109
- "@rollup/rollup-win32-arm64-msvc": "4.17.0",
110
- "@rollup/rollup-linux-arm64-gnu": "4.17.0",
111
- "@rollup/rollup-linux-arm64-musl": "4.17.0",
112
- "@rollup/rollup-android-arm-eabi": "4.17.0",
113
- "@rollup/rollup-linux-arm-gnueabihf": "4.17.0",
114
- "@rollup/rollup-linux-arm-musleabihf": "4.17.0",
115
- "@rollup/rollup-win32-ia32-msvc": "4.17.0",
116
- "@rollup/rollup-linux-riscv64-gnu": "4.17.0",
117
- "@rollup/rollup-linux-powerpc64le-gnu": "4.17.0",
118
- "@rollup/rollup-linux-s390x-gnu": "4.17.0",
119
- "@rollup/rollup-darwin-x64": "4.17.0",
120
- "@rollup/rollup-win32-x64-msvc": "4.17.0",
121
- "@rollup/rollup-linux-x64-gnu": "4.17.0",
122
- "@rollup/rollup-linux-x64-musl": "4.17.0"
108
+ "@rollup/rollup-darwin-arm64": "4.17.2",
109
+ "@rollup/rollup-android-arm64": "4.17.2",
110
+ "@rollup/rollup-win32-arm64-msvc": "4.17.2",
111
+ "@rollup/rollup-linux-arm64-gnu": "4.17.2",
112
+ "@rollup/rollup-linux-arm64-musl": "4.17.2",
113
+ "@rollup/rollup-android-arm-eabi": "4.17.2",
114
+ "@rollup/rollup-linux-arm-gnueabihf": "4.17.2",
115
+ "@rollup/rollup-linux-arm-musleabihf": "4.17.2",
116
+ "@rollup/rollup-win32-ia32-msvc": "4.17.2",
117
+ "@rollup/rollup-linux-riscv64-gnu": "4.17.2",
118
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2",
119
+ "@rollup/rollup-linux-s390x-gnu": "4.17.2",
120
+ "@rollup/rollup-darwin-x64": "4.17.2",
121
+ "@rollup/rollup-win32-x64-msvc": "4.17.2",
122
+ "@rollup/rollup-linux-x64-gnu": "4.17.2",
123
+ "@rollup/rollup-linux-x64-musl": "4.17.2"
123
124
  },
124
125
  "dependencies": {
125
126
  "@types/estree": "1.0.5"