rollup 3.7.4 → 3.7.5
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 +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +55 -12
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.d.ts +1 -1
- 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 +55 -12
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +1 -1
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.7.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.7.5
|
|
4
|
+
Sat, 17 Dec 2022 05:47:48 GMT - commit 5613b96ac5f32a881ed50a275398e140fbf6ba2b
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { promises } from 'node:fs';
|
|
|
16
16
|
import { EventEmitter } from 'node:events';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version$1 = "3.7.
|
|
19
|
+
var version$1 = "3.7.5";
|
|
20
20
|
|
|
21
21
|
var charToInteger = {};
|
|
22
22
|
var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -11770,6 +11770,15 @@ class ExportDefaultVariable extends LocalVariable {
|
|
|
11770
11770
|
this.name = identifier.name;
|
|
11771
11771
|
}
|
|
11772
11772
|
}
|
|
11773
|
+
forbidName(name) {
|
|
11774
|
+
const original = this.getOriginalVariable();
|
|
11775
|
+
if (original === this) {
|
|
11776
|
+
super.forbidName(name);
|
|
11777
|
+
}
|
|
11778
|
+
else {
|
|
11779
|
+
original.forbidName(name);
|
|
11780
|
+
}
|
|
11781
|
+
}
|
|
11773
11782
|
getAssignedVariableName() {
|
|
11774
11783
|
return (this.originalId && this.originalId.name) || null;
|
|
11775
11784
|
}
|
|
@@ -12421,6 +12430,25 @@ class NamespaceVariable extends Variable {
|
|
|
12421
12430
|
this.references.push(identifier);
|
|
12422
12431
|
this.name = identifier.name;
|
|
12423
12432
|
}
|
|
12433
|
+
deoptimizePath(path) {
|
|
12434
|
+
if (path.length > 1) {
|
|
12435
|
+
const key = path[0];
|
|
12436
|
+
if (typeof key === 'string') {
|
|
12437
|
+
this.getMemberVariables()[key]?.deoptimizePath(path.slice(1));
|
|
12438
|
+
}
|
|
12439
|
+
}
|
|
12440
|
+
}
|
|
12441
|
+
deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
|
|
12442
|
+
if (path.length > 1 || (path.length === 1 && interaction.type === INTERACTION_CALLED)) {
|
|
12443
|
+
const key = path[0];
|
|
12444
|
+
if (typeof key === 'string') {
|
|
12445
|
+
this.getMemberVariables()[key]?.deoptimizeThisOnInteractionAtPath(interaction, path.slice(1), recursionTracker);
|
|
12446
|
+
}
|
|
12447
|
+
else {
|
|
12448
|
+
interaction.thisArg.deoptimizePath(UNKNOWN_PATH);
|
|
12449
|
+
}
|
|
12450
|
+
}
|
|
12451
|
+
}
|
|
12424
12452
|
getLiteralValueAtPath(path) {
|
|
12425
12453
|
if (path[0] === SymbolToStringTag) {
|
|
12426
12454
|
return 'Module';
|
|
@@ -12442,8 +12470,22 @@ class NamespaceVariable extends Variable {
|
|
|
12442
12470
|
}
|
|
12443
12471
|
return (this.memberVariables = memberVariables);
|
|
12444
12472
|
}
|
|
12445
|
-
hasEffectsOnInteractionAtPath() {
|
|
12446
|
-
|
|
12473
|
+
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
12474
|
+
const { type } = interaction;
|
|
12475
|
+
if (path.length === 0) {
|
|
12476
|
+
// This can only be a call anyway
|
|
12477
|
+
return true;
|
|
12478
|
+
}
|
|
12479
|
+
if (path.length === 1 && type !== INTERACTION_CALLED) {
|
|
12480
|
+
return type === INTERACTION_ASSIGNED;
|
|
12481
|
+
}
|
|
12482
|
+
const key = path[0];
|
|
12483
|
+
if (typeof key !== 'string') {
|
|
12484
|
+
return true;
|
|
12485
|
+
}
|
|
12486
|
+
const memberVariable = this.getMemberVariables()[key];
|
|
12487
|
+
return (!memberVariable ||
|
|
12488
|
+
memberVariable.hasEffectsOnInteractionAtPath(path.slice(1), interaction, context));
|
|
12447
12489
|
}
|
|
12448
12490
|
include() {
|
|
12449
12491
|
this.included = true;
|
|
@@ -24916,23 +24958,24 @@ function handleError(error, recover = false) {
|
|
|
24916
24958
|
const nameSection = name ? `${name}: ` : '';
|
|
24917
24959
|
const pluginSection = error.plugin ? `(plugin ${error.plugin}) ` : '';
|
|
24918
24960
|
const message = `${pluginSection}${nameSection}${error.message}`;
|
|
24919
|
-
|
|
24961
|
+
const outputLines = [bold(red(`[!] ${bold(message.toString())}`))];
|
|
24920
24962
|
if (error.url) {
|
|
24921
|
-
|
|
24963
|
+
outputLines.push(cyan(error.url));
|
|
24922
24964
|
}
|
|
24923
24965
|
if (error.loc) {
|
|
24924
|
-
|
|
24966
|
+
outputLines.push(`${relativeId((error.loc.file || error.id))} (${error.loc.line}:${error.loc.column})`);
|
|
24925
24967
|
}
|
|
24926
24968
|
else if (error.id) {
|
|
24927
|
-
|
|
24969
|
+
outputLines.push(relativeId(error.id));
|
|
24928
24970
|
}
|
|
24929
24971
|
if (error.frame) {
|
|
24930
|
-
|
|
24972
|
+
outputLines.push(dim(error.frame));
|
|
24931
24973
|
}
|
|
24932
24974
|
if (error.stack) {
|
|
24933
|
-
|
|
24975
|
+
outputLines.push(dim(error.stack?.replace(`${nameSection}${error.message}\n`, '')));
|
|
24934
24976
|
}
|
|
24935
|
-
|
|
24977
|
+
outputLines.push('', '');
|
|
24978
|
+
stderr(outputLines.join('\n'));
|
|
24936
24979
|
// eslint-disable-next-line unicorn/no-process-exit
|
|
24937
24980
|
if (!recover)
|
|
24938
24981
|
process$1.exit(1);
|
package/dist/es/shared/watch.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.d.ts
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.7.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.7.5
|
|
4
|
+
Sat, 17 Dec 2022 05:47:48 GMT - commit 5613b96ac5f32a881ed50a275398e140fbf6ba2b
|
|
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.7.
|
|
34
|
+
var version$1 = "3.7.5";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -1208,23 +1208,24 @@ function handleError(error, recover = false) {
|
|
|
1208
1208
|
const nameSection = name ? `${name}: ` : '';
|
|
1209
1209
|
const pluginSection = error.plugin ? `(plugin ${error.plugin}) ` : '';
|
|
1210
1210
|
const message = `${pluginSection}${nameSection}${error.message}`;
|
|
1211
|
-
|
|
1211
|
+
const outputLines = [bold(red(`[!] ${bold(message.toString())}`))];
|
|
1212
1212
|
if (error.url) {
|
|
1213
|
-
|
|
1213
|
+
outputLines.push(cyan(error.url));
|
|
1214
1214
|
}
|
|
1215
1215
|
if (error.loc) {
|
|
1216
|
-
|
|
1216
|
+
outputLines.push(`${relativeId((error.loc.file || error.id))} (${error.loc.line}:${error.loc.column})`);
|
|
1217
1217
|
}
|
|
1218
1218
|
else if (error.id) {
|
|
1219
|
-
|
|
1219
|
+
outputLines.push(relativeId(error.id));
|
|
1220
1220
|
}
|
|
1221
1221
|
if (error.frame) {
|
|
1222
|
-
|
|
1222
|
+
outputLines.push(dim(error.frame));
|
|
1223
1223
|
}
|
|
1224
1224
|
if (error.stack) {
|
|
1225
|
-
|
|
1225
|
+
outputLines.push(dim(error.stack?.replace(`${nameSection}${error.message}\n`, '')));
|
|
1226
1226
|
}
|
|
1227
|
-
|
|
1227
|
+
outputLines.push('', '');
|
|
1228
|
+
stderr(outputLines.join('\n'));
|
|
1228
1229
|
// eslint-disable-next-line unicorn/no-process-exit
|
|
1229
1230
|
if (!recover)
|
|
1230
1231
|
process$1.exit(1);
|
|
@@ -12285,6 +12286,15 @@ class ExportDefaultVariable extends LocalVariable {
|
|
|
12285
12286
|
this.name = identifier.name;
|
|
12286
12287
|
}
|
|
12287
12288
|
}
|
|
12289
|
+
forbidName(name) {
|
|
12290
|
+
const original = this.getOriginalVariable();
|
|
12291
|
+
if (original === this) {
|
|
12292
|
+
super.forbidName(name);
|
|
12293
|
+
}
|
|
12294
|
+
else {
|
|
12295
|
+
original.forbidName(name);
|
|
12296
|
+
}
|
|
12297
|
+
}
|
|
12288
12298
|
getAssignedVariableName() {
|
|
12289
12299
|
return (this.originalId && this.originalId.name) || null;
|
|
12290
12300
|
}
|
|
@@ -12936,6 +12946,25 @@ class NamespaceVariable extends Variable {
|
|
|
12936
12946
|
this.references.push(identifier);
|
|
12937
12947
|
this.name = identifier.name;
|
|
12938
12948
|
}
|
|
12949
|
+
deoptimizePath(path) {
|
|
12950
|
+
if (path.length > 1) {
|
|
12951
|
+
const key = path[0];
|
|
12952
|
+
if (typeof key === 'string') {
|
|
12953
|
+
this.getMemberVariables()[key]?.deoptimizePath(path.slice(1));
|
|
12954
|
+
}
|
|
12955
|
+
}
|
|
12956
|
+
}
|
|
12957
|
+
deoptimizeThisOnInteractionAtPath(interaction, path, recursionTracker) {
|
|
12958
|
+
if (path.length > 1 || (path.length === 1 && interaction.type === INTERACTION_CALLED)) {
|
|
12959
|
+
const key = path[0];
|
|
12960
|
+
if (typeof key === 'string') {
|
|
12961
|
+
this.getMemberVariables()[key]?.deoptimizeThisOnInteractionAtPath(interaction, path.slice(1), recursionTracker);
|
|
12962
|
+
}
|
|
12963
|
+
else {
|
|
12964
|
+
interaction.thisArg.deoptimizePath(UNKNOWN_PATH);
|
|
12965
|
+
}
|
|
12966
|
+
}
|
|
12967
|
+
}
|
|
12939
12968
|
getLiteralValueAtPath(path) {
|
|
12940
12969
|
if (path[0] === SymbolToStringTag) {
|
|
12941
12970
|
return 'Module';
|
|
@@ -12957,8 +12986,22 @@ class NamespaceVariable extends Variable {
|
|
|
12957
12986
|
}
|
|
12958
12987
|
return (this.memberVariables = memberVariables);
|
|
12959
12988
|
}
|
|
12960
|
-
hasEffectsOnInteractionAtPath() {
|
|
12961
|
-
|
|
12989
|
+
hasEffectsOnInteractionAtPath(path, interaction, context) {
|
|
12990
|
+
const { type } = interaction;
|
|
12991
|
+
if (path.length === 0) {
|
|
12992
|
+
// This can only be a call anyway
|
|
12993
|
+
return true;
|
|
12994
|
+
}
|
|
12995
|
+
if (path.length === 1 && type !== INTERACTION_CALLED) {
|
|
12996
|
+
return type === INTERACTION_ASSIGNED;
|
|
12997
|
+
}
|
|
12998
|
+
const key = path[0];
|
|
12999
|
+
if (typeof key !== 'string') {
|
|
13000
|
+
return true;
|
|
13001
|
+
}
|
|
13002
|
+
const memberVariable = this.getMemberVariables()[key];
|
|
13003
|
+
return (!memberVariable ||
|
|
13004
|
+
memberVariable.hasEffectsOnInteractionAtPath(path.slice(1), interaction, context));
|
|
12962
13005
|
}
|
|
12963
13006
|
include() {
|
|
12964
13007
|
this.included = true;
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED