rollup 3.21.0 → 3.21.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/LICENSE.md +1 -1
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +60 -53
- package/dist/es/shared/watch.js +23 -29
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +22 -28
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/rollup.js +60 -55
- package/dist/shared/watch-cli.js +285 -261
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +36 -37
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.21.
|
|
4
|
-
Sun,
|
|
3
|
+
Rollup.js v3.21.2
|
|
4
|
+
Sun, 30 Apr 2023 05:31:29 GMT - commit f138dcee19367f17f2e66f940fb8d612471f7ddf
|
|
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.21.
|
|
34
|
+
var version$1 = "3.21.2";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -3325,8 +3325,6 @@ class ExternalModule {
|
|
|
3325
3325
|
}
|
|
3326
3326
|
}
|
|
3327
3327
|
|
|
3328
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3329
|
-
|
|
3330
3328
|
function getDefaultExportFromCjs (x) {
|
|
3331
3329
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3332
3330
|
}
|
|
@@ -3359,12 +3357,6 @@ function getAugmentedNamespace(n) {
|
|
|
3359
3357
|
return a;
|
|
3360
3358
|
}
|
|
3361
3359
|
|
|
3362
|
-
exports.picomatchExports = {};
|
|
3363
|
-
var picomatch$1 = {
|
|
3364
|
-
get exports(){ return exports.picomatchExports; },
|
|
3365
|
-
set exports(v){ exports.picomatchExports = v; },
|
|
3366
|
-
};
|
|
3367
|
-
|
|
3368
3360
|
var utils$3 = {};
|
|
3369
3361
|
|
|
3370
3362
|
const path$1 = require$$0$1;
|
|
@@ -3608,7 +3600,7 @@ var constants$2 = {
|
|
|
3608
3600
|
output = `(?:^(?!${output}).*$)`;
|
|
3609
3601
|
}
|
|
3610
3602
|
return output;
|
|
3611
|
-
};
|
|
3603
|
+
};
|
|
3612
3604
|
} (utils$3));
|
|
3613
3605
|
|
|
3614
3606
|
const utils$2 = utils$3;
|
|
@@ -5113,9 +5105,9 @@ const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
|
5113
5105
|
* @api public
|
|
5114
5106
|
*/
|
|
5115
5107
|
|
|
5116
|
-
const picomatch = (glob, options, returnState = false) => {
|
|
5108
|
+
const picomatch$1 = (glob, options, returnState = false) => {
|
|
5117
5109
|
if (Array.isArray(glob)) {
|
|
5118
|
-
const fns = glob.map(input => picomatch(input, options, returnState));
|
|
5110
|
+
const fns = glob.map(input => picomatch$1(input, options, returnState));
|
|
5119
5111
|
const arrayMatcher = str => {
|
|
5120
5112
|
for (const isMatch of fns) {
|
|
5121
5113
|
const state = isMatch(str);
|
|
@@ -5135,8 +5127,8 @@ const picomatch = (glob, options, returnState = false) => {
|
|
|
5135
5127
|
const opts = options || {};
|
|
5136
5128
|
const posix = utils.isWindows(options);
|
|
5137
5129
|
const regex = isState
|
|
5138
|
-
? picomatch.compileRe(glob, options)
|
|
5139
|
-
: picomatch.makeRe(glob, options, false, true);
|
|
5130
|
+
? picomatch$1.compileRe(glob, options)
|
|
5131
|
+
: picomatch$1.makeRe(glob, options, false, true);
|
|
5140
5132
|
|
|
5141
5133
|
const state = regex.state;
|
|
5142
5134
|
delete regex.state;
|
|
@@ -5144,11 +5136,11 @@ const picomatch = (glob, options, returnState = false) => {
|
|
|
5144
5136
|
let isIgnored = () => false;
|
|
5145
5137
|
if (opts.ignore) {
|
|
5146
5138
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
5147
|
-
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
5139
|
+
isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState);
|
|
5148
5140
|
}
|
|
5149
5141
|
|
|
5150
5142
|
const matcher = (input, returnObject = false) => {
|
|
5151
|
-
const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
|
|
5143
|
+
const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix });
|
|
5152
5144
|
const result = { glob, state, regex, posix, input, output, match, isMatch };
|
|
5153
5145
|
|
|
5154
5146
|
if (typeof opts.onResult === 'function') {
|
|
@@ -5198,7 +5190,7 @@ const picomatch = (glob, options, returnState = false) => {
|
|
|
5198
5190
|
* @api public
|
|
5199
5191
|
*/
|
|
5200
5192
|
|
|
5201
|
-
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
5193
|
+
picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
|
|
5202
5194
|
if (typeof input !== 'string') {
|
|
5203
5195
|
throw new TypeError('Expected input to be a string');
|
|
5204
5196
|
}
|
|
@@ -5219,7 +5211,7 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
|
5219
5211
|
|
|
5220
5212
|
if (match === false || opts.capture === true) {
|
|
5221
5213
|
if (opts.matchBase === true || opts.basename === true) {
|
|
5222
|
-
match = picomatch.matchBase(input, regex, options, posix);
|
|
5214
|
+
match = picomatch$1.matchBase(input, regex, options, posix);
|
|
5223
5215
|
} else {
|
|
5224
5216
|
match = regex.exec(output);
|
|
5225
5217
|
}
|
|
@@ -5242,8 +5234,8 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
|
5242
5234
|
* @api public
|
|
5243
5235
|
*/
|
|
5244
5236
|
|
|
5245
|
-
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
5246
|
-
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
5237
|
+
picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
5238
|
+
const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options);
|
|
5247
5239
|
return regex.test(path.basename(input));
|
|
5248
5240
|
};
|
|
5249
5241
|
|
|
@@ -5264,7 +5256,7 @@ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) =
|
|
|
5264
5256
|
* @api public
|
|
5265
5257
|
*/
|
|
5266
5258
|
|
|
5267
|
-
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
5259
|
+
picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
|
|
5268
5260
|
|
|
5269
5261
|
/**
|
|
5270
5262
|
* Parse a glob pattern to create the source string for a regular
|
|
@@ -5280,8 +5272,8 @@ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str
|
|
|
5280
5272
|
* @api public
|
|
5281
5273
|
*/
|
|
5282
5274
|
|
|
5283
|
-
picomatch.parse = (pattern, options) => {
|
|
5284
|
-
if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
|
|
5275
|
+
picomatch$1.parse = (pattern, options) => {
|
|
5276
|
+
if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options));
|
|
5285
5277
|
return parse$1(pattern, { ...options, fastpaths: false });
|
|
5286
5278
|
};
|
|
5287
5279
|
|
|
@@ -5312,7 +5304,7 @@ picomatch.parse = (pattern, options) => {
|
|
|
5312
5304
|
* @api public
|
|
5313
5305
|
*/
|
|
5314
5306
|
|
|
5315
|
-
picomatch.scan = (input, options) => scan(input, options);
|
|
5307
|
+
picomatch$1.scan = (input, options) => scan(input, options);
|
|
5316
5308
|
|
|
5317
5309
|
/**
|
|
5318
5310
|
* Compile a regular expression from the `state` object returned by the
|
|
@@ -5326,7 +5318,7 @@ picomatch.scan = (input, options) => scan(input, options);
|
|
|
5326
5318
|
* @api public
|
|
5327
5319
|
*/
|
|
5328
5320
|
|
|
5329
|
-
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
5321
|
+
picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
5330
5322
|
if (returnOutput === true) {
|
|
5331
5323
|
return state.output;
|
|
5332
5324
|
}
|
|
@@ -5340,7 +5332,7 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
|
|
|
5340
5332
|
source = `^(?!${source}).*$`;
|
|
5341
5333
|
}
|
|
5342
5334
|
|
|
5343
|
-
const regex = picomatch.toRegex(source, options);
|
|
5335
|
+
const regex = picomatch$1.toRegex(source, options);
|
|
5344
5336
|
if (returnState === true) {
|
|
5345
5337
|
regex.state = state;
|
|
5346
5338
|
}
|
|
@@ -5367,7 +5359,7 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
|
|
|
5367
5359
|
* @api public
|
|
5368
5360
|
*/
|
|
5369
5361
|
|
|
5370
|
-
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
5362
|
+
picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
5371
5363
|
if (!input || typeof input !== 'string') {
|
|
5372
5364
|
throw new TypeError('Expected a non-empty string');
|
|
5373
5365
|
}
|
|
@@ -5382,7 +5374,7 @@ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = fal
|
|
|
5382
5374
|
parsed = parse$1(input, options);
|
|
5383
5375
|
}
|
|
5384
5376
|
|
|
5385
|
-
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
5377
|
+
return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
|
|
5386
5378
|
};
|
|
5387
5379
|
|
|
5388
5380
|
/**
|
|
@@ -5402,7 +5394,7 @@ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = fal
|
|
|
5402
5394
|
* @api public
|
|
5403
5395
|
*/
|
|
5404
5396
|
|
|
5405
|
-
picomatch.toRegex = (source, options) => {
|
|
5397
|
+
picomatch$1.toRegex = (source, options) => {
|
|
5406
5398
|
try {
|
|
5407
5399
|
const opts = options || {};
|
|
5408
5400
|
return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
|
|
@@ -5417,20 +5409,17 @@ picomatch.toRegex = (source, options) => {
|
|
|
5417
5409
|
* @return {Object}
|
|
5418
5410
|
*/
|
|
5419
5411
|
|
|
5420
|
-
picomatch.constants = constants;
|
|
5412
|
+
picomatch$1.constants = constants;
|
|
5421
5413
|
|
|
5422
5414
|
/**
|
|
5423
5415
|
* Expose "picomatch"
|
|
5424
5416
|
*/
|
|
5425
5417
|
|
|
5426
|
-
var picomatch_1 = picomatch;
|
|
5427
|
-
|
|
5428
|
-
(function (module) {
|
|
5418
|
+
var picomatch_1 = picomatch$1;
|
|
5429
5419
|
|
|
5430
|
-
|
|
5431
|
-
} (picomatch$1));
|
|
5420
|
+
var picomatch = picomatch_1;
|
|
5432
5421
|
|
|
5433
|
-
const pm = /*@__PURE__*/getDefaultExportFromCjs(
|
|
5422
|
+
const pm = /*@__PURE__*/getDefaultExportFromCjs(picomatch);
|
|
5434
5423
|
|
|
5435
5424
|
const extractors = {
|
|
5436
5425
|
ArrayPattern(names, param) {
|
|
@@ -7696,7 +7685,7 @@ const PC = {
|
|
|
7696
7685
|
const ARRAY_TYPE = {
|
|
7697
7686
|
__proto__: null,
|
|
7698
7687
|
[ValueProperties]: PURE,
|
|
7699
|
-
from:
|
|
7688
|
+
from: O,
|
|
7700
7689
|
of: PF,
|
|
7701
7690
|
prototype: O
|
|
7702
7691
|
};
|
|
@@ -7763,7 +7752,7 @@ const knownGlobals = {
|
|
|
7763
7752
|
isNaN: PF,
|
|
7764
7753
|
isPrototypeOf: O,
|
|
7765
7754
|
JSON: O,
|
|
7766
|
-
Map:
|
|
7755
|
+
Map: C,
|
|
7767
7756
|
Math: {
|
|
7768
7757
|
__proto__: null,
|
|
7769
7758
|
[ValueProperties]: IMPURE,
|
|
@@ -7836,7 +7825,7 @@ const knownGlobals = {
|
|
|
7836
7825
|
isFrozen: PF,
|
|
7837
7826
|
isSealed: PF,
|
|
7838
7827
|
keys: PF,
|
|
7839
|
-
fromEntries:
|
|
7828
|
+
fromEntries: O,
|
|
7840
7829
|
entries: PF,
|
|
7841
7830
|
prototype: O
|
|
7842
7831
|
},
|
|
@@ -7859,7 +7848,7 @@ const knownGlobals = {
|
|
|
7859
7848
|
ReferenceError: PC,
|
|
7860
7849
|
Reflect: O,
|
|
7861
7850
|
RegExp: PC,
|
|
7862
|
-
Set:
|
|
7851
|
+
Set: C,
|
|
7863
7852
|
SharedArrayBuffer: C,
|
|
7864
7853
|
String: {
|
|
7865
7854
|
__proto__: null,
|
|
@@ -7899,8 +7888,8 @@ const knownGlobals = {
|
|
|
7899
7888
|
unescape: PF,
|
|
7900
7889
|
URIError: PC,
|
|
7901
7890
|
valueOf: O,
|
|
7902
|
-
WeakMap:
|
|
7903
|
-
WeakSet:
|
|
7891
|
+
WeakMap: C,
|
|
7892
|
+
WeakSet: C,
|
|
7904
7893
|
// Additional globals shared by Node and Browser that are not strictly part of the language
|
|
7905
7894
|
clearInterval: C,
|
|
7906
7895
|
clearTimeout: C,
|
|
@@ -9110,10 +9099,14 @@ class FunctionBase extends NodeBase {
|
|
|
9110
9099
|
}
|
|
9111
9100
|
else if (parameter instanceof Identifier) {
|
|
9112
9101
|
parameters[position][0].addEntityToBeDeoptimized(argument);
|
|
9102
|
+
this.addArgumentToBeDeoptimized(argument);
|
|
9113
9103
|
}
|
|
9114
9104
|
else if (parameter) {
|
|
9115
9105
|
argument.deoptimizePath(UNKNOWN_PATH);
|
|
9116
9106
|
}
|
|
9107
|
+
else {
|
|
9108
|
+
this.addArgumentToBeDeoptimized(argument);
|
|
9109
|
+
}
|
|
9117
9110
|
}
|
|
9118
9111
|
}
|
|
9119
9112
|
else {
|
|
@@ -9193,6 +9186,7 @@ class FunctionBase extends NodeBase {
|
|
|
9193
9186
|
}
|
|
9194
9187
|
super.parseNode(esTreeNode);
|
|
9195
9188
|
}
|
|
9189
|
+
addArgumentToBeDeoptimized(_argument) { }
|
|
9196
9190
|
applyDeoptimizations() { }
|
|
9197
9191
|
}
|
|
9198
9192
|
FunctionBase.prototype.preventChildBlockScope = true;
|
|
@@ -9444,10 +9438,26 @@ class AssignmentPattern extends NodeBase {
|
|
|
9444
9438
|
class ArgumentsVariable extends LocalVariable {
|
|
9445
9439
|
constructor(context) {
|
|
9446
9440
|
super('arguments', null, UNKNOWN_EXPRESSION, context);
|
|
9441
|
+
this.deoptimizedArguments = [];
|
|
9442
|
+
}
|
|
9443
|
+
addArgumentToBeDeoptimized(argument) {
|
|
9444
|
+
if (this.included) {
|
|
9445
|
+
argument.deoptimizePath(UNKNOWN_PATH);
|
|
9446
|
+
}
|
|
9447
|
+
else {
|
|
9448
|
+
this.deoptimizedArguments.push(argument);
|
|
9449
|
+
}
|
|
9447
9450
|
}
|
|
9448
9451
|
hasEffectsOnInteractionAtPath(path, { type }) {
|
|
9449
9452
|
return type !== INTERACTION_ACCESSED || path.length > 1;
|
|
9450
9453
|
}
|
|
9454
|
+
include() {
|
|
9455
|
+
super.include();
|
|
9456
|
+
for (const argument of this.deoptimizedArguments) {
|
|
9457
|
+
argument.deoptimizePath(UNKNOWN_PATH);
|
|
9458
|
+
}
|
|
9459
|
+
this.deoptimizedArguments.length = 0;
|
|
9460
|
+
}
|
|
9451
9461
|
}
|
|
9452
9462
|
|
|
9453
9463
|
class ThisVariable extends ParameterVariable {
|
|
@@ -9545,6 +9555,9 @@ class FunctionNode extends FunctionBase {
|
|
|
9545
9555
|
super.initialise();
|
|
9546
9556
|
this.id?.declare('function', this);
|
|
9547
9557
|
}
|
|
9558
|
+
addArgumentToBeDeoptimized(argument) {
|
|
9559
|
+
this.scope.argumentsVariable.addArgumentToBeDeoptimized(argument);
|
|
9560
|
+
}
|
|
9548
9561
|
getObjectEntity() {
|
|
9549
9562
|
if (this.objectEntity !== null) {
|
|
9550
9563
|
return this.objectEntity;
|
|
@@ -14862,12 +14875,6 @@ function updateExtensionForRelativeAmdId(id, forceJsExtensionForImports) {
|
|
|
14862
14875
|
return forceJsExtensionForImports ? addJsExtension(id) : removeJsExtension(id);
|
|
14863
14876
|
}
|
|
14864
14877
|
|
|
14865
|
-
var _staticExports = {};
|
|
14866
|
-
var _static = {
|
|
14867
|
-
get exports(){ return _staticExports; },
|
|
14868
|
-
set exports(v){ _staticExports = v; },
|
|
14869
|
-
};
|
|
14870
|
-
|
|
14871
14878
|
const require$$0 = [
|
|
14872
14879
|
"assert",
|
|
14873
14880
|
"async_hooks",
|
|
@@ -14912,11 +14919,9 @@ const require$$0 = [
|
|
|
14912
14919
|
"zlib"
|
|
14913
14920
|
];
|
|
14914
14921
|
|
|
14915
|
-
|
|
14916
|
-
module.exports = require$$0;
|
|
14917
|
-
} (_static));
|
|
14922
|
+
var _static = require$$0;
|
|
14918
14923
|
|
|
14919
|
-
const builtinModules = /*@__PURE__*/getDefaultExportFromCjs(
|
|
14924
|
+
const builtinModules = /*@__PURE__*/getDefaultExportFromCjs(_static);
|
|
14920
14925
|
|
|
14921
14926
|
const nodeBuiltins = new Set([
|
|
14922
14927
|
...builtinModules,
|
|
@@ -26281,7 +26286,6 @@ exports.URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY = URL_TREATING_MODULE_AS_EXTE
|
|
|
26281
26286
|
exports.URL_WATCH = URL_WATCH;
|
|
26282
26287
|
exports.bold = bold;
|
|
26283
26288
|
exports.commandAliases = commandAliases;
|
|
26284
|
-
exports.commonjsGlobal = commonjsGlobal;
|
|
26285
26289
|
exports.createFilter = createFilter;
|
|
26286
26290
|
exports.cyan = cyan;
|
|
26287
26291
|
exports.defineConfig = defineConfig;
|
|
@@ -26307,6 +26311,7 @@ exports.handleError = handleError;
|
|
|
26307
26311
|
exports.isWatchEnabled = isWatchEnabled;
|
|
26308
26312
|
exports.mergeOptions = mergeOptions;
|
|
26309
26313
|
exports.normalizePluginOption = normalizePluginOption;
|
|
26314
|
+
exports.picomatch = picomatch;
|
|
26310
26315
|
exports.printQuotedStringList = printQuotedStringList;
|
|
26311
26316
|
exports.relativeId = relativeId;
|
|
26312
26317
|
exports.rollup = rollup;
|