rollup 2.57.0 → 2.58.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/CHANGELOG.md +42 -0
- package/dist/bin/rollup +20 -20
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +25 -25
- package/dist/es/shared/watch.js +131 -29
- package/dist/loadConfigFile.js +3 -3
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +2 -2
- package/dist/rollup.js +3 -3
- package/dist/shared/index.js +138 -36
- package/dist/shared/loadConfigFile.js +14 -14
- package/dist/shared/mergeOptions.js +3 -3
- package/dist/shared/rollup.js +34 -34
- package/dist/shared/watch-cli.js +11 -11
- package/dist/shared/watch.js +11 -11
- package/package.json +7 -7
package/dist/rollup.d.ts
CHANGED
|
@@ -204,7 +204,7 @@ export interface PluginContext extends MinimalPluginContext {
|
|
|
204
204
|
resolve: (
|
|
205
205
|
source: string,
|
|
206
206
|
importer?: string,
|
|
207
|
-
options?: { custom?: CustomPluginOptions; skipSelf?: boolean }
|
|
207
|
+
options?: { custom?: CustomPluginOptions; isEntry?: boolean; skipSelf?: boolean }
|
|
208
208
|
) => Promise<ResolvedId | null>;
|
|
209
209
|
/** @deprecated Use `this.resolve` instead */
|
|
210
210
|
resolveId: (source: string, importer?: string) => Promise<string | null>;
|
|
@@ -237,7 +237,7 @@ export type ResolveIdHook = (
|
|
|
237
237
|
this: PluginContext,
|
|
238
238
|
source: string,
|
|
239
239
|
importer: string | undefined,
|
|
240
|
-
options: { custom?: CustomPluginOptions }
|
|
240
|
+
options: { custom?: CustomPluginOptions; isEntry: boolean }
|
|
241
241
|
) => Promise<ResolveIdResult> | ResolveIdResult;
|
|
242
242
|
|
|
243
243
|
export type IsExternal = (
|
package/dist/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.58.3
|
|
4
|
+
Mon, 25 Oct 2021 13:49:07 GMT - commit 0b8d4c668683c7702f20fcf480db077dbe2be774
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const rollup = require('./shared/rollup.js');
|
|
16
16
|
require('path');
|
|
17
17
|
require('crypto');
|
|
18
18
|
require('fs');
|
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.58.3
|
|
4
|
+
Mon, 25 Oct 2021 13:49:07 GMT - commit 0b8d4c668683c7702f20fcf480db077dbe2be774
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const require$$0$1 = require('events');
|
|
14
|
+
const fs$4 = require('fs');
|
|
15
|
+
const path$1 = require('path');
|
|
16
|
+
const require$$2 = require('util');
|
|
17
|
+
const require$$1 = require('stream');
|
|
18
|
+
const rollup = require('./rollup.js');
|
|
19
|
+
const require$$2$1 = require('os');
|
|
20
20
|
|
|
21
21
|
var chokidar$1 = {};
|
|
22
22
|
|
|
@@ -477,8 +477,128 @@ var isExtglob$1 = function isExtglob(str) {
|
|
|
477
477
|
|
|
478
478
|
var isExtglob = isExtglob$1;
|
|
479
479
|
var chars = { '{': '}', '(': ')', '[': ']'};
|
|
480
|
-
var
|
|
481
|
-
|
|
480
|
+
var strictCheck = function(str) {
|
|
481
|
+
if (str[0] === '!') {
|
|
482
|
+
return true;
|
|
483
|
+
}
|
|
484
|
+
var index = 0;
|
|
485
|
+
var pipeIndex = -2;
|
|
486
|
+
var closeSquareIndex = -2;
|
|
487
|
+
var closeCurlyIndex = -2;
|
|
488
|
+
var closeParenIndex = -2;
|
|
489
|
+
var backSlashIndex = -2;
|
|
490
|
+
while (index < str.length) {
|
|
491
|
+
if (str[index] === '*') {
|
|
492
|
+
return true;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) {
|
|
496
|
+
return true;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {
|
|
500
|
+
if (closeSquareIndex < index) {
|
|
501
|
+
closeSquareIndex = str.indexOf(']', index);
|
|
502
|
+
}
|
|
503
|
+
if (closeSquareIndex > index) {
|
|
504
|
+
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
505
|
+
return true;
|
|
506
|
+
}
|
|
507
|
+
backSlashIndex = str.indexOf('\\', index);
|
|
508
|
+
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
|
509
|
+
return true;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {
|
|
515
|
+
closeCurlyIndex = str.indexOf('}', index);
|
|
516
|
+
if (closeCurlyIndex > index) {
|
|
517
|
+
backSlashIndex = str.indexOf('\\', index);
|
|
518
|
+
if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
|
|
519
|
+
return true;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {
|
|
525
|
+
closeParenIndex = str.indexOf(')', index);
|
|
526
|
+
if (closeParenIndex > index) {
|
|
527
|
+
backSlashIndex = str.indexOf('\\', index);
|
|
528
|
+
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
|
529
|
+
return true;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {
|
|
535
|
+
if (pipeIndex < index) {
|
|
536
|
+
pipeIndex = str.indexOf('|', index);
|
|
537
|
+
}
|
|
538
|
+
if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {
|
|
539
|
+
closeParenIndex = str.indexOf(')', pipeIndex);
|
|
540
|
+
if (closeParenIndex > pipeIndex) {
|
|
541
|
+
backSlashIndex = str.indexOf('\\', pipeIndex);
|
|
542
|
+
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
|
543
|
+
return true;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if (str[index] === '\\') {
|
|
550
|
+
var open = str[index + 1];
|
|
551
|
+
index += 2;
|
|
552
|
+
var close = chars[open];
|
|
553
|
+
|
|
554
|
+
if (close) {
|
|
555
|
+
var n = str.indexOf(close, index);
|
|
556
|
+
if (n !== -1) {
|
|
557
|
+
index = n + 1;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
if (str[index] === '!') {
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
} else {
|
|
565
|
+
index++;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
return false;
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
var relaxedCheck = function(str) {
|
|
572
|
+
if (str[0] === '!') {
|
|
573
|
+
return true;
|
|
574
|
+
}
|
|
575
|
+
var index = 0;
|
|
576
|
+
while (index < str.length) {
|
|
577
|
+
if (/[*?{}()[\]]/.test(str[index])) {
|
|
578
|
+
return true;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if (str[index] === '\\') {
|
|
582
|
+
var open = str[index + 1];
|
|
583
|
+
index += 2;
|
|
584
|
+
var close = chars[open];
|
|
585
|
+
|
|
586
|
+
if (close) {
|
|
587
|
+
var n = str.indexOf(close, index);
|
|
588
|
+
if (n !== -1) {
|
|
589
|
+
index = n + 1;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (str[index] === '!') {
|
|
594
|
+
return true;
|
|
595
|
+
}
|
|
596
|
+
} else {
|
|
597
|
+
index++;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
return false;
|
|
601
|
+
};
|
|
482
602
|
|
|
483
603
|
var isGlob$2 = function isGlob(str, options) {
|
|
484
604
|
if (typeof str !== 'string' || str === '') {
|
|
@@ -489,32 +609,14 @@ var isGlob$2 = function isGlob(str, options) {
|
|
|
489
609
|
return true;
|
|
490
610
|
}
|
|
491
611
|
|
|
492
|
-
var
|
|
493
|
-
var match;
|
|
612
|
+
var check = strictCheck;
|
|
494
613
|
|
|
495
|
-
// optionally relax
|
|
614
|
+
// optionally relax check
|
|
496
615
|
if (options && options.strict === false) {
|
|
497
|
-
|
|
616
|
+
check = relaxedCheck;
|
|
498
617
|
}
|
|
499
618
|
|
|
500
|
-
|
|
501
|
-
if (match[2]) return true;
|
|
502
|
-
var idx = match.index + match[0].length;
|
|
503
|
-
|
|
504
|
-
// if an open bracket/brace/paren is escaped,
|
|
505
|
-
// set the index to the next closing character
|
|
506
|
-
var open = match[1];
|
|
507
|
-
var close = open ? chars[open] : null;
|
|
508
|
-
if (open && close) {
|
|
509
|
-
var n = str.indexOf(close, idx);
|
|
510
|
-
if (n !== -1) {
|
|
511
|
-
idx = n + 1;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
str = str.slice(idx);
|
|
516
|
-
}
|
|
517
|
-
return false;
|
|
619
|
+
return check(str);
|
|
518
620
|
};
|
|
519
621
|
|
|
520
622
|
var isGlob$1 = isGlob$2;
|
|
@@ -1978,7 +2080,7 @@ braces$1.create = (input, options = {}) => {
|
|
|
1978
2080
|
|
|
1979
2081
|
var braces_1 = braces$1;
|
|
1980
2082
|
|
|
1981
|
-
|
|
2083
|
+
const require$$0 = [
|
|
1982
2084
|
"3dm",
|
|
1983
2085
|
"3ds",
|
|
1984
2086
|
"3g2",
|
|
@@ -2954,7 +3056,7 @@ var nodefsHandler = NodeFsHandler$1;
|
|
|
2954
3056
|
|
|
2955
3057
|
var fseventsHandler = {exports: {}};
|
|
2956
3058
|
|
|
2957
|
-
|
|
3059
|
+
const require$$3 = /*@__PURE__*/rollup.getAugmentedNamespace(rollup.fseventsImporter);
|
|
2958
3060
|
|
|
2959
3061
|
const fs$1 = fs$4;
|
|
2960
3062
|
const sysPath$1 = path$1;
|
|
@@ -4451,7 +4553,7 @@ const watch = (paths, options) => {
|
|
|
4451
4553
|
|
|
4452
4554
|
chokidar$1.watch = watch;
|
|
4453
4555
|
|
|
4454
|
-
|
|
4556
|
+
const chokidar = chokidar$1;
|
|
4455
4557
|
|
|
4456
4558
|
exports.chokidar = chokidar;
|
|
4457
4559
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.58.3
|
|
4
|
+
Mon, 25 Oct 2021 13:49:07 GMT - commit 0b8d4c668683c7702f20fcf480db077dbe2be774
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,27 +10,27 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const url = require('url');
|
|
16
|
+
const tty = require('tty');
|
|
17
|
+
const rollup = require('./rollup.js');
|
|
18
|
+
const mergeOptions = require('./mergeOptions.js');
|
|
19
19
|
|
|
20
20
|
function _interopNamespaceDefault(e) {
|
|
21
|
-
|
|
21
|
+
const n = Object.create(null);
|
|
22
22
|
if (e) {
|
|
23
|
-
for (
|
|
23
|
+
for (const k in e) {
|
|
24
24
|
n[k] = e[k];
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
n
|
|
27
|
+
n.default = e;
|
|
28
28
|
return n;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
32
|
+
const path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
33
|
+
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
34
34
|
|
|
35
35
|
const env = process.env;
|
|
36
36
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.58.3
|
|
4
|
+
Mon, 25 Oct 2021 13:49:07 GMT - commit 0b8d4c668683c7702f20fcf480db077dbe2be774
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
const rollup = require('./rollup.js');
|
|
14
14
|
|
|
15
15
|
const commandAliases = {
|
|
16
16
|
c: 'config',
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.58.3
|
|
4
|
+
Mon, 25 Oct 2021 13:49:07 GMT - commit 0b8d4c668683c7702f20fcf480db077dbe2be774
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,23 +10,23 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const path$2 = require('path');
|
|
14
|
+
const crypto = require('crypto');
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const require$$0 = require('events');
|
|
17
17
|
|
|
18
18
|
function _interopNamespaceDefault(e) {
|
|
19
|
-
|
|
19
|
+
const n = Object.create(null);
|
|
20
20
|
if (e) {
|
|
21
|
-
for (
|
|
21
|
+
for (const k in e) {
|
|
22
22
|
n[k] = e[k];
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
n
|
|
25
|
+
n.default = e;
|
|
26
26
|
return n;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
var version$1 = "2.
|
|
29
|
+
var version$1 = "2.58.3";
|
|
30
30
|
|
|
31
31
|
function ensureArray$1(items) {
|
|
32
32
|
if (Array.isArray(items)) {
|
|
@@ -584,7 +584,7 @@ let fsEvents;
|
|
|
584
584
|
let fsEventsImportError;
|
|
585
585
|
function loadFsEvents() {
|
|
586
586
|
const moduleName = 'fsevents';
|
|
587
|
-
return
|
|
587
|
+
return Promise.resolve().then(() => /*#__PURE__*/_interopNamespaceDefault(require(moduleName)))
|
|
588
588
|
.then(namespace => {
|
|
589
589
|
fsEvents = namespace.default;
|
|
590
590
|
})
|
|
@@ -599,10 +599,10 @@ function getFsEvents() {
|
|
|
599
599
|
return fsEvents;
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
-
|
|
602
|
+
const fseventsImporter = {
|
|
603
603
|
__proto__: null,
|
|
604
|
-
loadFsEvents
|
|
605
|
-
getFsEvents
|
|
604
|
+
loadFsEvents,
|
|
605
|
+
getFsEvents
|
|
606
606
|
};
|
|
607
607
|
|
|
608
608
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -2047,7 +2047,7 @@ Bundle$1.prototype.trimEnd = function trimEnd (charType) {
|
|
|
2047
2047
|
return this;
|
|
2048
2048
|
};
|
|
2049
2049
|
|
|
2050
|
-
|
|
2050
|
+
const MagicString$1 = MagicString;
|
|
2051
2051
|
|
|
2052
2052
|
function relative(from, to) {
|
|
2053
2053
|
const fromParts = from.split(/[/\\]/).filter(Boolean);
|
|
@@ -4420,7 +4420,7 @@ var picomatch_1 = picomatch$1;
|
|
|
4420
4420
|
|
|
4421
4421
|
var picomatch = picomatch_1;
|
|
4422
4422
|
|
|
4423
|
-
|
|
4423
|
+
const pm = picomatch;
|
|
4424
4424
|
|
|
4425
4425
|
const extractors = {
|
|
4426
4426
|
ArrayPattern(names, param) {
|
|
@@ -10399,7 +10399,7 @@ const loopOverNamespaces = (body, allowVarLoopVariable, t, { _, cnst, getDirectR
|
|
|
10399
10399
|
if (cnst !== 'var' || allowVarLoopVariable) {
|
|
10400
10400
|
return (`for${_}(var i${_}=${_}0;${_}i${_}<${_}m.length;${_}i++)${_}{${n}` +
|
|
10401
10401
|
`${t}${t}${cnst} e${_}=${_}m[i];${n}` +
|
|
10402
|
-
`${t}${t}for${_}(${cnst} k in e)${_}${body}${n}${t}}`);
|
|
10402
|
+
`${t}${t}if${_}(typeof e${_}!==${_}'string'${_}&&${_}!Array.isArray(e))${_}{${_}for${_}(${cnst} k in e)${_}${body}${_}}${n}${t}}`);
|
|
10403
10403
|
}
|
|
10404
10404
|
const [left, right] = getDirectReturnFunction(['e'], {
|
|
10405
10405
|
functionReturn: false,
|
|
@@ -10407,7 +10407,7 @@ const loopOverNamespaces = (body, allowVarLoopVariable, t, { _, cnst, getDirectR
|
|
|
10407
10407
|
name: null
|
|
10408
10408
|
});
|
|
10409
10409
|
return (`m.forEach(${left}` +
|
|
10410
|
-
`Object.keys(e).forEach(${getFunctionIntro(['k'], {
|
|
10410
|
+
`e${_}&&${_}typeof e${_}!==${_}'string'${_}&&${_}!Array.isArray(e)${_}&&${_}Object.keys(e).forEach(${getFunctionIntro(['k'], {
|
|
10411
10411
|
isAsync: false,
|
|
10412
10412
|
name: null
|
|
10413
10413
|
})}${body})${right});`);
|
|
@@ -13819,7 +13819,7 @@ function umd(magicString, { accessedGlobals, dependencies, exports, hasExports,
|
|
|
13819
13819
|
return magicString.trim().indent(t).append(wrapperOutro).prepend(wrapperIntro);
|
|
13820
13820
|
}
|
|
13821
13821
|
|
|
13822
|
-
|
|
13822
|
+
const finalisers = { amd, cjs, es, iife, system, umd };
|
|
13823
13823
|
|
|
13824
13824
|
class Source {
|
|
13825
13825
|
constructor(filename, content) {
|
|
@@ -21660,7 +21660,7 @@ class Queue {
|
|
|
21660
21660
|
}
|
|
21661
21661
|
}
|
|
21662
21662
|
|
|
21663
|
-
function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions) {
|
|
21663
|
+
function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions, isEntry) {
|
|
21664
21664
|
let skipped = null;
|
|
21665
21665
|
let replaceContext = null;
|
|
21666
21666
|
if (skip) {
|
|
@@ -21672,16 +21672,16 @@ function resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolve
|
|
|
21672
21672
|
}
|
|
21673
21673
|
replaceContext = (pluginContext, plugin) => ({
|
|
21674
21674
|
...pluginContext,
|
|
21675
|
-
resolve: (source, importer, { custom, skipSelf } = BLANK) => {
|
|
21676
|
-
return moduleLoaderResolveId(source, importer, custom, skipSelf ? [...skip, { importer, plugin, source }] : skip);
|
|
21675
|
+
resolve: (source, importer, { custom, isEntry, skipSelf } = BLANK) => {
|
|
21676
|
+
return moduleLoaderResolveId(source, importer, custom, isEntry, skipSelf ? [...skip, { importer, plugin, source }] : skip);
|
|
21677
21677
|
}
|
|
21678
21678
|
});
|
|
21679
21679
|
}
|
|
21680
|
-
return pluginDriver.hookFirst('resolveId', [source, importer, { custom: customOptions }], replaceContext, skipped);
|
|
21680
|
+
return pluginDriver.hookFirst('resolveId', [source, importer, { custom: customOptions, isEntry }], replaceContext, skipped);
|
|
21681
21681
|
}
|
|
21682
21682
|
|
|
21683
|
-
async function resolveId(source, importer, preserveSymlinks, pluginDriver, moduleLoaderResolveId, skip, customOptions) {
|
|
21684
|
-
const pluginResult = await resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions);
|
|
21683
|
+
async function resolveId(source, importer, preserveSymlinks, pluginDriver, moduleLoaderResolveId, skip, customOptions, isEntry) {
|
|
21684
|
+
const pluginResult = await resolveIdViaPlugins(source, importer, pluginDriver, moduleLoaderResolveId, skip, customOptions, isEntry);
|
|
21685
21685
|
if (pluginResult != null)
|
|
21686
21686
|
return pluginResult;
|
|
21687
21687
|
// external modules (non-entry modules that start with neither '.' or '/')
|
|
@@ -21980,10 +21980,10 @@ class ModuleLoader {
|
|
|
21980
21980
|
this.latestLoadModulesPromise = Promise.resolve();
|
|
21981
21981
|
this.nextEntryModuleIndex = 0;
|
|
21982
21982
|
this.readQueue = new Queue();
|
|
21983
|
-
this.resolveId = async (source, importer, customOptions, skip = null) => {
|
|
21983
|
+
this.resolveId = async (source, importer, customOptions, isEntry, skip = null) => {
|
|
21984
21984
|
return this.addDefaultsToResolvedId(this.getNormalizedResolvedIdWithoutDefaults(this.options.external(source, importer, false)
|
|
21985
21985
|
? false
|
|
21986
|
-
: await resolveId(source, importer, this.options.preserveSymlinks, this.pluginDriver, this.resolveId, skip, customOptions), importer, source));
|
|
21986
|
+
: await resolveId(source, importer, this.options.preserveSymlinks, this.pluginDriver, this.resolveId, skip, customOptions, typeof isEntry === 'boolean' ? isEntry : !importer), importer, source));
|
|
21987
21987
|
};
|
|
21988
21988
|
this.hasModuleSideEffects = options.treeshake
|
|
21989
21989
|
? options.treeshake.moduleSideEffects
|
|
@@ -22254,7 +22254,7 @@ class ModuleLoader {
|
|
|
22254
22254
|
source,
|
|
22255
22255
|
(module.resolvedIds[source] =
|
|
22256
22256
|
module.resolvedIds[source] ||
|
|
22257
|
-
this.handleResolveId(await this.resolveId(source, module.id, EMPTY_OBJECT), source, module.id))
|
|
22257
|
+
this.handleResolveId(await this.resolveId(source, module.id, EMPTY_OBJECT, false), source, module.id))
|
|
22258
22258
|
]);
|
|
22259
22259
|
}
|
|
22260
22260
|
handleResolveId(resolvedId, source, importer) {
|
|
@@ -22279,7 +22279,7 @@ class ModuleLoader {
|
|
|
22279
22279
|
return resolvedId;
|
|
22280
22280
|
}
|
|
22281
22281
|
async loadEntryModule(unresolvedId, isEntry, importer, implicitlyLoadedBefore) {
|
|
22282
|
-
const resolveIdResult = await resolveId(unresolvedId, importer, this.options.preserveSymlinks, this.pluginDriver, this.resolveId, null, EMPTY_OBJECT);
|
|
22282
|
+
const resolveIdResult = await resolveId(unresolvedId, importer, this.options.preserveSymlinks, this.pluginDriver, this.resolveId, null, EMPTY_OBJECT, true);
|
|
22283
22283
|
if (resolveIdResult == null) {
|
|
22284
22284
|
return error(implicitlyLoadedBefore === null
|
|
22285
22285
|
? errUnresolvedEntry(unresolvedId)
|
|
@@ -22316,7 +22316,7 @@ class ModuleLoader {
|
|
|
22316
22316
|
if (resolution == null) {
|
|
22317
22317
|
return (module.resolvedIds[specifier] =
|
|
22318
22318
|
module.resolvedIds[specifier] ||
|
|
22319
|
-
this.handleResolveId(await this.resolveId(specifier, module.id, EMPTY_OBJECT), specifier, module.id));
|
|
22319
|
+
this.handleResolveId(await this.resolveId(specifier, module.id, EMPTY_OBJECT, false), specifier, module.id));
|
|
22320
22320
|
}
|
|
22321
22321
|
return this.handleResolveId(this.addDefaultsToResolvedId(this.getNormalizedResolvedIdWithoutDefaults(resolution, importer, specifier)), specifier, importer);
|
|
22322
22322
|
}
|
|
@@ -22437,11 +22437,11 @@ function getPluginContext(plugin, pluginCache, graph, options, fileEmitter, exis
|
|
|
22437
22437
|
return wrappedModuleIds();
|
|
22438
22438
|
},
|
|
22439
22439
|
parse: graph.contextParse.bind(graph),
|
|
22440
|
-
resolve(source, importer, { custom, skipSelf } = BLANK) {
|
|
22441
|
-
return graph.moduleLoader.resolveId(source, importer, custom, skipSelf ? [{ importer, plugin, source }] : null);
|
|
22440
|
+
resolve(source, importer, { custom, isEntry, skipSelf } = BLANK) {
|
|
22441
|
+
return graph.moduleLoader.resolveId(source, importer, custom, isEntry, skipSelf ? [{ importer, plugin, source }] : null);
|
|
22442
22442
|
},
|
|
22443
22443
|
resolveId: getDeprecatedContextHandler((source, importer) => graph.moduleLoader
|
|
22444
|
-
.resolveId(source, importer, BLANK)
|
|
22444
|
+
.resolveId(source, importer, BLANK, undefined)
|
|
22445
22445
|
.then(resolveId => resolveId && resolveId.id), 'resolveId', 'resolve', plugin.name, true, options),
|
|
22446
22446
|
setAssetSource: fileEmitter.setAssetSource,
|
|
22447
22447
|
warn(warning) {
|
|
@@ -23509,7 +23509,7 @@ function watch(configs) {
|
|
|
23509
23509
|
return error(errInvalidOption('watch', 'watch', 'there must be at least one config where "watch" is not set to "false"'));
|
|
23510
23510
|
}
|
|
23511
23511
|
loadFsEvents()
|
|
23512
|
-
.then(() => Promise.resolve().then(
|
|
23512
|
+
.then(() => Promise.resolve().then(() => require('./watch.js')))
|
|
23513
23513
|
.then(({ Watcher }) => new Watcher(watchConfigs, emitter));
|
|
23514
23514
|
return emitter;
|
|
23515
23515
|
}
|
package/dist/shared/watch-cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.58.3
|
|
4
|
+
Mon, 25 Oct 2021 13:49:07 GMT - commit 0b8d4c668683c7702f20fcf480db077dbe2be774
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const index = require('./index.js');
|
|
15
|
+
const loadConfigFile_js = require('./loadConfigFile.js');
|
|
16
|
+
const cli = require('../bin/rollup');
|
|
17
|
+
const rollup = require('./rollup.js');
|
|
18
|
+
const require$$0 = require('assert');
|
|
19
|
+
const require$$0$1 = require('events');
|
|
20
20
|
require('path');
|
|
21
21
|
require('util');
|
|
22
22
|
require('stream');
|
|
@@ -132,7 +132,7 @@ if (process.platform === 'linux') {
|
|
|
132
132
|
var process$1 = rollup.commonjsGlobal.process;
|
|
133
133
|
// some kind of non-node environment, just no-op
|
|
134
134
|
if (typeof process$1 !== 'object' || !process$1) {
|
|
135
|
-
signalExit.exports = ()
|
|
135
|
+
signalExit.exports = function () {};
|
|
136
136
|
} else {
|
|
137
137
|
var assert = require$$0;
|
|
138
138
|
var signals = signals$1.exports;
|
|
@@ -304,7 +304,7 @@ if (typeof process$1 !== 'object' || !process$1) {
|
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
const onExit = signalExit.exports;
|
|
308
308
|
|
|
309
309
|
const CLEAR_SCREEN = '\u001Bc';
|
|
310
310
|
function getResetScreen(configs, allowClearScreen) {
|
package/dist/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.58.3
|
|
4
|
+
Mon, 25 Oct 2021 13:49:07 GMT - commit 0b8d4c668683c7702f20fcf480db077dbe2be774
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const path = require('path');
|
|
14
|
+
const rollup = require('./rollup.js');
|
|
15
|
+
const mergeOptions = require('./mergeOptions.js');
|
|
16
|
+
const require$$2 = require('os');
|
|
17
|
+
const index = require('./index.js');
|
|
18
18
|
require('crypto');
|
|
19
19
|
require('fs');
|
|
20
20
|
require('events');
|
|
@@ -22,17 +22,17 @@ require('util');
|
|
|
22
22
|
require('stream');
|
|
23
23
|
|
|
24
24
|
function _interopNamespaceDefault(e) {
|
|
25
|
-
|
|
25
|
+
const n = Object.create(null);
|
|
26
26
|
if (e) {
|
|
27
|
-
for (
|
|
27
|
+
for (const k in e) {
|
|
28
28
|
n[k] = e[k];
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
n
|
|
31
|
+
n.default = e;
|
|
32
32
|
return n;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
const path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
36
36
|
|
|
37
37
|
class FileWatcher {
|
|
38
38
|
constructor(task, chokidarOptions) {
|