rollup 4.14.2 → 4.15.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/bin/rollup +3 -3
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +9 -7
- package/dist/es/shared/parseAst.js +2 -2
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/native.js +1 -1
- package/dist/parseAst.js +2 -2
- package/dist/rollup.d.ts +3 -0
- 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 +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +9 -7
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +31 -29
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.15.0
|
|
5
|
+
Sat, 20 Apr 2024 05:36:39 GMT - commit e6e05cde31fc144228bb825c9d4ebba2f377075c
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@ require('node:perf_hooks');
|
|
|
28
28
|
require('node:url');
|
|
29
29
|
require('../getLogFilter.js');
|
|
30
30
|
|
|
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-externalImportAttributes Omit import attributes 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--forceExit Force exit the process when done\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--hashCharacters <name> Use the specified character set for file hashes\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-reexportProtoFromExternal Ignore `__proto__` in star re-exports\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--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\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-externalImportAttributes Omit import attributes 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--forceExit Force exit the process when done\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--hashCharacters <name> Use the specified character set for file hashes\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--importAttributesKey <name> Use the specified keyword for import attributes\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-reexportProtoFromExternal Ignore `__proto__` in star re-exports\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--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\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";
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @license
|
package/dist/es/getLogFilter.js
CHANGED
package/dist/es/parseAst.js
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.15.0
|
|
4
|
+
Sat, 20 Apr 2024 05:36:39 GMT - commit e6e05cde31fc144228bb825c9d4ebba2f377075c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { performance } from 'node:perf_hooks';
|
|
|
16
16
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version = "4.
|
|
19
|
+
var version = "4.15.0";
|
|
20
20
|
|
|
21
21
|
const comma = ','.charCodeAt(0);
|
|
22
22
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -14857,9 +14857,9 @@ function getImportBlock$1(dependencies, { _, cnst, n }, compact) {
|
|
|
14857
14857
|
return '';
|
|
14858
14858
|
}
|
|
14859
14859
|
|
|
14860
|
-
function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencies, exports, snippets }, { externalLiveBindings, freeze, generatedCode: { symbols } }) {
|
|
14860
|
+
function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencies, exports, snippets }, { externalLiveBindings, freeze, generatedCode: { symbols }, importAttributesKey }) {
|
|
14861
14861
|
const { n } = snippets;
|
|
14862
|
-
const importBlock = getImportBlock(dependencies, snippets);
|
|
14862
|
+
const importBlock = getImportBlock(dependencies, importAttributesKey, snippets);
|
|
14863
14863
|
if (importBlock.length > 0)
|
|
14864
14864
|
intro += importBlock.join(n) + n + n;
|
|
14865
14865
|
intro += getHelpersBlock(null, accessedGlobals, t, snippets, externalLiveBindings, freeze, symbols);
|
|
@@ -14872,10 +14872,10 @@ function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencie
|
|
|
14872
14872
|
magicString.append(outro);
|
|
14873
14873
|
magicString.trim();
|
|
14874
14874
|
}
|
|
14875
|
-
function getImportBlock(dependencies, { _ }) {
|
|
14875
|
+
function getImportBlock(dependencies, importAttributesKey, { _ }) {
|
|
14876
14876
|
const importBlock = [];
|
|
14877
14877
|
for (const { importPath, reexports, imports, name, attributes } of dependencies) {
|
|
14878
|
-
const assertion = attributes ? `${_}
|
|
14878
|
+
const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : '';
|
|
14879
14879
|
const pathWithAssertion = `'${importPath}'${assertion};`;
|
|
14880
14880
|
if (!reexports && !imports) {
|
|
14881
14881
|
importBlock.push(`import${_}${pathWithAssertion}`);
|
|
@@ -20181,6 +20181,7 @@ async function normalizeOutputOptions(config, inputOptions, unsetInputOptions) {
|
|
|
20181
20181
|
globals: config.globals || {},
|
|
20182
20182
|
hashCharacters: config.hashCharacters ?? 'base64',
|
|
20183
20183
|
hoistTransitiveImports: config.hoistTransitiveImports ?? true,
|
|
20184
|
+
importAttributesKey: config.importAttributesKey ?? 'assert',
|
|
20184
20185
|
indent: getIndent(config, compact),
|
|
20185
20186
|
inlineDynamicImports,
|
|
20186
20187
|
interop: getInterop(config),
|
|
@@ -20896,6 +20897,7 @@ async function mergeOutputOptions(config, overrides, log) {
|
|
|
20896
20897
|
globals: getOption('globals'),
|
|
20897
20898
|
hashCharacters: getOption('hashCharacters'),
|
|
20898
20899
|
hoistTransitiveImports: getOption('hoistTransitiveImports'),
|
|
20900
|
+
importAttributesKey: getOption('importAttributesKey'),
|
|
20899
20901
|
indent: getOption('indent'),
|
|
20900
20902
|
inlineDynamicImports: getOption('inlineDynamicImports'),
|
|
20901
20903
|
interop: getOption('interop'),
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/native.js
CHANGED
|
@@ -14,7 +14,7 @@ const bindingsByPlatformAndArch = {
|
|
|
14
14
|
x64: { base: 'darwin-x64' }
|
|
15
15
|
},
|
|
16
16
|
linux: {
|
|
17
|
-
arm: { base: 'linux-arm-gnueabihf', musl:
|
|
17
|
+
arm: { base: 'linux-arm-gnueabihf', musl: 'linux-arm-musleabihf' },
|
|
18
18
|
arm64: { base: 'linux-arm64-gnu', musl: 'linux-arm64-musl' },
|
|
19
19
|
ppc64: { base: 'linux-powerpc64le-gnu', musl: null },
|
|
20
20
|
riscv64: { base: 'linux-riscv64-gnu', musl: null },
|
package/dist/parseAst.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -623,6 +623,7 @@ export interface NormalizedInputOptions {
|
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
export type InternalModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd';
|
|
626
|
+
export type ImportAttributesKey = 'with' | 'assert';
|
|
626
627
|
|
|
627
628
|
export type ModuleFormat = InternalModuleFormat | 'commonjs' | 'esm' | 'module' | 'systemjs';
|
|
628
629
|
|
|
@@ -712,6 +713,7 @@ export interface OutputOptions {
|
|
|
712
713
|
globals?: GlobalsOption;
|
|
713
714
|
hashCharacters?: HashCharacters;
|
|
714
715
|
hoistTransitiveImports?: boolean;
|
|
716
|
+
importAttributesKey?: ImportAttributesKey;
|
|
715
717
|
indent?: string | boolean;
|
|
716
718
|
inlineDynamicImports?: boolean;
|
|
717
719
|
interop?: InteropType | GetInterop;
|
|
@@ -764,6 +766,7 @@ export interface NormalizedOutputOptions {
|
|
|
764
766
|
globals: GlobalsOption;
|
|
765
767
|
hashCharacters: HashCharacters;
|
|
766
768
|
hoistTransitiveImports: boolean;
|
|
769
|
+
importAttributesKey: ImportAttributesKey;
|
|
767
770
|
indent: true | string;
|
|
768
771
|
inlineDynamicImports: boolean;
|
|
769
772
|
interop: GetInterop;
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/parseAst.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.15.0
|
|
4
|
+
Sat, 20 Apr 2024 05:36:39 GMT - commit e6e05cde31fc144228bb825c9d4ebba2f377075c
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
|
|
32
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
33
33
|
|
|
34
|
-
var version = "4.
|
|
34
|
+
var version = "4.15.0";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -1262,6 +1262,7 @@ async function mergeOutputOptions(config, overrides, log) {
|
|
|
1262
1262
|
globals: getOption('globals'),
|
|
1263
1263
|
hashCharacters: getOption('hashCharacters'),
|
|
1264
1264
|
hoistTransitiveImports: getOption('hoistTransitiveImports'),
|
|
1265
|
+
importAttributesKey: getOption('importAttributesKey'),
|
|
1265
1266
|
indent: getOption('indent'),
|
|
1266
1267
|
inlineDynamicImports: getOption('inlineDynamicImports'),
|
|
1267
1268
|
interop: getOption('interop'),
|
|
@@ -16291,9 +16292,9 @@ function getImportBlock$1(dependencies, { _, cnst, n }, compact) {
|
|
|
16291
16292
|
return '';
|
|
16292
16293
|
}
|
|
16293
16294
|
|
|
16294
|
-
function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencies, exports, snippets }, { externalLiveBindings, freeze, generatedCode: { symbols } }) {
|
|
16295
|
+
function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencies, exports, snippets }, { externalLiveBindings, freeze, generatedCode: { symbols }, importAttributesKey }) {
|
|
16295
16296
|
const { n } = snippets;
|
|
16296
|
-
const importBlock = getImportBlock(dependencies, snippets);
|
|
16297
|
+
const importBlock = getImportBlock(dependencies, importAttributesKey, snippets);
|
|
16297
16298
|
if (importBlock.length > 0)
|
|
16298
16299
|
intro += importBlock.join(n) + n + n;
|
|
16299
16300
|
intro += getHelpersBlock(null, accessedGlobals, t, snippets, externalLiveBindings, freeze, symbols);
|
|
@@ -16306,10 +16307,10 @@ function es(magicString, { accessedGlobals, indent: t, intro, outro, dependencie
|
|
|
16306
16307
|
magicString.append(outro);
|
|
16307
16308
|
magicString.trim();
|
|
16308
16309
|
}
|
|
16309
|
-
function getImportBlock(dependencies, { _ }) {
|
|
16310
|
+
function getImportBlock(dependencies, importAttributesKey, { _ }) {
|
|
16310
16311
|
const importBlock = [];
|
|
16311
16312
|
for (const { importPath, reexports, imports, name, attributes } of dependencies) {
|
|
16312
|
-
const assertion = attributes ? `${_}
|
|
16313
|
+
const assertion = attributes ? `${_}${importAttributesKey}${_}${attributes}` : '';
|
|
16313
16314
|
const pathWithAssertion = `'${importPath}'${assertion};`;
|
|
16314
16315
|
if (!reexports && !imports) {
|
|
16315
16316
|
importBlock.push(`import${_}${pathWithAssertion}`);
|
|
@@ -20574,6 +20575,7 @@ async function normalizeOutputOptions(config, inputOptions, unsetInputOptions) {
|
|
|
20574
20575
|
globals: config.globals || {},
|
|
20575
20576
|
hashCharacters: config.hashCharacters ?? 'base64',
|
|
20576
20577
|
hoistTransitiveImports: config.hoistTransitiveImports ?? true,
|
|
20578
|
+
importAttributesKey: config.importAttributesKey ?? 'assert',
|
|
20577
20579
|
indent: getIndent(config, compact),
|
|
20578
20580
|
inlineDynamicImports,
|
|
20579
20581
|
interop: getInterop(config),
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"aarch64-unknown-linux-musl",
|
|
24
24
|
"armv7-linux-androideabi",
|
|
25
25
|
"armv7-unknown-linux-gnueabihf",
|
|
26
|
+
"armv7-unknown-linux-musleabihf",
|
|
26
27
|
"i686-pc-windows-msvc",
|
|
27
28
|
"riscv64gc-unknown-linux-gnu",
|
|
28
29
|
"powerpc64le-unknown-linux-gnu",
|
|
@@ -103,21 +104,22 @@
|
|
|
103
104
|
"homepage": "https://rollupjs.org/",
|
|
104
105
|
"optionalDependencies": {
|
|
105
106
|
"fsevents": "~2.3.2",
|
|
106
|
-
"@rollup/rollup-darwin-arm64": "4.
|
|
107
|
-
"@rollup/rollup-android-arm64": "4.
|
|
108
|
-
"@rollup/rollup-win32-arm64-msvc": "4.
|
|
109
|
-
"@rollup/rollup-linux-arm64-gnu": "4.
|
|
110
|
-
"@rollup/rollup-linux-arm64-musl": "4.
|
|
111
|
-
"@rollup/rollup-android-arm-eabi": "4.
|
|
112
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.
|
|
113
|
-
"@rollup/rollup-
|
|
114
|
-
"@rollup/rollup-
|
|
115
|
-
"@rollup/rollup-linux-
|
|
116
|
-
"@rollup/rollup-linux-
|
|
117
|
-
"@rollup/rollup-
|
|
118
|
-
"@rollup/rollup-
|
|
119
|
-
"@rollup/rollup-
|
|
120
|
-
"@rollup/rollup-linux-x64-
|
|
107
|
+
"@rollup/rollup-darwin-arm64": "4.15.0",
|
|
108
|
+
"@rollup/rollup-android-arm64": "4.15.0",
|
|
109
|
+
"@rollup/rollup-win32-arm64-msvc": "4.15.0",
|
|
110
|
+
"@rollup/rollup-linux-arm64-gnu": "4.15.0",
|
|
111
|
+
"@rollup/rollup-linux-arm64-musl": "4.15.0",
|
|
112
|
+
"@rollup/rollup-android-arm-eabi": "4.15.0",
|
|
113
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.15.0",
|
|
114
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.15.0",
|
|
115
|
+
"@rollup/rollup-win32-ia32-msvc": "4.15.0",
|
|
116
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.15.0",
|
|
117
|
+
"@rollup/rollup-linux-powerpc64le-gnu": "4.15.0",
|
|
118
|
+
"@rollup/rollup-linux-s390x-gnu": "4.15.0",
|
|
119
|
+
"@rollup/rollup-darwin-x64": "4.15.0",
|
|
120
|
+
"@rollup/rollup-win32-x64-msvc": "4.15.0",
|
|
121
|
+
"@rollup/rollup-linux-x64-gnu": "4.15.0",
|
|
122
|
+
"@rollup/rollup-linux-x64-musl": "4.15.0"
|
|
121
123
|
},
|
|
122
124
|
"dependencies": {
|
|
123
125
|
"@types/estree": "1.0.5"
|
|
@@ -132,10 +134,10 @@
|
|
|
132
134
|
"@codemirror/language": "^6.10.1",
|
|
133
135
|
"@codemirror/search": "^6.5.6",
|
|
134
136
|
"@codemirror/state": "^6.4.1",
|
|
135
|
-
"@codemirror/view": "^6.26.
|
|
137
|
+
"@codemirror/view": "^6.26.3",
|
|
136
138
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
137
139
|
"@mermaid-js/mermaid-cli": "^10.8.0",
|
|
138
|
-
"@napi-rs/cli": "^2.18.
|
|
140
|
+
"@napi-rs/cli": "^2.18.1",
|
|
139
141
|
"@rollup/plugin-alias": "^5.1.0",
|
|
140
142
|
"@rollup/plugin-buble": "^1.0.3",
|
|
141
143
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -145,14 +147,14 @@
|
|
|
145
147
|
"@rollup/plugin-terser": "^0.4.4",
|
|
146
148
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
147
149
|
"@rollup/pluginutils": "^5.1.0",
|
|
148
|
-
"@shikijs/vitepress-twoslash": "^1.
|
|
149
|
-
"@types/eslint": "^8.56.
|
|
150
|
+
"@shikijs/vitepress-twoslash": "^1.3.0",
|
|
151
|
+
"@types/eslint": "^8.56.9",
|
|
150
152
|
"@types/inquirer": "^9.0.7",
|
|
151
153
|
"@types/mocha": "^10.0.6",
|
|
152
154
|
"@types/node": "~18.18.14",
|
|
153
155
|
"@types/yargs-parser": "^21.0.3",
|
|
154
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
155
|
-
"@typescript-eslint/parser": "^7.
|
|
156
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
157
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
156
158
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
157
159
|
"@vue/eslint-config-typescript": "^13.0.0",
|
|
158
160
|
"acorn": "^8.11.3",
|
|
@@ -171,13 +173,13 @@
|
|
|
171
173
|
"eslint-plugin-import": "^2.29.1",
|
|
172
174
|
"eslint-plugin-prettier": "^5.1.3",
|
|
173
175
|
"eslint-plugin-unicorn": "^52.0.0",
|
|
174
|
-
"eslint-plugin-vue": "^9.
|
|
176
|
+
"eslint-plugin-vue": "^9.25.0",
|
|
175
177
|
"fixturify": "^3.0.0",
|
|
176
178
|
"flru": "^1.0.2",
|
|
177
179
|
"fs-extra": "^11.2.0",
|
|
178
180
|
"github-api": "^3.4.0",
|
|
179
181
|
"husky": "^9.0.11",
|
|
180
|
-
"inquirer": "^9.2.
|
|
182
|
+
"inquirer": "^9.2.18",
|
|
181
183
|
"is-reference": "^3.0.2",
|
|
182
184
|
"lint-staged": "^15.2.2",
|
|
183
185
|
"locate-character": "^3.0.0",
|
|
@@ -189,7 +191,7 @@
|
|
|
189
191
|
"pretty-bytes": "^6.1.1",
|
|
190
192
|
"pretty-ms": "^9.0.0",
|
|
191
193
|
"requirejs": "^2.3.6",
|
|
192
|
-
"rollup": "^4.14.
|
|
194
|
+
"rollup": "^4.14.3",
|
|
193
195
|
"rollup-plugin-license": "^3.3.1",
|
|
194
196
|
"rollup-plugin-string": "^3.0.0",
|
|
195
197
|
"semver": "^7.6.0",
|
|
@@ -200,10 +202,10 @@
|
|
|
200
202
|
"systemjs": "^6.14.3",
|
|
201
203
|
"terser": "^5.30.3",
|
|
202
204
|
"tslib": "^2.6.2",
|
|
203
|
-
"typescript": "^5.4.
|
|
204
|
-
"vite": "^5.2.
|
|
205
|
-
"vitepress": "^1.0
|
|
206
|
-
"vue": "^3.4.
|
|
205
|
+
"typescript": "^5.4.5",
|
|
206
|
+
"vite": "^5.2.9",
|
|
207
|
+
"vitepress": "^1.1.0",
|
|
208
|
+
"vue": "^3.4.22",
|
|
207
209
|
"wasm-pack": "^0.12.1",
|
|
208
210
|
"weak-napi": "^2.0.2",
|
|
209
211
|
"yargs-parser": "^21.1.1"
|