rollup 4.16.1 → 4.16.3

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.16.1
5
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
4
+ Rollup.js v4.16.3
5
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
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.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
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.16.1";
19
+ var version = "4.16.3";
20
20
 
21
21
  const comma = ','.charCodeAt(0);
22
22
  const semicolon = ';'.charCodeAt(0);
@@ -5922,13 +5922,13 @@ class ParameterVariable extends LocalVariable {
5922
5922
  }
5923
5923
  }
5924
5924
  deoptimizePath(path) {
5925
- if (this.deoptimizedFields.has(UnknownKey)) {
5926
- return;
5927
- }
5928
5925
  if (path.length === 0) {
5929
5926
  this.markReassigned();
5930
5927
  return;
5931
5928
  }
5929
+ if (this.deoptimizedFields.has(UnknownKey)) {
5930
+ return;
5931
+ }
5932
5932
  const key = path[0];
5933
5933
  if (this.deoptimizedFields.has(key)) {
5934
5934
  return;
@@ -8076,16 +8076,14 @@ class FunctionBase extends NodeBase {
8076
8076
  return variable?.getOnlyFunctionCallUsed() ?? false;
8077
8077
  }
8078
8078
  include(context, includeChildrenRecursively) {
8079
- const isIIFE = this.parent.type === CallExpression$1 &&
8080
- this.parent.callee === this;
8081
- const shoulOptimizeFunctionParameters = isIIFE || this.onlyFunctionCallUsed();
8082
- if (shoulOptimizeFunctionParameters) {
8079
+ const shouldOptimizeFunctionParameters = this.onlyFunctionCallUsed();
8080
+ if (shouldOptimizeFunctionParameters) {
8083
8081
  this.applyFunctionParameterOptimization();
8084
8082
  }
8085
8083
  else if (this.functionParametersOptimized) {
8086
8084
  this.deoptimizeFunctionParameters();
8087
8085
  }
8088
- this.functionParametersOptimized = shoulOptimizeFunctionParameters;
8086
+ this.functionParametersOptimized = shouldOptimizeFunctionParameters;
8089
8087
  if (!this.deoptimized)
8090
8088
  this.applyDeoptimizations();
8091
8089
  this.included = true;
@@ -8169,6 +8167,11 @@ class ArrowFunctionExpression extends FunctionBase {
8169
8167
  }
8170
8168
  return false;
8171
8169
  }
8170
+ onlyFunctionCallUsed() {
8171
+ const isIIFE = this.parent.type === CallExpression$1 &&
8172
+ this.parent.callee === this;
8173
+ return isIIFE || super.onlyFunctionCallUsed();
8174
+ }
8172
8175
  include(context, includeChildrenRecursively) {
8173
8176
  super.include(context, includeChildrenRecursively);
8174
8177
  for (const parameter of this.params) {
@@ -10134,6 +10137,12 @@ class FunctionExpression extends FunctionNode {
10134
10137
  }
10135
10138
  return super.parseNode(esTreeNode);
10136
10139
  }
10140
+ onlyFunctionCallUsed() {
10141
+ const isIIFE = this.parent.type === CallExpression$1 &&
10142
+ this.parent.callee === this &&
10143
+ (this.id === null || this.id.variable.getOnlyFunctionCallUsed());
10144
+ return isIIFE || super.onlyFunctionCallUsed();
10145
+ }
10137
10146
  render(code, options, { renderedSurroundingElement } = BLANK) {
10138
10147
  super.render(code, options);
10139
10148
  if (renderedSurroundingElement === ExpressionStatement$1) {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
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.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
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.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
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.16.1";
34
+ var version = "4.16.3";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -7378,13 +7378,13 @@ class ParameterVariable extends LocalVariable {
7378
7378
  }
7379
7379
  }
7380
7380
  deoptimizePath(path) {
7381
- if (this.deoptimizedFields.has(UnknownKey)) {
7382
- return;
7383
- }
7384
7381
  if (path.length === 0) {
7385
7382
  this.markReassigned();
7386
7383
  return;
7387
7384
  }
7385
+ if (this.deoptimizedFields.has(UnknownKey)) {
7386
+ return;
7387
+ }
7388
7388
  const key = path[0];
7389
7389
  if (this.deoptimizedFields.has(key)) {
7390
7390
  return;
@@ -9518,16 +9518,14 @@ class FunctionBase extends NodeBase {
9518
9518
  return variable?.getOnlyFunctionCallUsed() ?? false;
9519
9519
  }
9520
9520
  include(context, includeChildrenRecursively) {
9521
- const isIIFE = this.parent.type === parseAst_js.CallExpression &&
9522
- this.parent.callee === this;
9523
- const shoulOptimizeFunctionParameters = isIIFE || this.onlyFunctionCallUsed();
9524
- if (shoulOptimizeFunctionParameters) {
9521
+ const shouldOptimizeFunctionParameters = this.onlyFunctionCallUsed();
9522
+ if (shouldOptimizeFunctionParameters) {
9525
9523
  this.applyFunctionParameterOptimization();
9526
9524
  }
9527
9525
  else if (this.functionParametersOptimized) {
9528
9526
  this.deoptimizeFunctionParameters();
9529
9527
  }
9530
- this.functionParametersOptimized = shoulOptimizeFunctionParameters;
9528
+ this.functionParametersOptimized = shouldOptimizeFunctionParameters;
9531
9529
  if (!this.deoptimized)
9532
9530
  this.applyDeoptimizations();
9533
9531
  this.included = true;
@@ -9611,6 +9609,11 @@ class ArrowFunctionExpression extends FunctionBase {
9611
9609
  }
9612
9610
  return false;
9613
9611
  }
9612
+ onlyFunctionCallUsed() {
9613
+ const isIIFE = this.parent.type === parseAst_js.CallExpression &&
9614
+ this.parent.callee === this;
9615
+ return isIIFE || super.onlyFunctionCallUsed();
9616
+ }
9614
9617
  include(context, includeChildrenRecursively) {
9615
9618
  super.include(context, includeChildrenRecursively);
9616
9619
  for (const parameter of this.params) {
@@ -11576,6 +11579,12 @@ class FunctionExpression extends FunctionNode {
11576
11579
  }
11577
11580
  return super.parseNode(esTreeNode);
11578
11581
  }
11582
+ onlyFunctionCallUsed() {
11583
+ const isIIFE = this.parent.type === parseAst_js.CallExpression &&
11584
+ this.parent.callee === this &&
11585
+ (this.id === null || this.id.variable.getOnlyFunctionCallUsed());
11586
+ return isIIFE || super.onlyFunctionCallUsed();
11587
+ }
11579
11588
  render(code, options, { renderedSurroundingElement } = parseAst_js.BLANK) {
11580
11589
  super.render(code, options);
11581
11590
  if (renderedSurroundingElement === parseAst_js.ExpressionStatement) {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.16.1
4
- Sun, 21 Apr 2024 18:29:24 GMT - commit 5d8019b901e98cc8895751a23e5edfc9135b1a35
3
+ Rollup.js v4.16.3
4
+ Tue, 23 Apr 2024 05:12:04 GMT - commit b9a62fd4cf28538d7c3b268eb25e709b45d44cce
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.16.1",
3
+ "version": "4.16.3",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -104,22 +104,22 @@
104
104
  "homepage": "https://rollupjs.org/",
105
105
  "optionalDependencies": {
106
106
  "fsevents": "~2.3.2",
107
- "@rollup/rollup-darwin-arm64": "4.16.1",
108
- "@rollup/rollup-android-arm64": "4.16.1",
109
- "@rollup/rollup-win32-arm64-msvc": "4.16.1",
110
- "@rollup/rollup-linux-arm64-gnu": "4.16.1",
111
- "@rollup/rollup-linux-arm64-musl": "4.16.1",
112
- "@rollup/rollup-android-arm-eabi": "4.16.1",
113
- "@rollup/rollup-linux-arm-gnueabihf": "4.16.1",
114
- "@rollup/rollup-linux-arm-musleabihf": "4.16.1",
115
- "@rollup/rollup-win32-ia32-msvc": "4.16.1",
116
- "@rollup/rollup-linux-riscv64-gnu": "4.16.1",
117
- "@rollup/rollup-linux-powerpc64le-gnu": "4.16.1",
118
- "@rollup/rollup-linux-s390x-gnu": "4.16.1",
119
- "@rollup/rollup-darwin-x64": "4.16.1",
120
- "@rollup/rollup-win32-x64-msvc": "4.16.1",
121
- "@rollup/rollup-linux-x64-gnu": "4.16.1",
122
- "@rollup/rollup-linux-x64-musl": "4.16.1"
107
+ "@rollup/rollup-darwin-arm64": "4.16.3",
108
+ "@rollup/rollup-android-arm64": "4.16.3",
109
+ "@rollup/rollup-win32-arm64-msvc": "4.16.3",
110
+ "@rollup/rollup-linux-arm64-gnu": "4.16.3",
111
+ "@rollup/rollup-linux-arm64-musl": "4.16.3",
112
+ "@rollup/rollup-android-arm-eabi": "4.16.3",
113
+ "@rollup/rollup-linux-arm-gnueabihf": "4.16.3",
114
+ "@rollup/rollup-linux-arm-musleabihf": "4.16.3",
115
+ "@rollup/rollup-win32-ia32-msvc": "4.16.3",
116
+ "@rollup/rollup-linux-riscv64-gnu": "4.16.3",
117
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.16.3",
118
+ "@rollup/rollup-linux-s390x-gnu": "4.16.3",
119
+ "@rollup/rollup-darwin-x64": "4.16.3",
120
+ "@rollup/rollup-win32-x64-msvc": "4.16.3",
121
+ "@rollup/rollup-linux-x64-gnu": "4.16.3",
122
+ "@rollup/rollup-linux-x64-musl": "4.16.3"
123
123
  },
124
124
  "dependencies": {
125
125
  "@types/estree": "1.0.5"