rollup 4.44.2 → 4.45.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
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.44.2
5
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
4
+ Rollup.js v4.45.1
5
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
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.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -27,7 +27,7 @@ function _mergeNamespaces(n, m) {
27
27
  return Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' });
28
28
  }
29
29
 
30
- var version = "4.44.2";
30
+ var version = "4.45.1";
31
31
 
32
32
  // src/vlq.ts
33
33
  var comma = ",".charCodeAt(0);
@@ -12227,11 +12227,20 @@ class ConditionalExpression extends NodeBase {
12227
12227
  set isBranchResolutionAnalysed(value) {
12228
12228
  this.flags = setFlag(this.flags, 65536 /* Flag.isBranchResolutionAnalysed */, value);
12229
12229
  }
12230
+ get hasDeoptimizedCache() {
12231
+ return isFlagSet(this.flags, 33554432 /* Flag.hasDeoptimizedCache */);
12232
+ }
12233
+ set hasDeoptimizedCache(value) {
12234
+ this.flags = setFlag(this.flags, 33554432 /* Flag.hasDeoptimizedCache */, value);
12235
+ }
12230
12236
  deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
12231
12237
  this.consequent.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
12232
12238
  this.alternate.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
12233
12239
  }
12234
12240
  deoptimizeCache() {
12241
+ if (this.hasDeoptimizedCache)
12242
+ return;
12243
+ this.hasDeoptimizedCache = true;
12235
12244
  if (this.usedBranch !== null) {
12236
12245
  const unusedBranch = this.usedBranch === this.consequent ? this.alternate : this.consequent;
12237
12246
  this.usedBranch = null;
@@ -12258,8 +12267,23 @@ class ConditionalExpression extends NodeBase {
12258
12267
  }
12259
12268
  getLiteralValueAtPath(path, recursionTracker, origin) {
12260
12269
  const usedBranch = this.getUsedBranch();
12261
- if (!usedBranch)
12262
- return UnknownValue;
12270
+ if (!usedBranch) {
12271
+ if (this.hasDeoptimizedCache) {
12272
+ return UnknownValue;
12273
+ }
12274
+ const consequentValue = this.consequent.getLiteralValueAtPath(path, recursionTracker, origin);
12275
+ const castedConsequentValue = tryCastLiteralValueToBoolean(consequentValue);
12276
+ if (castedConsequentValue === UnknownValue)
12277
+ return UnknownValue;
12278
+ const alternateValue = this.alternate.getLiteralValueAtPath(path, recursionTracker, origin);
12279
+ const castedAlternateValue = tryCastLiteralValueToBoolean(alternateValue);
12280
+ if (castedConsequentValue !== castedAlternateValue)
12281
+ return UnknownValue;
12282
+ this.expressionsToBeDeoptimized.push(origin);
12283
+ if (consequentValue !== alternateValue)
12284
+ return castedConsequentValue ? UnknownTruthyValue : UnknownFalsyValue;
12285
+ return consequentValue;
12286
+ }
12263
12287
  this.expressionsToBeDeoptimized.push(origin);
12264
12288
  return usedBranch.getLiteralValueAtPath(path, recursionTracker, origin);
12265
12289
  }
@@ -15722,7 +15746,10 @@ const bufferParsers = [
15722
15746
  const body = (node.body = new Array(length));
15723
15747
  for (let index = 0; index < length; index++) {
15724
15748
  const nodePosition = buffer[bodyPosition + 1 + index];
15725
- body[index] = convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer);
15749
+ body[index] = convertNode(node, buffer[nodePosition] !== 79 &&
15750
+ (buffer[nodePosition + 3] & /* the static flag is always first */ 1) === 0
15751
+ ? scope.instanceScope
15752
+ : scope, nodePosition, buffer);
15726
15753
  }
15727
15754
  }
15728
15755
  else {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
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.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
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.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -42,7 +42,7 @@ function _mergeNamespaces(n, m) {
42
42
 
43
43
  const promises__namespace = /*#__PURE__*/_interopNamespaceDefault(promises);
44
44
 
45
- var version = "4.44.2";
45
+ var version = "4.45.1";
46
46
 
47
47
  function ensureArray$1(items) {
48
48
  if (Array.isArray(items)) {
@@ -13836,11 +13836,20 @@ class ConditionalExpression extends NodeBase {
13836
13836
  set isBranchResolutionAnalysed(value) {
13837
13837
  this.flags = setFlag(this.flags, 65536 /* Flag.isBranchResolutionAnalysed */, value);
13838
13838
  }
13839
+ get hasDeoptimizedCache() {
13840
+ return isFlagSet(this.flags, 33554432 /* Flag.hasDeoptimizedCache */);
13841
+ }
13842
+ set hasDeoptimizedCache(value) {
13843
+ this.flags = setFlag(this.flags, 33554432 /* Flag.hasDeoptimizedCache */, value);
13844
+ }
13839
13845
  deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker) {
13840
13846
  this.consequent.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
13841
13847
  this.alternate.deoptimizeArgumentsOnInteractionAtPath(interaction, path, recursionTracker);
13842
13848
  }
13843
13849
  deoptimizeCache() {
13850
+ if (this.hasDeoptimizedCache)
13851
+ return;
13852
+ this.hasDeoptimizedCache = true;
13844
13853
  if (this.usedBranch !== null) {
13845
13854
  const unusedBranch = this.usedBranch === this.consequent ? this.alternate : this.consequent;
13846
13855
  this.usedBranch = null;
@@ -13867,8 +13876,23 @@ class ConditionalExpression extends NodeBase {
13867
13876
  }
13868
13877
  getLiteralValueAtPath(path, recursionTracker, origin) {
13869
13878
  const usedBranch = this.getUsedBranch();
13870
- if (!usedBranch)
13871
- return UnknownValue;
13879
+ if (!usedBranch) {
13880
+ if (this.hasDeoptimizedCache) {
13881
+ return UnknownValue;
13882
+ }
13883
+ const consequentValue = this.consequent.getLiteralValueAtPath(path, recursionTracker, origin);
13884
+ const castedConsequentValue = tryCastLiteralValueToBoolean(consequentValue);
13885
+ if (castedConsequentValue === UnknownValue)
13886
+ return UnknownValue;
13887
+ const alternateValue = this.alternate.getLiteralValueAtPath(path, recursionTracker, origin);
13888
+ const castedAlternateValue = tryCastLiteralValueToBoolean(alternateValue);
13889
+ if (castedConsequentValue !== castedAlternateValue)
13890
+ return UnknownValue;
13891
+ this.expressionsToBeDeoptimized.push(origin);
13892
+ if (consequentValue !== alternateValue)
13893
+ return castedConsequentValue ? UnknownTruthyValue : UnknownFalsyValue;
13894
+ return consequentValue;
13895
+ }
13872
13896
  this.expressionsToBeDeoptimized.push(origin);
13873
13897
  return usedBranch.getLiteralValueAtPath(path, recursionTracker, origin);
13874
13898
  }
@@ -17331,7 +17355,10 @@ const bufferParsers = [
17331
17355
  const body = (node.body = new Array(length));
17332
17356
  for (let index = 0; index < length; index++) {
17333
17357
  const nodePosition = buffer[bodyPosition + 1 + index];
17334
- body[index] = convertNode(node, (buffer[nodePosition + 3] & 1) === 0 ? scope.instanceScope : scope, nodePosition, buffer);
17358
+ body[index] = convertNode(node, buffer[nodePosition] !== 79 &&
17359
+ (buffer[nodePosition + 3] & /* the static flag is always first */ 1) === 0
17360
+ ? scope.instanceScope
17361
+ : scope, nodePosition, buffer);
17335
17362
  }
17336
17363
  }
17337
17364
  else {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.44.2
4
- Fri, 04 Jul 2025 12:55:10 GMT - commit d6dd1e7c6ee3f8fcfd77e5b8082cc62387a8ac4f
3
+ Rollup.js v4.45.1
4
+ Tue, 15 Jul 2025 13:08:50 GMT - commit a9b04957eac7803e61390d4387e3e96dbe4118c4
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.44.2",
3
+ "version": "4.45.1",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -109,26 +109,26 @@
109
109
  "homepage": "https://rollupjs.org/",
110
110
  "optionalDependencies": {
111
111
  "fsevents": "~2.3.2",
112
- "@rollup/rollup-darwin-arm64": "4.44.2",
113
- "@rollup/rollup-android-arm64": "4.44.2",
114
- "@rollup/rollup-win32-arm64-msvc": "4.44.2",
115
- "@rollup/rollup-freebsd-arm64": "4.44.2",
116
- "@rollup/rollup-linux-arm64-gnu": "4.44.2",
117
- "@rollup/rollup-linux-arm64-musl": "4.44.2",
118
- "@rollup/rollup-android-arm-eabi": "4.44.2",
119
- "@rollup/rollup-linux-arm-gnueabihf": "4.44.2",
120
- "@rollup/rollup-linux-arm-musleabihf": "4.44.2",
121
- "@rollup/rollup-win32-ia32-msvc": "4.44.2",
122
- "@rollup/rollup-linux-loongarch64-gnu": "4.44.2",
123
- "@rollup/rollup-linux-riscv64-gnu": "4.44.2",
124
- "@rollup/rollup-linux-riscv64-musl": "4.44.2",
125
- "@rollup/rollup-linux-powerpc64le-gnu": "4.44.2",
126
- "@rollup/rollup-linux-s390x-gnu": "4.44.2",
127
- "@rollup/rollup-darwin-x64": "4.44.2",
128
- "@rollup/rollup-win32-x64-msvc": "4.44.2",
129
- "@rollup/rollup-freebsd-x64": "4.44.2",
130
- "@rollup/rollup-linux-x64-gnu": "4.44.2",
131
- "@rollup/rollup-linux-x64-musl": "4.44.2"
112
+ "@rollup/rollup-darwin-arm64": "4.45.1",
113
+ "@rollup/rollup-android-arm64": "4.45.1",
114
+ "@rollup/rollup-win32-arm64-msvc": "4.45.1",
115
+ "@rollup/rollup-freebsd-arm64": "4.45.1",
116
+ "@rollup/rollup-linux-arm64-gnu": "4.45.1",
117
+ "@rollup/rollup-linux-arm64-musl": "4.45.1",
118
+ "@rollup/rollup-android-arm-eabi": "4.45.1",
119
+ "@rollup/rollup-linux-arm-gnueabihf": "4.45.1",
120
+ "@rollup/rollup-linux-arm-musleabihf": "4.45.1",
121
+ "@rollup/rollup-win32-ia32-msvc": "4.45.1",
122
+ "@rollup/rollup-linux-loongarch64-gnu": "4.45.1",
123
+ "@rollup/rollup-linux-riscv64-gnu": "4.45.1",
124
+ "@rollup/rollup-linux-riscv64-musl": "4.45.1",
125
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.45.1",
126
+ "@rollup/rollup-linux-s390x-gnu": "4.45.1",
127
+ "@rollup/rollup-darwin-x64": "4.45.1",
128
+ "@rollup/rollup-win32-x64-msvc": "4.45.1",
129
+ "@rollup/rollup-freebsd-x64": "4.45.1",
130
+ "@rollup/rollup-linux-x64-gnu": "4.45.1",
131
+ "@rollup/rollup-linux-x64-musl": "4.45.1"
132
132
  },
133
133
  "dependencies": {
134
134
  "@types/estree": "1.0.8"
@@ -247,8 +247,8 @@
247
247
  "exports": {
248
248
  ".": {
249
249
  "types": "./dist/rollup.d.ts",
250
- "require": "./dist/rollup.js",
251
- "import": "./dist/es/rollup.js"
250
+ "import": "./dist/es/rollup.js",
251
+ "require": "./dist/rollup.js"
252
252
  },
253
253
  "./loadConfigFile": {
254
254
  "types": "./dist/loadConfigFile.d.ts",
@@ -257,13 +257,13 @@
257
257
  },
258
258
  "./getLogFilter": {
259
259
  "types": "./dist/getLogFilter.d.ts",
260
- "require": "./dist/getLogFilter.js",
261
- "import": "./dist/es/getLogFilter.js"
260
+ "import": "./dist/es/getLogFilter.js",
261
+ "require": "./dist/getLogFilter.js"
262
262
  },
263
263
  "./parseAst": {
264
264
  "types": "./dist/parseAst.d.ts",
265
- "require": "./dist/parseAst.js",
266
- "import": "./dist/es/parseAst.js"
265
+ "import": "./dist/es/parseAst.js",
266
+ "require": "./dist/parseAst.js"
267
267
  },
268
268
  "./dist/*": "./dist/*",
269
269
  "./package.json": "./package.json"