rollup 2.38.4 → 2.40.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 +54 -0
- package/LICENSE.md +1 -1
- package/dist/bin/rollup +18 -16
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +437 -373
- package/dist/es/shared/watch.js +480 -426
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.d.ts +2 -0
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +446 -397
- package/dist/shared/loadConfigFile.js +8 -8
- package/dist/shared/mergeOptions.js +4 -3
- package/dist/shared/rollup.js +497 -434
- package/dist/shared/watch-cli.js +34 -26
- package/dist/shared/watch.js +29 -25
- package/package.json +22 -18
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.40.0
|
|
4
|
+
Fri, 26 Feb 2021 14:39:44 GMT - commit 0a0958ff926554abe9916178f56762ba71301ddd
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
var fs = require('fs');
|
|
14
|
-
var
|
|
14
|
+
var path = require('path');
|
|
15
15
|
var url = require('url');
|
|
16
16
|
var rollup = require('./rollup.js');
|
|
17
17
|
var mergeOptions = require('./mergeOptions.js');
|
|
@@ -116,7 +116,7 @@ function batchWarnings() {
|
|
|
116
116
|
const id = (warning.loc && warning.loc.file) || warning.id;
|
|
117
117
|
if (id) {
|
|
118
118
|
const loc = warning.loc
|
|
119
|
-
? `${rollup.relativeId(id)}
|
|
119
|
+
? `${rollup.relativeId(id)} (${warning.loc.line}:${warning.loc.column})`
|
|
120
120
|
: rollup.relativeId(id);
|
|
121
121
|
stderr(bold(rollup.relativeId(loc)));
|
|
122
122
|
}
|
|
@@ -426,7 +426,7 @@ function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
426
426
|
if (!plugin) {
|
|
427
427
|
try {
|
|
428
428
|
if (pluginText[0] == '.')
|
|
429
|
-
pluginText =
|
|
429
|
+
pluginText = path.resolve(pluginText);
|
|
430
430
|
plugin = require(pluginText);
|
|
431
431
|
}
|
|
432
432
|
catch (ex) {
|
|
@@ -475,7 +475,7 @@ async function loadAndParseConfigFile(fileName, commandOptions = {}) {
|
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
async function loadConfigFile(fileName, commandOptions) {
|
|
478
|
-
const extension =
|
|
478
|
+
const extension = path.extname(fileName);
|
|
479
479
|
const configFileExport = extension === '.mjs' && supportsNativeESM()
|
|
480
480
|
? (await import(url.pathToFileURL(fileName).href)).default
|
|
481
481
|
: extension === '.cjs'
|
|
@@ -489,7 +489,7 @@ function getDefaultFromCjs(namespace) {
|
|
|
489
489
|
async function getDefaultFromTranspiledConfigFile(fileName, silent) {
|
|
490
490
|
const warnings = batchWarnings();
|
|
491
491
|
const bundle = await rollup.rollup({
|
|
492
|
-
external: (id) => (id[0] !== '.' && !
|
|
492
|
+
external: (id) => (id[0] !== '.' && !path.isAbsolute(id)) || id.slice(-5, id.length) === '.json',
|
|
493
493
|
input: fileName,
|
|
494
494
|
onwarn: warnings.add,
|
|
495
495
|
treeshake: false
|
|
@@ -506,7 +506,7 @@ async function getDefaultFromTranspiledConfigFile(fileName, silent) {
|
|
|
506
506
|
}
|
|
507
507
|
async function loadConfigFromBundledFile(fileName, bundledCode) {
|
|
508
508
|
const resolvedFileName = fs.realpathSync(fileName);
|
|
509
|
-
const extension =
|
|
509
|
+
const extension = path.extname(resolvedFileName);
|
|
510
510
|
const defaultLoader = require.extensions[extension];
|
|
511
511
|
require.extensions[extension] = (module, requiredFileName) => {
|
|
512
512
|
if (requiredFileName === resolvedFileName) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.40.0
|
|
4
|
+
Fri, 26 Feb 2021 14:39:44 GMT - commit 0a0958ff926554abe9916178f56762ba71301ddd
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -159,7 +159,8 @@ function mergeOutputOptions(config, overrides, warn) {
|
|
|
159
159
|
sourcemapFile: getOption('sourcemapFile'),
|
|
160
160
|
sourcemapPathTransform: getOption('sourcemapPathTransform'),
|
|
161
161
|
strict: getOption('strict'),
|
|
162
|
-
systemNullSetters: getOption('systemNullSetters')
|
|
162
|
+
systemNullSetters: getOption('systemNullSetters'),
|
|
163
|
+
validate: getOption('validate')
|
|
163
164
|
};
|
|
164
165
|
rollup.warnUnknownOptions(config, Object.keys(outputOptions), 'output options', warn);
|
|
165
166
|
return outputOptions;
|