rollup 3.25.3 → 3.26.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/dist/bin/rollup +10 -9
- package/dist/es/getLogFilter.js +64 -0
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +5 -4
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.d.ts +5 -0
- package/dist/getLogFilter.js +69 -0
- package/dist/loadConfigFile.js +3 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +24 -11
- package/dist/shared/rollup.js +5 -4
- package/dist/shared/watch-cli.js +3 -2
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +15 -10
package/dist/bin/rollup
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
@license
|
|
5
|
-
Rollup.js v3.
|
|
6
|
-
|
|
5
|
+
Rollup.js v3.26.1
|
|
6
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
7
7
|
|
|
8
8
|
https://github.com/rollup/rollup
|
|
9
9
|
|
|
@@ -26,8 +26,9 @@ require('tty');
|
|
|
26
26
|
require('node:perf_hooks');
|
|
27
27
|
require('node:crypto');
|
|
28
28
|
require('node:url');
|
|
29
|
+
require('../getLogFilter.js');
|
|
29
30
|
|
|
30
|
-
const help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAssertions Omit import assertions in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
|
|
31
|
+
const help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAssertions Omit import assertions in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--filterLogs <filter> Filter log messages\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* @license
|
|
@@ -1601,13 +1602,13 @@ async function findConfigFileNameInCwd() {
|
|
|
1601
1602
|
return `${DEFAULT_CONFIG_BASE}.js`;
|
|
1602
1603
|
}
|
|
1603
1604
|
|
|
1604
|
-
async function loadConfigFromCommand(
|
|
1605
|
-
const warnings = loadConfigFile_js.batchWarnings(
|
|
1606
|
-
if (!
|
|
1607
|
-
|
|
1605
|
+
async function loadConfigFromCommand(commandOptions, watchMode) {
|
|
1606
|
+
const warnings = loadConfigFile_js.batchWarnings(commandOptions);
|
|
1607
|
+
if (!commandOptions.input && (commandOptions.stdin || !process$1.stdin.isTTY)) {
|
|
1608
|
+
commandOptions.input = loadConfigFile_js.stdinName;
|
|
1608
1609
|
}
|
|
1609
|
-
const options = await rollup.mergeOptions({ input: [] }, watchMode,
|
|
1610
|
-
await loadConfigFile_js.addCommandPluginsToInputOptions(options,
|
|
1610
|
+
const options = await rollup.mergeOptions({ input: [] }, watchMode, commandOptions, warnings.log);
|
|
1611
|
+
await loadConfigFile_js.addCommandPluginsToInputOptions(options, commandOptions);
|
|
1611
1612
|
return { options: [options], warnings };
|
|
1612
1613
|
}
|
|
1613
1614
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@license
|
|
3
|
+
Rollup.js v3.26.1
|
|
4
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
5
|
+
|
|
6
|
+
https://github.com/rollup/rollup
|
|
7
|
+
|
|
8
|
+
Released under the MIT License.
|
|
9
|
+
*/
|
|
10
|
+
const getLogFilter = filters => {
|
|
11
|
+
if (filters.length === 0)
|
|
12
|
+
return () => true;
|
|
13
|
+
const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
|
|
14
|
+
const inverted = subFilter.startsWith('!');
|
|
15
|
+
if (inverted)
|
|
16
|
+
subFilter = subFilter.slice(1);
|
|
17
|
+
const [key, ...value] = subFilter.split(':');
|
|
18
|
+
return { inverted, key: key.split('.'), parts: value.join(':').split('*') };
|
|
19
|
+
}));
|
|
20
|
+
return (log) => {
|
|
21
|
+
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
|
|
22
|
+
for (const { inverted, key, parts } of intersectedFilters) {
|
|
23
|
+
const isFilterSatisfied = testFilter(log, key, parts);
|
|
24
|
+
if (inverted ? isFilterSatisfied : !isFilterSatisfied) {
|
|
25
|
+
continue nextIntersectedFilter;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
const testFilter = (log, key, parts) => {
|
|
34
|
+
let rawValue = log;
|
|
35
|
+
for (let index = 0; index < key.length; index++) {
|
|
36
|
+
if (!rawValue) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const part = key[index];
|
|
40
|
+
if (!(part in rawValue)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
rawValue = rawValue[part];
|
|
44
|
+
}
|
|
45
|
+
let value = typeof rawValue === 'object' ? JSON.stringify(rawValue) : String(rawValue);
|
|
46
|
+
if (parts.length === 1) {
|
|
47
|
+
return value === parts[0];
|
|
48
|
+
}
|
|
49
|
+
if (!value.startsWith(parts[0])) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const lastPartIndex = parts.length - 1;
|
|
53
|
+
for (let index = 1; index < lastPartIndex; index++) {
|
|
54
|
+
const part = parts[index];
|
|
55
|
+
const position = value.indexOf(part);
|
|
56
|
+
if (position === -1) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
value = value.slice(position + part.length);
|
|
60
|
+
}
|
|
61
|
+
return value.endsWith(parts[lastPartIndex]);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { getLogFilter };
|
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.26.1
|
|
4
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ import { createHash as createHash$1 } from 'node:crypto';
|
|
|
15
15
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
16
16
|
import * as tty from 'tty';
|
|
17
17
|
|
|
18
|
-
var version$1 = "3.
|
|
18
|
+
var version$1 = "3.26.1";
|
|
19
19
|
|
|
20
20
|
const comma = ','.charCodeAt(0);
|
|
21
21
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -14377,7 +14377,7 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
14377
14377
|
if (specifier.reexported === '*') {
|
|
14378
14378
|
if (exportBlock)
|
|
14379
14379
|
exportBlock += n;
|
|
14380
|
-
const copyPropertyIfNecessary = `{${n}${t}if${_}(k${_}!==${_}'default'${_}&&${_}!
|
|
14380
|
+
const copyPropertyIfNecessary = `{${n}${t}if${_}(k${_}!==${_}'default'${_}&&${_}!Object.prototype.hasOwnProperty.call(exports,${_}k))${_}${getDefineProperty(name, specifier.needsLiveBinding, t, snippets)}${s}${n}}`;
|
|
14381
14381
|
exportBlock += `Object.keys(${name}).forEach(${getFunctionIntro(['k'], {
|
|
14382
14382
|
isAsync: false,
|
|
14383
14383
|
name: null
|
|
@@ -26792,6 +26792,7 @@ async function mergeOptions(config, watchMode, rawCommandOptions = EMPTY_COMMAND
|
|
|
26792
26792
|
'bundleConfigAsCjs',
|
|
26793
26793
|
'config',
|
|
26794
26794
|
'environment',
|
|
26795
|
+
'filterLogs',
|
|
26795
26796
|
'plugin',
|
|
26796
26797
|
'silent',
|
|
26797
26798
|
'failAfterWarnings',
|
package/dist/es/shared/watch.js
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@license
|
|
3
|
+
Rollup.js v3.26.1
|
|
4
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
5
|
+
|
|
6
|
+
https://github.com/rollup/rollup
|
|
7
|
+
|
|
8
|
+
Released under the MIT License.
|
|
9
|
+
*/
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
13
|
+
|
|
14
|
+
const getLogFilter = filters => {
|
|
15
|
+
if (filters.length === 0)
|
|
16
|
+
return () => true;
|
|
17
|
+
const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
|
|
18
|
+
const inverted = subFilter.startsWith('!');
|
|
19
|
+
if (inverted)
|
|
20
|
+
subFilter = subFilter.slice(1);
|
|
21
|
+
const [key, ...value] = subFilter.split(':');
|
|
22
|
+
return { inverted, key: key.split('.'), parts: value.join(':').split('*') };
|
|
23
|
+
}));
|
|
24
|
+
return (log) => {
|
|
25
|
+
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
|
|
26
|
+
for (const { inverted, key, parts } of intersectedFilters) {
|
|
27
|
+
const isFilterSatisfied = testFilter(log, key, parts);
|
|
28
|
+
if (inverted ? isFilterSatisfied : !isFilterSatisfied) {
|
|
29
|
+
continue nextIntersectedFilter;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const testFilter = (log, key, parts) => {
|
|
38
|
+
let rawValue = log;
|
|
39
|
+
for (let index = 0; index < key.length; index++) {
|
|
40
|
+
if (!rawValue) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
const part = key[index];
|
|
44
|
+
if (!(part in rawValue)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
rawValue = rawValue[part];
|
|
48
|
+
}
|
|
49
|
+
let value = typeof rawValue === 'object' ? JSON.stringify(rawValue) : String(rawValue);
|
|
50
|
+
if (parts.length === 1) {
|
|
51
|
+
return value === parts[0];
|
|
52
|
+
}
|
|
53
|
+
if (!value.startsWith(parts[0])) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
const lastPartIndex = parts.length - 1;
|
|
57
|
+
for (let index = 1; index < lastPartIndex; index++) {
|
|
58
|
+
const part = parts[index];
|
|
59
|
+
const position = value.indexOf(part);
|
|
60
|
+
if (position === -1) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
value = value.slice(position + part.length);
|
|
64
|
+
}
|
|
65
|
+
return value.endsWith(parts[lastPartIndex]);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.getLogFilter = getLogFilter;
|
|
69
|
+
//# sourceMappingURL=getLogFilter.js.map
|
package/dist/loadConfigFile.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.26.1
|
|
4
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -21,6 +21,7 @@ require('tty');
|
|
|
21
21
|
require('path');
|
|
22
22
|
require('node:perf_hooks');
|
|
23
23
|
require('node:crypto');
|
|
24
|
+
require('./getLogFilter.js');
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.26.1
|
|
4
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -11,11 +11,14 @@
|
|
|
11
11
|
|
|
12
12
|
const promises = require('node:fs/promises');
|
|
13
13
|
const node_path = require('node:path');
|
|
14
|
-
const process = require('node:process');
|
|
14
|
+
const process$1 = require('node:process');
|
|
15
15
|
const node_url = require('node:url');
|
|
16
16
|
const rollup = require('./rollup.js');
|
|
17
|
+
const getLogFilter_js = require('../getLogFilter.js');
|
|
17
18
|
|
|
18
|
-
function batchWarnings(
|
|
19
|
+
function batchWarnings(command) {
|
|
20
|
+
const silent = !!command.silent;
|
|
21
|
+
const logFilter = generateLogFilter(command);
|
|
19
22
|
let count = 0;
|
|
20
23
|
const deferredWarnings = new Map();
|
|
21
24
|
let warningOccurred = false;
|
|
@@ -51,6 +54,8 @@ function batchWarnings(silent) {
|
|
|
51
54
|
count = 0;
|
|
52
55
|
},
|
|
53
56
|
log(level, log) {
|
|
57
|
+
if (!logFilter(log))
|
|
58
|
+
return;
|
|
54
59
|
switch (level) {
|
|
55
60
|
case rollup.LOGLEVEL_WARN: {
|
|
56
61
|
return add(log);
|
|
@@ -248,6 +253,13 @@ function showTruncatedWarnings(warnings) {
|
|
|
248
253
|
rollup.stderr(`\n...and ${nestedByModule.length - displayedByModule.length} other files`);
|
|
249
254
|
}
|
|
250
255
|
}
|
|
256
|
+
function generateLogFilter(command) {
|
|
257
|
+
const filters = rollup.ensureArray(command.filterLogs).flatMap(filter => String(filter).split(','));
|
|
258
|
+
if (process.env.ROLLUP_FILTER_LOGS) {
|
|
259
|
+
filters.push(...process.env.ROLLUP_FILTER_LOGS.split(','));
|
|
260
|
+
}
|
|
261
|
+
return getLogFilter_js.getLogFilter(filters);
|
|
262
|
+
}
|
|
251
263
|
|
|
252
264
|
const stdinName = '-';
|
|
253
265
|
let stdinResult = null;
|
|
@@ -270,8 +282,8 @@ function stdinPlugin(argument) {
|
|
|
270
282
|
function readStdin() {
|
|
271
283
|
return new Promise((resolve, reject) => {
|
|
272
284
|
const chunks = [];
|
|
273
|
-
process.stdin.setEncoding('utf8');
|
|
274
|
-
process.stdin
|
|
285
|
+
process$1.stdin.setEncoding('utf8');
|
|
286
|
+
process$1.stdin
|
|
275
287
|
.on('data', chunk => chunks.push(chunk))
|
|
276
288
|
.on('end', () => {
|
|
277
289
|
const result = chunks.join('');
|
|
@@ -414,7 +426,7 @@ async function requireOrImport(pluginPath) {
|
|
|
414
426
|
|
|
415
427
|
const loadConfigFile = async (fileName, commandOptions = {}, watchMode = false) => {
|
|
416
428
|
const configs = await getConfigList(getDefaultFromCjs(await getConfigFileExport(fileName, commandOptions, watchMode)), commandOptions);
|
|
417
|
-
const warnings = batchWarnings(commandOptions
|
|
429
|
+
const warnings = batchWarnings(commandOptions);
|
|
418
430
|
try {
|
|
419
431
|
const normalizedConfigs = [];
|
|
420
432
|
for (const config of configs) {
|
|
@@ -447,7 +459,7 @@ async function getConfigFileExport(fileName, commandOptions, watchMode) {
|
|
|
447
459
|
cannotLoadEsm = true;
|
|
448
460
|
}
|
|
449
461
|
};
|
|
450
|
-
process.on('warning', handleWarning);
|
|
462
|
+
process$1.on('warning', handleWarning);
|
|
451
463
|
try {
|
|
452
464
|
const fileUrl = node_url.pathToFileURL(fileName);
|
|
453
465
|
if (watchMode) {
|
|
@@ -466,14 +478,15 @@ async function getConfigFileExport(fileName, commandOptions, watchMode) {
|
|
|
466
478
|
throw error_;
|
|
467
479
|
}
|
|
468
480
|
finally {
|
|
469
|
-
process.off('warning', handleWarning);
|
|
481
|
+
process$1.off('warning', handleWarning);
|
|
470
482
|
}
|
|
471
483
|
}
|
|
472
484
|
function getDefaultFromCjs(namespace) {
|
|
473
485
|
return namespace.default || namespace;
|
|
474
486
|
}
|
|
475
|
-
async function loadTranspiledConfigFile(fileName,
|
|
476
|
-
const
|
|
487
|
+
async function loadTranspiledConfigFile(fileName, commandOptions) {
|
|
488
|
+
const { bundleConfigAsCjs, configPlugin, silent } = commandOptions;
|
|
489
|
+
const warnings = batchWarnings(commandOptions);
|
|
477
490
|
const inputOptions = {
|
|
478
491
|
external: (id) => (id[0] !== '.' && !node_path.isAbsolute(id)) || id.slice(-5, id.length) === '.json',
|
|
479
492
|
input: fileName,
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.26.1
|
|
4
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -30,7 +30,7 @@ function _interopNamespaceDefault(e) {
|
|
|
30
30
|
|
|
31
31
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
32
32
|
|
|
33
|
-
var version$1 = "3.
|
|
33
|
+
var version$1 = "3.26.1";
|
|
34
34
|
|
|
35
35
|
function ensureArray$1(items) {
|
|
36
36
|
if (Array.isArray(items)) {
|
|
@@ -2054,6 +2054,7 @@ async function mergeOptions(config, watchMode, rawCommandOptions = EMPTY_COMMAND
|
|
|
2054
2054
|
'bundleConfigAsCjs',
|
|
2055
2055
|
'config',
|
|
2056
2056
|
'environment',
|
|
2057
|
+
'filterLogs',
|
|
2057
2058
|
'plugin',
|
|
2058
2059
|
'silent',
|
|
2059
2060
|
'failAfterWarnings',
|
|
@@ -15865,7 +15866,7 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip
|
|
|
15865
15866
|
if (specifier.reexported === '*') {
|
|
15866
15867
|
if (exportBlock)
|
|
15867
15868
|
exportBlock += n;
|
|
15868
|
-
const copyPropertyIfNecessary = `{${n}${t}if${_}(k${_}!==${_}'default'${_}&&${_}!
|
|
15869
|
+
const copyPropertyIfNecessary = `{${n}${t}if${_}(k${_}!==${_}'default'${_}&&${_}!Object.prototype.hasOwnProperty.call(exports,${_}k))${_}${getDefineProperty(name, specifier.needsLiveBinding, t, snippets)}${s}${n}}`;
|
|
15869
15870
|
exportBlock += `Object.keys(${name}).forEach(${getFunctionIntro(['k'], {
|
|
15870
15871
|
isAsync: false,
|
|
15871
15872
|
name: null
|
package/dist/shared/watch-cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.26.1
|
|
4
|
+
Wed, 05 Jul 2023 06:44:01 GMT - commit 9623063db8d279a12525fc6c6c5145b9398af709
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,6 +31,7 @@ require('tty');
|
|
|
31
31
|
require('node:perf_hooks');
|
|
32
32
|
require('node:crypto');
|
|
33
33
|
require('node:url');
|
|
34
|
+
require('../getLogFilter.js');
|
|
34
35
|
|
|
35
36
|
function timeZone(date = new Date()) {
|
|
36
37
|
const offset = date.getTimezoneOffset();
|
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@codemirror/language": "^6.8.0",
|
|
69
69
|
"@codemirror/search": "^6.5.0",
|
|
70
70
|
"@codemirror/state": "^6.2.1",
|
|
71
|
-
"@codemirror/view": "^6.
|
|
71
|
+
"@codemirror/view": "^6.14.0",
|
|
72
72
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
73
73
|
"@mermaid-js/mermaid-cli": "^10.2.2",
|
|
74
74
|
"@rollup/plugin-alias": "^5.0.0",
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
"@rollup/pluginutils": "^5.0.2",
|
|
83
83
|
"@types/estree": "1.0.1",
|
|
84
84
|
"@types/mocha": "^10.0.1",
|
|
85
|
-
"@types/node": "~14.18.
|
|
85
|
+
"@types/node": "~14.18.52",
|
|
86
86
|
"@types/yargs-parser": "^21.0.0",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^5.60.
|
|
88
|
-
"@typescript-eslint/parser": "^5.60.
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
|
88
|
+
"@typescript-eslint/parser": "^5.60.1",
|
|
89
89
|
"@vue/eslint-config-prettier": "^7.1.0",
|
|
90
90
|
"@vue/eslint-config-typescript": "^11.0.3",
|
|
91
91
|
"acorn": "^8.9.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"eslint-plugin-import": "^2.27.5",
|
|
107
107
|
"eslint-plugin-prettier": "^4.2.1",
|
|
108
108
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
109
|
-
"eslint-plugin-vue": "^9.15.
|
|
109
|
+
"eslint-plugin-vue": "^9.15.1",
|
|
110
110
|
"fixturify": "^3.0.0",
|
|
111
111
|
"flru": "^1.0.2",
|
|
112
112
|
"fs-extra": "^11.1.1",
|
|
@@ -125,18 +125,18 @@
|
|
|
125
125
|
"pretty-bytes": "^6.1.0",
|
|
126
126
|
"pretty-ms": "^8.0.0",
|
|
127
127
|
"requirejs": "^2.3.6",
|
|
128
|
-
"rollup": "^3.25.
|
|
128
|
+
"rollup": "^3.25.3",
|
|
129
129
|
"rollup-plugin-license": "^3.0.1",
|
|
130
130
|
"rollup-plugin-string": "^3.0.0",
|
|
131
131
|
"rollup-plugin-thatworks": "^1.0.4",
|
|
132
|
-
"semver": "^7.5.
|
|
132
|
+
"semver": "^7.5.3",
|
|
133
133
|
"shx": "^0.3.4",
|
|
134
134
|
"signal-exit": "^4.0.2",
|
|
135
135
|
"source-map": "^0.7.4",
|
|
136
136
|
"source-map-support": "^0.5.21",
|
|
137
137
|
"systemjs": "^6.14.1",
|
|
138
138
|
"terser": "^5.18.1",
|
|
139
|
-
"tslib": "^2.
|
|
139
|
+
"tslib": "^2.6.0",
|
|
140
140
|
"typescript": "^5.1.3",
|
|
141
141
|
"vitepress": "^1.0.0-beta.3",
|
|
142
142
|
"vue": "^3.3.4",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"yargs-parser": "^21.1.1"
|
|
145
145
|
},
|
|
146
146
|
"overrides": {
|
|
147
|
-
"semver": "^7.5.
|
|
147
|
+
"semver": "^7.5.3"
|
|
148
148
|
},
|
|
149
149
|
"files": [
|
|
150
150
|
"dist/**/*.js",
|
|
@@ -167,6 +167,11 @@
|
|
|
167
167
|
"require": "./dist/loadConfigFile.js",
|
|
168
168
|
"default": "./dist/loadConfigFile.js"
|
|
169
169
|
},
|
|
170
|
+
"./getLogFilter": {
|
|
171
|
+
"types": "./dist/getLogFilter.d.ts",
|
|
172
|
+
"require": "./dist/getLogFilter.js",
|
|
173
|
+
"import": "./dist/es/getLogFilter.js"
|
|
174
|
+
},
|
|
170
175
|
"./dist/*": "./dist/*"
|
|
171
176
|
}
|
|
172
177
|
}
|