rollup 2.65.0 → 2.67.1
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 +75 -0
- package/dist/bin/rollup +15 -15
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +8529 -8537
- package/dist/es/shared/watch.js +19 -19
- 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 +6 -4
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +17 -17
- package/dist/shared/loadConfigFile.js +12 -12
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +254 -262
- package/dist/shared/watch-cli.js +19 -17
- package/dist/shared/watch.js +3 -3
- package/package.json +11 -11
package/dist/rollup.d.ts
CHANGED
|
@@ -156,12 +156,14 @@ export type EmitChunk = (id: string, options?: { name?: string }) => string;
|
|
|
156
156
|
|
|
157
157
|
export type EmitFile = (emittedFile: EmittedFile) => string;
|
|
158
158
|
|
|
159
|
-
interface ModuleInfo {
|
|
159
|
+
interface ModuleInfo extends ModuleOptions {
|
|
160
160
|
ast: AcornNode | null;
|
|
161
161
|
code: string | null;
|
|
162
162
|
dynamicImporters: readonly string[];
|
|
163
163
|
dynamicallyImportedIdResolutions: readonly ResolvedId[];
|
|
164
164
|
dynamicallyImportedIds: readonly string[];
|
|
165
|
+
hasDefaultExport: boolean | null;
|
|
166
|
+
/** @deprecated Use `moduleSideEffects` instead */
|
|
165
167
|
hasModuleSideEffects: boolean | 'no-treeshake';
|
|
166
168
|
id: string;
|
|
167
169
|
implicitlyLoadedAfterOneOf: readonly string[];
|
|
@@ -172,8 +174,6 @@ interface ModuleInfo {
|
|
|
172
174
|
isEntry: boolean;
|
|
173
175
|
isExternal: boolean;
|
|
174
176
|
isIncluded: boolean | null;
|
|
175
|
-
meta: CustomPluginOptions;
|
|
176
|
-
syntheticNamedExports: boolean | string;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
|
|
@@ -201,7 +201,9 @@ export interface PluginContext extends MinimalPluginContext {
|
|
|
201
201
|
getWatchFiles: () => string[];
|
|
202
202
|
/** @deprecated Use `this.resolve` instead */
|
|
203
203
|
isExternal: IsExternal;
|
|
204
|
-
load: (
|
|
204
|
+
load: (
|
|
205
|
+
options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>>
|
|
206
|
+
) => Promise<ModuleInfo>;
|
|
205
207
|
/** @deprecated Use `this.getModuleIds` instead */
|
|
206
208
|
moduleIds: IterableIterator<string>;
|
|
207
209
|
parse: (input: string, options?: any) => AcornNode;
|
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.67.1
|
|
4
|
+
Mon, 07 Feb 2022 05:29:30 GMT - commit efd71e930e86ab30f4911ed8caa7f78aca005729
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const require$$0$
|
|
14
|
-
const
|
|
15
|
-
const require$$0$
|
|
13
|
+
const require$$0$3 = require('events');
|
|
14
|
+
const require$$0$1 = require('fs');
|
|
15
|
+
const require$$0$2 = require('path');
|
|
16
16
|
const require$$2 = require('util');
|
|
17
17
|
const require$$1 = require('stream');
|
|
18
18
|
const rollup = require('./rollup.js');
|
|
@@ -20,9 +20,9 @@ const require$$2$1 = require('os');
|
|
|
20
20
|
|
|
21
21
|
var chokidar$1 = {};
|
|
22
22
|
|
|
23
|
-
const fs$3 =
|
|
23
|
+
const fs$3 = require$$0$1;
|
|
24
24
|
const { Readable } = require$$1;
|
|
25
|
-
const sysPath$3 = require$$0$
|
|
25
|
+
const sysPath$3 = require$$0$2;
|
|
26
26
|
const { promisify: promisify$3 } = require$$2;
|
|
27
27
|
const picomatch$1 = rollup.picomatch;
|
|
28
28
|
|
|
@@ -620,7 +620,7 @@ var isGlob$2 = function isGlob(str, options) {
|
|
|
620
620
|
};
|
|
621
621
|
|
|
622
622
|
var isGlob$1 = isGlob$2;
|
|
623
|
-
var pathPosixDirname = require$$0$
|
|
623
|
+
var pathPosixDirname = require$$0$2.posix.dirname;
|
|
624
624
|
var isWin32 = require$$2$1.platform() === 'win32';
|
|
625
625
|
|
|
626
626
|
var slash = '/';
|
|
@@ -2343,7 +2343,7 @@ const require$$0 = [
|
|
|
2343
2343
|
|
|
2344
2344
|
var binaryExtensions$1 = require$$0;
|
|
2345
2345
|
|
|
2346
|
-
const path = require$$0$
|
|
2346
|
+
const path = require$$0$2;
|
|
2347
2347
|
const binaryExtensions = binaryExtensions$1;
|
|
2348
2348
|
|
|
2349
2349
|
const extensions = new Set(binaryExtensions);
|
|
@@ -2354,7 +2354,7 @@ var constants = {};
|
|
|
2354
2354
|
|
|
2355
2355
|
(function (exports) {
|
|
2356
2356
|
|
|
2357
|
-
const {sep} = require$$0$
|
|
2357
|
+
const {sep} = require$$0$2;
|
|
2358
2358
|
const {platform} = process;
|
|
2359
2359
|
const os = require$$2$1;
|
|
2360
2360
|
|
|
@@ -2419,8 +2419,8 @@ exports.isLinux = platform === 'linux';
|
|
|
2419
2419
|
exports.isIBMi = os.type() === 'OS400';
|
|
2420
2420
|
}(constants));
|
|
2421
2421
|
|
|
2422
|
-
const fs$2 =
|
|
2423
|
-
const sysPath$2 = require$$0$
|
|
2422
|
+
const fs$2 = require$$0$1;
|
|
2423
|
+
const sysPath$2 = require$$0$2;
|
|
2424
2424
|
const { promisify: promisify$2 } = require$$2;
|
|
2425
2425
|
const isBinaryPath = isBinaryPath$1;
|
|
2426
2426
|
const {
|
|
@@ -3066,8 +3066,8 @@ var fseventsHandler = {exports: {}};
|
|
|
3066
3066
|
|
|
3067
3067
|
const require$$3 = /*@__PURE__*/rollup.getAugmentedNamespace(rollup.fseventsImporter);
|
|
3068
3068
|
|
|
3069
|
-
const fs$1 =
|
|
3070
|
-
const sysPath$1 = require$$0$
|
|
3069
|
+
const fs$1 = require$$0$1;
|
|
3070
|
+
const sysPath$1 = require$$0$2;
|
|
3071
3071
|
const { promisify: promisify$1 } = require$$2;
|
|
3072
3072
|
|
|
3073
3073
|
let fsevents;
|
|
@@ -3589,9 +3589,9 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
|
|
|
3589
3589
|
fseventsHandler.exports = FsEventsHandler$1;
|
|
3590
3590
|
fseventsHandler.exports.canUse = canUse;
|
|
3591
3591
|
|
|
3592
|
-
const { EventEmitter } = require$$0$
|
|
3593
|
-
const fs =
|
|
3594
|
-
const sysPath = require$$0$
|
|
3592
|
+
const { EventEmitter } = require$$0$3;
|
|
3593
|
+
const fs = require$$0$1;
|
|
3594
|
+
const sysPath = require$$0$2;
|
|
3595
3595
|
const { promisify } = require$$2;
|
|
3596
3596
|
const readdirp = readdirp_1;
|
|
3597
3597
|
const anymatch = anymatch$2.exports.default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.67.1
|
|
4
|
+
Mon, 07 Feb 2022 05:29:30 GMT - commit efd71e930e86ab30f4911ed8caa7f78aca005729
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const require$$0$1 = require('fs');
|
|
14
14
|
const require$$0 = require('path');
|
|
15
|
-
const url = require('url');
|
|
16
15
|
const process$1 = require('process');
|
|
16
|
+
const url = require('url');
|
|
17
17
|
const tty = require('tty');
|
|
18
18
|
const rollup = require('./rollup.js');
|
|
19
19
|
const mergeOptions = require('./mergeOptions.js');
|
|
@@ -29,7 +29,6 @@ function _interopNamespaceDefault(e) {
|
|
|
29
29
|
return n;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
const require$$0__namespace = /*#__PURE__*/_interopNamespaceDefault(require$$0);
|
|
33
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
34
33
|
|
|
35
34
|
const env = process.env || {};
|
|
@@ -143,7 +142,7 @@ const { bold, cyan, dim, gray, green, red, underline, yellow } = createColors({
|
|
|
143
142
|
});
|
|
144
143
|
|
|
145
144
|
// log to stderr to keep `rollup main.js > bundle.js` from breaking
|
|
146
|
-
const stderr = (...args) => process.stderr.write(`${args.join('')}\n`);
|
|
145
|
+
const stderr = (...args) => process$1.stderr.write(`${args.join('')}\n`);
|
|
147
146
|
function handleError(err, recover = false) {
|
|
148
147
|
let description = err.message || err;
|
|
149
148
|
if (err.name)
|
|
@@ -167,7 +166,7 @@ function handleError(err, recover = false) {
|
|
|
167
166
|
}
|
|
168
167
|
stderr('');
|
|
169
168
|
if (!recover)
|
|
170
|
-
process.exit(1);
|
|
169
|
+
process$1.exit(1);
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
function batchWarnings() {
|
|
@@ -267,6 +266,7 @@ const deferredHandlers = {
|
|
|
267
266
|
title('Mixing named and default exports');
|
|
268
267
|
info(`https://rollupjs.org/guide/en/#outputexports`);
|
|
269
268
|
stderr(bold('The following entry modules are using named and default exports together:'));
|
|
269
|
+
warnings.sort((a, b) => (a.id < b.id ? -1 : 1));
|
|
270
270
|
const displayedWarnings = warnings.length > 5 ? warnings.slice(0, 3) : warnings;
|
|
271
271
|
for (const warning of displayedWarnings) {
|
|
272
272
|
stderr(rollup.relativeId(warning.id));
|
|
@@ -405,8 +405,8 @@ function stdinPlugin(arg) {
|
|
|
405
405
|
function readStdin() {
|
|
406
406
|
return new Promise((resolve, reject) => {
|
|
407
407
|
const chunks = [];
|
|
408
|
-
process.stdin.setEncoding('utf8');
|
|
409
|
-
process.stdin
|
|
408
|
+
process$1.stdin.setEncoding('utf8');
|
|
409
|
+
process$1.stdin
|
|
410
410
|
.on('data', chunk => chunks.push(chunk))
|
|
411
411
|
.on('end', () => {
|
|
412
412
|
const result = chunks.join('');
|
|
@@ -505,7 +505,7 @@ async function loadAndRegisterPlugin(inputOptions, pluginText) {
|
|
|
505
505
|
if (!plugin) {
|
|
506
506
|
try {
|
|
507
507
|
if (pluginText[0] == '.')
|
|
508
|
-
pluginText = require$$
|
|
508
|
+
pluginText = require$$0.resolve(pluginText);
|
|
509
509
|
plugin = await requireOrImport(pluginText);
|
|
510
510
|
}
|
|
511
511
|
catch (err) {
|
|
@@ -543,7 +543,7 @@ async function requireOrImport(pluginPath) {
|
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
function supportsNativeESM() {
|
|
546
|
-
return Number(/^v(\d+)/.exec(process.version)[1]) >= 13;
|
|
546
|
+
return Number(/^v(\d+)/.exec(process$1.version)[1]) >= 13;
|
|
547
547
|
}
|
|
548
548
|
async function loadAndParseConfigFile(fileName, commandOptions = {}) {
|
|
549
549
|
const configs = await loadConfigFile(fileName, commandOptions);
|
|
@@ -610,7 +610,7 @@ async function getDefaultFromTranspiledConfigFile(fileName, commandOptions) {
|
|
|
610
610
|
return loadConfigFromBundledFile(fileName, code);
|
|
611
611
|
}
|
|
612
612
|
async function loadConfigFromBundledFile(fileName, bundledCode) {
|
|
613
|
-
const resolvedFileName =
|
|
613
|
+
const resolvedFileName = await require$$0$1.promises.realpath(fileName);
|
|
614
614
|
const extension = require$$0.extname(resolvedFileName);
|
|
615
615
|
const defaultLoader = require.extensions[extension];
|
|
616
616
|
require.extensions[extension] = (module, requiredFileName) => {
|