rollup 2.75.5 → 2.76.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/CHANGELOG.md +52 -0
- package/dist/bin/rollup +18 -18
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +650 -730
- package/dist/es/shared/watch.js +3 -2
- package/dist/loadConfigFile.js +6 -6
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.d.ts +2 -0
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +20 -12
- package/dist/shared/mergeOptions.js +3 -2
- package/dist/shared/rollup.js +650 -730
- package/dist/shared/watch-cli.js +17 -17
- package/dist/shared/watch.js +2 -2
- package/package.json +19 -19
package/dist/rollup.d.ts
CHANGED
|
@@ -692,6 +692,7 @@ export interface OutputOptions {
|
|
|
692
692
|
preserveModulesRoot?: string;
|
|
693
693
|
sanitizeFileName?: boolean | ((fileName: string) => string);
|
|
694
694
|
sourcemap?: boolean | 'inline' | 'hidden';
|
|
695
|
+
sourcemapBaseUrl?: string;
|
|
695
696
|
sourcemapExcludeSources?: boolean;
|
|
696
697
|
sourcemapFile?: string;
|
|
697
698
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
@@ -739,6 +740,7 @@ export interface NormalizedOutputOptions {
|
|
|
739
740
|
preserveModulesRoot: string | undefined;
|
|
740
741
|
sanitizeFileName: (fileName: string) => string;
|
|
741
742
|
sourcemap: boolean | 'inline' | 'hidden';
|
|
743
|
+
sourcemapBaseUrl: string | undefined;
|
|
742
744
|
sourcemapExcludeSources: boolean;
|
|
743
745
|
sourcemapFile: string | undefined;
|
|
744
746
|
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.76.0
|
|
4
|
+
Fri, 08 Jul 2022 08:35:58 GMT - commit 0eb042740eb41812b9e96e0e7b6ed8aa4cab04a7
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
const require$$0 = require('path');
|
|
13
13
|
const process$1 = require('process');
|
|
14
14
|
const url = require('url');
|
|
15
|
-
const rollup = require('./rollup.js');
|
|
16
15
|
const tty = require('tty');
|
|
16
|
+
const rollup = require('./rollup.js');
|
|
17
17
|
const mergeOptions = require('./mergeOptions.js');
|
|
18
18
|
|
|
19
19
|
function _interopNamespaceDefault(e) {
|
|
@@ -29,22 +29,27 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
|
|
30
30
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const {
|
|
33
|
+
env = {},
|
|
34
|
+
argv = [],
|
|
35
|
+
platform = "",
|
|
36
|
+
} = typeof process === "undefined" ? {} : process;
|
|
34
37
|
|
|
35
38
|
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
36
39
|
const isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
37
|
-
const isWindows =
|
|
40
|
+
const isWindows = platform === "win32";
|
|
41
|
+
const isDumbTerminal = env.TERM === "dumb";
|
|
38
42
|
|
|
39
43
|
const isCompatibleTerminal =
|
|
40
|
-
tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM &&
|
|
44
|
+
tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal;
|
|
41
45
|
|
|
42
46
|
const isCI =
|
|
43
47
|
"CI" in env &&
|
|
44
48
|
("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
45
49
|
|
|
46
50
|
const isColorSupported =
|
|
47
|
-
!isDisabled &&
|
|
51
|
+
!isDisabled &&
|
|
52
|
+
(isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI);
|
|
48
53
|
|
|
49
54
|
const replaceClose = (
|
|
50
55
|
index,
|
|
@@ -121,13 +126,11 @@ const colors = {
|
|
|
121
126
|
bgWhiteBright: init(107, 49),
|
|
122
127
|
};
|
|
123
128
|
|
|
124
|
-
const none = (any) => any;
|
|
125
|
-
|
|
126
129
|
const createColors = ({ useColor = isColorSupported } = {}) =>
|
|
127
130
|
useColor
|
|
128
131
|
? colors
|
|
129
132
|
: Object.keys(colors).reduce(
|
|
130
|
-
(colors, key) => ({ ...colors, [key]:
|
|
133
|
+
(colors, key) => ({ ...colors, [key]: String }),
|
|
131
134
|
{}
|
|
132
135
|
);
|
|
133
136
|
|
|
@@ -474,7 +477,7 @@ async function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
474
477
|
plugin = new Function('return ' + pluginText);
|
|
475
478
|
}
|
|
476
479
|
else {
|
|
477
|
-
const match = pluginText.match(/^([
|
|
480
|
+
const match = pluginText.match(/^([@.:/\\\w|^{}-]+)(=(.*))?$/);
|
|
478
481
|
if (match) {
|
|
479
482
|
// -p plugin
|
|
480
483
|
// -p plugin=arg
|
|
@@ -501,6 +504,11 @@ async function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
501
504
|
try {
|
|
502
505
|
if (pluginText[0] == '.')
|
|
503
506
|
pluginText = require$$0.resolve(pluginText);
|
|
507
|
+
// Windows absolute paths must be specified as file:// protocol URL
|
|
508
|
+
// Note that we do not have coverage for Windows-only code paths
|
|
509
|
+
else if (pluginText.match(/^[A-Za-z]:\\/)) {
|
|
510
|
+
pluginText = url.pathToFileURL(require$$0.resolve(pluginText)).href;
|
|
511
|
+
}
|
|
504
512
|
plugin = await requireOrImport(pluginText);
|
|
505
513
|
}
|
|
506
514
|
catch (err) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.76.0
|
|
4
|
+
Fri, 08 Jul 2022 08:35:58 GMT - commit 0eb042740eb41812b9e96e0e7b6ed8aa4cab04a7
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -161,6 +161,7 @@ function mergeOutputOptions(config, overrides, warn) {
|
|
|
161
161
|
preserveModulesRoot: getOption('preserveModulesRoot'),
|
|
162
162
|
sanitizeFileName: getOption('sanitizeFileName'),
|
|
163
163
|
sourcemap: getOption('sourcemap'),
|
|
164
|
+
sourcemapBaseUrl: getOption('sourcemapBaseUrl'),
|
|
164
165
|
sourcemapExcludeSources: getOption('sourcemapExcludeSources'),
|
|
165
166
|
sourcemapFile: getOption('sourcemapFile'),
|
|
166
167
|
sourcemapPathTransform: getOption('sourcemapPathTransform'),
|