rollup 3.14.0 → 3.15.0
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/README.md +1 -1
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +22 -14
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/rollup.js +22 -14
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/bin/rollup
CHANGED
package/dist/es/rollup.js
CHANGED
package/dist/es/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.15.0
|
|
4
|
+
Fri, 10 Feb 2023 05:20:05 GMT - commit 5d81532f688383a8aeaf6a099da2b0205e8b8609
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/pr
|
|
|
16
16
|
import { EventEmitter } from 'node:events';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version$1 = "3.
|
|
19
|
+
var version$1 = "3.15.0";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -5025,7 +5025,8 @@ function createHasEffectsContext() {
|
|
|
5025
5025
|
breaks: false,
|
|
5026
5026
|
continues: false,
|
|
5027
5027
|
labels: new Set(),
|
|
5028
|
-
returnYield: false
|
|
5028
|
+
returnYield: false,
|
|
5029
|
+
this: false
|
|
5029
5030
|
},
|
|
5030
5031
|
includedLabels: new Set(),
|
|
5031
5032
|
instantiated: new DiscriminatedPathTracker(),
|
|
@@ -8487,7 +8488,8 @@ class ArrowFunctionExpression extends FunctionBase {
|
|
|
8487
8488
|
breaks: false,
|
|
8488
8489
|
continues: false,
|
|
8489
8490
|
labels: new Set(),
|
|
8490
|
-
returnYield: true
|
|
8491
|
+
returnYield: true,
|
|
8492
|
+
this: false
|
|
8491
8493
|
};
|
|
8492
8494
|
if (this.body.hasEffects(context))
|
|
8493
8495
|
return true;
|
|
@@ -8757,11 +8759,14 @@ class ThisVariable extends LocalVariable {
|
|
|
8757
8759
|
}
|
|
8758
8760
|
}
|
|
8759
8761
|
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8762
|
+
const replacedVariableInit = context.replacedVariableInits.get(this);
|
|
8763
|
+
if (replacedVariableInit) {
|
|
8764
|
+
return (replacedVariableInit.hasEffectsOnInteractionAtPath(path, interaction, context) ||
|
|
8765
|
+
// If the surrounding function is included, all mutations of "this" must
|
|
8766
|
+
// be counted as side effects, which is what this second line does.
|
|
8767
|
+
(!context.ignore.this && super.hasEffectsOnInteractionAtPath(path, interaction, context)));
|
|
8768
|
+
}
|
|
8769
|
+
return UNKNOWN_EXPRESSION.hasEffectsOnInteractionAtPath(path, interaction, context);
|
|
8765
8770
|
}
|
|
8766
8771
|
}
|
|
8767
8772
|
|
|
@@ -8793,6 +8798,10 @@ class FunctionNode extends FunctionBase {
|
|
|
8793
8798
|
}
|
|
8794
8799
|
createScope(parentScope) {
|
|
8795
8800
|
this.scope = new FunctionScope(parentScope, this.context);
|
|
8801
|
+
this.constructedEntity = new ObjectEntity(Object.create(null), OBJECT_PROTOTYPE);
|
|
8802
|
+
// This makes sure that all deoptimizations of "this" are applied to the
|
|
8803
|
+
// constructed entity.
|
|
8804
|
+
this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity);
|
|
8796
8805
|
}
|
|
8797
8806
|
deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
|
|
8798
8807
|
super.deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker);
|
|
@@ -8810,15 +8819,14 @@ class FunctionNode extends FunctionBase {
|
|
|
8810
8819
|
return true;
|
|
8811
8820
|
if (interaction.type === INTERACTION_CALLED) {
|
|
8812
8821
|
const thisInit = context.replacedVariableInits.get(this.scope.thisVariable);
|
|
8813
|
-
context.replacedVariableInits.set(this.scope.thisVariable, interaction.withNew
|
|
8814
|
-
? new ObjectEntity(Object.create(null), OBJECT_PROTOTYPE)
|
|
8815
|
-
: UNKNOWN_EXPRESSION);
|
|
8822
|
+
context.replacedVariableInits.set(this.scope.thisVariable, interaction.withNew ? this.constructedEntity : UNKNOWN_EXPRESSION);
|
|
8816
8823
|
const { brokenFlow, ignore, replacedVariableInits } = context;
|
|
8817
8824
|
context.ignore = {
|
|
8818
8825
|
breaks: false,
|
|
8819
8826
|
continues: false,
|
|
8820
8827
|
labels: new Set(),
|
|
8821
|
-
returnYield: true
|
|
8828
|
+
returnYield: true,
|
|
8829
|
+
this: interaction.withNew
|
|
8822
8830
|
};
|
|
8823
8831
|
if (this.body.hasEffects(context))
|
|
8824
8832
|
return true;
|
package/dist/es/shared/watch.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.15.0
|
|
4
|
+
Fri, 10 Feb 2023 05:20:05 GMT - commit 5d81532f688383a8aeaf6a099da2b0205e8b8609
|
|
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$1 = "3.
|
|
34
|
+
var version$1 = "3.15.0";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -5544,7 +5544,8 @@ function createHasEffectsContext() {
|
|
|
5544
5544
|
breaks: false,
|
|
5545
5545
|
continues: false,
|
|
5546
5546
|
labels: new Set(),
|
|
5547
|
-
returnYield: false
|
|
5547
|
+
returnYield: false,
|
|
5548
|
+
this: false
|
|
5548
5549
|
},
|
|
5549
5550
|
includedLabels: new Set(),
|
|
5550
5551
|
instantiated: new DiscriminatedPathTracker(),
|
|
@@ -9006,7 +9007,8 @@ class ArrowFunctionExpression extends FunctionBase {
|
|
|
9006
9007
|
breaks: false,
|
|
9007
9008
|
continues: false,
|
|
9008
9009
|
labels: new Set(),
|
|
9009
|
-
returnYield: true
|
|
9010
|
+
returnYield: true,
|
|
9011
|
+
this: false
|
|
9010
9012
|
};
|
|
9011
9013
|
if (this.body.hasEffects(context))
|
|
9012
9014
|
return true;
|
|
@@ -9276,11 +9278,14 @@ class ThisVariable extends LocalVariable {
|
|
|
9276
9278
|
}
|
|
9277
9279
|
}
|
|
9278
9280
|
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9281
|
+
const replacedVariableInit = context.replacedVariableInits.get(this);
|
|
9282
|
+
if (replacedVariableInit) {
|
|
9283
|
+
return (replacedVariableInit.hasEffectsOnInteractionAtPath(path, interaction, context) ||
|
|
9284
|
+
// If the surrounding function is included, all mutations of "this" must
|
|
9285
|
+
// be counted as side effects, which is what this second line does.
|
|
9286
|
+
(!context.ignore.this && super.hasEffectsOnInteractionAtPath(path, interaction, context)));
|
|
9287
|
+
}
|
|
9288
|
+
return UNKNOWN_EXPRESSION.hasEffectsOnInteractionAtPath(path, interaction, context);
|
|
9284
9289
|
}
|
|
9285
9290
|
}
|
|
9286
9291
|
|
|
@@ -9312,6 +9317,10 @@ class FunctionNode extends FunctionBase {
|
|
|
9312
9317
|
}
|
|
9313
9318
|
createScope(parentScope) {
|
|
9314
9319
|
this.scope = new FunctionScope(parentScope, this.context);
|
|
9320
|
+
this.constructedEntity = new ObjectEntity(Object.create(null), OBJECT_PROTOTYPE);
|
|
9321
|
+
// This makes sure that all deoptimizations of "this" are applied to the
|
|
9322
|
+
// constructed entity.
|
|
9323
|
+
this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity);
|
|
9315
9324
|
}
|
|
9316
9325
|
deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
|
|
9317
9326
|
super.deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker);
|
|
@@ -9329,15 +9338,14 @@ class FunctionNode extends FunctionBase {
|
|
|
9329
9338
|
return true;
|
|
9330
9339
|
if (interaction.type === INTERACTION_CALLED) {
|
|
9331
9340
|
const thisInit = context.replacedVariableInits.get(this.scope.thisVariable);
|
|
9332
|
-
context.replacedVariableInits.set(this.scope.thisVariable, interaction.withNew
|
|
9333
|
-
? new ObjectEntity(Object.create(null), OBJECT_PROTOTYPE)
|
|
9334
|
-
: UNKNOWN_EXPRESSION);
|
|
9341
|
+
context.replacedVariableInits.set(this.scope.thisVariable, interaction.withNew ? this.constructedEntity : UNKNOWN_EXPRESSION);
|
|
9335
9342
|
const { brokenFlow, ignore, replacedVariableInits } = context;
|
|
9336
9343
|
context.ignore = {
|
|
9337
9344
|
breaks: false,
|
|
9338
9345
|
continues: false,
|
|
9339
9346
|
labels: new Set(),
|
|
9340
|
-
returnYield: true
|
|
9347
|
+
returnYield: true,
|
|
9348
|
+
this: interaction.withNew
|
|
9341
9349
|
};
|
|
9342
9350
|
if (this.body.hasEffects(context))
|
|
9343
9351
|
return true;
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"prepare": "husky install && node scripts/check-release.js || npm run build",
|
|
30
30
|
"prepublishOnly": "node scripts/check-release.js",
|
|
31
31
|
"release": "node scripts/release.js",
|
|
32
|
+
"release:docs": "git fetch --update-head-ok origin master:master && git branch --force documentation-published master && git push origin documentation-published",
|
|
32
33
|
"test": "npm run build && npm run test:all",
|
|
33
34
|
"test:update-snapshots": "node scripts/update-snapshots.js",
|
|
34
35
|
"test:cjs": "npm run build:cjs && npm run test:only",
|