rollup 4.0.0-9 → 4.0.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/LICENSE.md CHANGED
@@ -52,42 +52,6 @@ Repository: rollup/plugins
52
52
 
53
53
  ---------------------------------------
54
54
 
55
- ## acorn
56
- License: MIT
57
- By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
58
- Repository: https://github.com/acornjs/acorn.git
59
-
60
- > MIT License
61
- >
62
- > Copyright (C) 2012-2022 by various contributors (see AUTHORS)
63
- >
64
- > Permission is hereby granted, free of charge, to any person obtaining a copy
65
- > of this software and associated documentation files (the "Software"), to deal
66
- > in the Software without restriction, including without limitation the rights
67
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
68
- > copies of the Software, and to permit persons to whom the Software is
69
- > furnished to do so, subject to the following conditions:
70
- >
71
- > The above copyright notice and this permission notice shall be included in
72
- > all copies or substantial portions of the Software.
73
- >
74
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
75
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
76
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
77
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
78
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
79
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
80
- > THE SOFTWARE.
81
-
82
- ---------------------------------------
83
-
84
- ## acorn-import-assertions
85
- License: MIT
86
- By: Sven Sauleau
87
- Repository: https://github.com/xtuc/acorn-import-assertions
88
-
89
- ---------------------------------------
90
-
91
55
  ## anymatch
92
56
  License: ISC
93
57
  By: Elan Shanker
package/dist/bin/rollup CHANGED
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
-
3
2
  /*
4
3
  @license
5
- Rollup.js v4.0.0-9
6
- Sun, 20 Aug 2023 14:28:23 GMT - commit e4d55671a81334ddc59fdbcd81ceabdb77d96974
4
+ Rollup.js v4.0.0
5
+ Thu, 05 Oct 2023 15:13:44 GMT - commit 2f261358c62b4f9e62cb86bf99de8d4ff3668994
7
6
 
8
7
  https://github.com/rollup/rollup
9
8
 
@@ -18,18 +17,18 @@ const rollup = require('../shared/rollup.js');
18
17
  const require$$2 = require('util');
19
18
  const require$$0 = require('path');
20
19
  const require$$0$1 = require('fs');
20
+ const parseAst_js = require('../shared/parseAst.js');
21
21
  const fseventsImporter = require('../shared/fsevents-importer.js');
22
22
  const promises = require('node:fs/promises');
23
23
  const node_path = require('node:path');
24
24
  const loadConfigFile_js = require('../shared/loadConfigFile.js');
25
25
  require('tty');
26
26
  require('node:perf_hooks');
27
- require('node:crypto');
28
- require('../native.cjs');
27
+ require('../native.js');
29
28
  require('node:url');
30
29
  require('../getLogFilter.js');
31
30
 
32
- 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
+ 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--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--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";
33
32
 
34
33
  /**
35
34
  * @license
@@ -1525,7 +1524,7 @@ async function build(inputOptions, warnings, silent = false) {
1525
1524
  const outputOptions = inputOptions.output;
1526
1525
  const useStdout = !outputOptions[0].file && !outputOptions[0].dir;
1527
1526
  const start = Date.now();
1528
- const files = useStdout ? ['stdout'] : outputOptions.map(t => rollup.relativeId(t.file || t.dir));
1527
+ const files = useStdout ? ['stdout'] : outputOptions.map(t => parseAst_js.relativeId(t.file || t.dir));
1529
1528
  if (!silent) {
1530
1529
  let inputFiles;
1531
1530
  if (typeof inputOptions.input === 'string') {
@@ -1543,7 +1542,7 @@ async function build(inputOptions, warnings, silent = false) {
1543
1542
  if (useStdout) {
1544
1543
  const output = outputOptions[0];
1545
1544
  if (output.sourcemap && output.sourcemap !== 'inline') {
1546
- rollup.handleError(rollup.logOnlyInlineSourcemapsForStdout());
1545
+ rollup.handleError(parseAst_js.logOnlyInlineSourcemapsForStdout());
1547
1546
  }
1548
1547
  const { output: outputs } = await bundle.generate(output);
1549
1548
  for (const file of outputs) {
@@ -1585,7 +1584,7 @@ async function getConfigPath(commandConfig) {
1585
1584
  }
1586
1585
  catch (error) {
1587
1586
  if (error.code === 'MODULE_NOT_FOUND') {
1588
- rollup.handleError(rollup.logMissingExternalConfig(commandConfig));
1587
+ rollup.handleError(parseAst_js.logMissingExternalConfig(commandConfig));
1589
1588
  }
1590
1589
  throw error;
1591
1590
  }
@@ -1617,7 +1616,7 @@ async function runRollup(command) {
1617
1616
  let inputSource;
1618
1617
  if (command._.length > 0) {
1619
1618
  if (command.input) {
1620
- rollup.handleError(rollup.logDuplicateImportOptions());
1619
+ rollup.handleError(parseAst_js.logDuplicateImportOptions());
1621
1620
  }
1622
1621
  inputSource = command._;
1623
1622
  }
@@ -1633,7 +1632,7 @@ async function runRollup(command) {
1633
1632
  for (const input of inputSource) {
1634
1633
  const equalsIndex = input.indexOf('=');
1635
1634
  const value = input.slice(Math.max(0, equalsIndex + 1));
1636
- const key = input.slice(0, Math.max(0, equalsIndex)) || rollup.getAliasName(input);
1635
+ const key = input.slice(0, Math.max(0, equalsIndex)) || parseAst_js.getAliasName(input);
1637
1636
  command.input[key] = value;
1638
1637
  }
1639
1638
  }
@@ -1666,7 +1665,7 @@ async function runRollup(command) {
1666
1665
  }
1667
1666
  if (command.failAfterWarnings && warnings.warningOccurred) {
1668
1667
  warnings.flush();
1669
- rollup.handleError(rollup.logFailAfterWarnings());
1668
+ rollup.handleError(parseAst_js.logFailAfterWarnings());
1670
1669
  }
1671
1670
  }
1672
1671
  catch (error) {
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-9
4
- Sun, 20 Aug 2023 14:28:23 GMT - commit e4d55671a81334ddc59fdbcd81ceabdb77d96974
3
+ Rollup.js v4.0.0
4
+ Thu, 05 Oct 2023 15:13:44 GMT - commit 2f261358c62b4f9e62cb86bf99de8d4ff3668994
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -0,0 +1,12 @@
1
+ /*
2
+ @license
3
+ Rollup.js v4.0.0
4
+ Thu, 05 Oct 2023 15:13:44 GMT - commit 2f261358c62b4f9e62cb86bf99de8d4ff3668994
5
+
6
+ https://github.com/rollup/rollup
7
+
8
+ Released under the MIT License.
9
+ */
10
+ import '../native.js';
11
+ export { parseAst } from './shared/parseAst.js';
12
+ import 'node:path';
package/dist/es/rollup.js CHANGED
@@ -1,18 +1,18 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-9
4
- Sun, 20 Aug 2023 14:28:23 GMT - commit e4d55671a81334ddc59fdbcd81ceabdb77d96974
3
+ Rollup.js v4.0.0
4
+ Thu, 05 Oct 2023 15:13:44 GMT - commit 2f261358c62b4f9e62cb86bf99de8d4ff3668994
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
8
8
  Released under the MIT License.
9
9
  */
10
10
  export { version as VERSION, defineConfig, rollup, watch } from './shared/node-entry.js';
11
+ import './shared/parseAst.js';
12
+ import '../native.js';
11
13
  import 'node:path';
12
14
  import 'path';
13
15
  import 'node:process';
14
16
  import 'node:perf_hooks';
15
- import 'node:crypto';
16
- import '../native.cjs';
17
17
  import 'node:fs/promises';
18
18
  import 'tty';