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/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
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.5
4
- Wed, 01 Jun 2022 12:43:56 GMT - commit 14dedb52b4d799deebd8b711c1e14759fc0213d9
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
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.5
4
- Wed, 01 Jun 2022 12:43:56 GMT - commit 14dedb52b4d799deebd8b711c1e14759fc0213d9
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
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.75.5
4
- Wed, 01 Jun 2022 12:43:56 GMT - commit 14dedb52b4d799deebd8b711c1e14759fc0213d9
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 env = process.env || {};
33
- const argv = process.argv || [];
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 = process.platform === "win32";
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 && env.TERM !== "dumb";
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 && (isForced || isWindows || isCompatibleTerminal || isCI);
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]: none }),
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(/^([@./\\\w|^{}-]+)(=(.*))?$/);
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.75.5
4
- Wed, 01 Jun 2022 12:43:56 GMT - commit 14dedb52b4d799deebd8b711c1e14759fc0213d9
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'),