rollup 3.0.0-2 → 3.0.0-5

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
@@ -240,35 +240,6 @@ Repository: jonschlinkert/fill-range
240
240
 
241
241
  ---------------------------------------
242
242
 
243
- ## get-package-type
244
- License: MIT
245
- By: Corey Farrell
246
- Repository: git+https://github.com/cfware/get-package-type.git
247
-
248
- > MIT License
249
- >
250
- > Copyright (c) 2020 CFWare, LLC
251
- >
252
- > Permission is hereby granted, free of charge, to any person obtaining a copy
253
- > of this software and associated documentation files (the "Software"), to deal
254
- > in the Software without restriction, including without limitation the rights
255
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
256
- > copies of the Software, and to permit persons to whom the Software is
257
- > furnished to do so, subject to the following conditions:
258
- >
259
- > The above copyright notice and this permission notice shall be included in all
260
- > copies or substantial portions of the Software.
261
- >
262
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
263
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
264
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
265
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
266
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
267
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
268
- > SOFTWARE.
269
-
270
- ---------------------------------------
271
-
272
243
  ## glob-parent
273
244
  License: ISC
274
245
  By: Gulp Team, Elan Shanker, Blaine Bublitz
@@ -292,35 +263,6 @@ Repository: gulpjs/glob-parent
292
263
 
293
264
  ---------------------------------------
294
265
 
295
- ## hash.js
296
- License: MIT
297
- By: Fedor Indutny
298
- Repository: git@github.com:indutny/hash.js
299
-
300
- ---------------------------------------
301
-
302
- ## inherits
303
- License: ISC
304
- Repository: git://github.com/isaacs/inherits
305
-
306
- > The ISC License
307
- >
308
- > Copyright (c) Isaac Z. Schlueter
309
- >
310
- > Permission to use, copy, modify, and/or distribute this software for any
311
- > purpose with or without fee is hereby granted, provided that the above
312
- > copyright notice and this permission notice appear in all copies.
313
- >
314
- > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
315
- > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
316
- > FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
317
- > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
318
- > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
319
- > OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
320
- > PERFORMANCE OF THIS SOFTWARE.
321
-
322
- ---------------------------------------
323
-
324
266
  ## is-binary-path
325
267
  License: MIT
326
268
  By: Sindre Sorhus
@@ -454,26 +396,6 @@ Repository: https://github.com/rich-harris/magic-string
454
396
 
455
397
  ---------------------------------------
456
398
 
457
- ## minimalistic-assert
458
- License: ISC
459
- Repository: https://github.com/calvinmetcalf/minimalistic-assert.git
460
-
461
- > Copyright 2015 Calvin Metcalf
462
- >
463
- > Permission to use, copy, modify, and/or distribute this software for any purpose
464
- > with or without fee is hereby granted, provided that the above copyright notice
465
- > and this permission notice appear in all copies.
466
- >
467
- > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
468
- > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
469
- > FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
470
- > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
471
- > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
472
- > OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
473
- > PERFORMANCE OF THIS SOFTWARE.
474
-
475
- ---------------------------------------
476
-
477
399
  ## normalize-path
478
400
  License: MIT
479
401
  By: Jon Schlinkert, Blaine Bublitz
package/README.md CHANGED
@@ -21,9 +21,7 @@
21
21
  <a href="https://github.com/rollup/rollup/blob/master/LICENSE.md">
22
22
  <img src="https://img.shields.io/npm/l/rollup.svg" alt="license">
23
23
  </a>
24
- <a href="https://david-dm.org/rollup/rollup">
25
- <img src="https://david-dm.org/rollup/rollup/status.svg" alt="dependency status">
26
- </a>
24
+
27
25
  <a href='https://is.gd/rollup_chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge'>
28
26
  <img src='https://img.shields.io/discord/466787075518365708?color=778cd1&label=chat' alt='Join the chat at https://is.gd/rollup_chat'>
29
27
  </a>
@@ -37,7 +35,7 @@ Rollup is a module bundler for JavaScript which compiles small pieces of code in
37
35
 
38
36
  ## Quick Start Guide
39
37
 
40
- Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/#command-line-reference) with an optional configuration file, or else through its [JavaScript API](https://rollupjs.org/guide/en/#javascript-api). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](https://rollupjs.org/).
38
+ Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/#command-line-reference) with an optional configuration file or else through its [JavaScript API](https://rollupjs.org/guide/en/#javascript-api). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](https://rollupjs.org/).
41
39
 
42
40
  ### Commands
43
41
 
@@ -78,7 +76,7 @@ For example, with CommonJS, the _entire tool or library must be imported_.
78
76
 
79
77
  ```js
80
78
  // import the entire utils object with CommonJS
81
- var utils = require('utils');
79
+ var utils = require('node:utils');
82
80
  var query = 'Rollup';
83
81
  // use the ajax method of the utils object
84
82
  utils.ajax('https://api.example.com?search=' + query).then(handleResponse);
@@ -88,7 +86,7 @@ But with ES modules, instead of importing the whole `utils` object, we can just
88
86
 
89
87
  ```js
90
88
  // import the ajax function with an ES import statement
91
- import { ajax } from 'utils';
89
+ import { ajax } from 'node:utils';
92
90
  var query = 'Rollup';
93
91
  // call the ajax function
94
92
  ajax('https://api.example.com?search=' + query).then(handleResponse);
package/dist/bin/rollup CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v3.0.0-2
6
- Fri, 15 Jul 2022 15:25:15 GMT - commit 13b0ef8778ca5ccfd54b113ef545bf235a4c7e34
5
+ Rollup.js v3.0.0-4
6
+ Wed, 31 Aug 2022 05:26:36 GMT - commit 392609619bcb75a0c7216f38e40d9573419a8e3f
7
7
 
8
8
  https://github.com/rollup/rollup
9
9
 
@@ -11,22 +11,24 @@
11
11
  */
12
12
  'use strict';
13
13
 
14
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
14
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
15
15
 
16
- const process$1 = require('process');
16
+ const process$1 = require('node:process');
17
17
  const rollup = require('../shared/rollup.js');
18
18
  const require$$2 = require('util');
19
19
  const require$$0 = require('path');
20
20
  const require$$0$1 = require('fs');
21
21
  const mergeOptions = require('../shared/mergeOptions.js');
22
22
  const loadConfigFile_js = require('../shared/loadConfigFile.js');
23
- require('perf_hooks');
24
- require('crypto');
25
- require('events');
26
- require('url');
23
+ const node_fs = require('node:fs');
24
+ const node_path = require('node:path');
25
+ require('node:perf_hooks');
26
+ require('node:crypto');
27
+ require('node:events');
28
+ require('node:url');
27
29
  require('tty');
28
30
 
29
- 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.id <id> ID for AMD module (default is anonymous)\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--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--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-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--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--no-indent Don't indent result\n--no-interop Do not include interop block\n--inlineDynamicImports Create single bundle when using dynamic imports\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileReads <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--systemNullSetters Replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\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--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.skipWrite Do not write files to disk when watching\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--validate Validate output\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.id <id> ID for AMD module (default is anonymous)\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--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--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-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--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--no-indent Don't indent result\n--no-interop Do not include interop block\n--inlineDynamicImports Create single bundle when using dynamic imports\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileReads <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--systemNullSetters Replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\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--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.skipWrite Do not write files to disk when watching\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--validate Validate output\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";
30
32
 
31
33
  /**
32
34
  * @license
@@ -324,11 +326,11 @@ class YargsParser {
324
326
  let next;
325
327
  let value;
326
328
  // any unknown option (except for end-of-options, "--")
327
- if (arg !== '--' && isUnknownOptionAsArg(arg)) {
329
+ if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
328
330
  pushPositional(arg);
329
331
  // ---, ---=, ----, etc,
330
332
  }
331
- else if (truncatedArg.match(/---+(=|$)/)) {
333
+ else if (truncatedArg.match(/^---+(=|$)/)) {
332
334
  // options without key name are invalid.
333
335
  pushPositional(arg);
334
336
  continue;
@@ -1196,13 +1198,15 @@ function stripQuotes(val) {
1196
1198
  * Copyright (c) 2016, Contributors
1197
1199
  * SPDX-License-Identifier: ISC
1198
1200
  */
1201
+ var _a, _b, _c;
1199
1202
  // See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our
1200
1203
  // version support policy. The YARGS_MIN_NODE_VERSION is used for testing only.
1201
1204
  const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)
1202
1205
  ? Number(process.env.YARGS_MIN_NODE_VERSION)
1203
1206
  : 12;
1204
- if (process && process.version) {
1205
- const major = Number(process.version.match(/v([^.]+)/)[1]);
1207
+ const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
1208
+ if (nodeVersion) {
1209
+ const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
1206
1210
  if (major < minNodeVersion) {
1207
1211
  throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
1208
1212
  }
@@ -1535,26 +1539,13 @@ async function build(inputOptions, warnings, silent = false) {
1535
1539
  if (useStdout) {
1536
1540
  const output = outputOptions[0];
1537
1541
  if (output.sourcemap && output.sourcemap !== 'inline') {
1538
- loadConfigFile_js.handleError({
1539
- code: 'ONLY_INLINE_SOURCEMAPS',
1540
- message: 'Only inline sourcemaps are supported when bundling to stdout.'
1541
- });
1542
+ loadConfigFile_js.handleError(rollup.errOnlyInlineSourcemapsForStdout());
1542
1543
  }
1543
1544
  const { output: outputs } = await bundle.generate(output);
1544
1545
  for (const file of outputs) {
1545
- let source;
1546
- if (file.type === 'asset') {
1547
- source = file.source;
1548
- }
1549
- else {
1550
- source = file.code;
1551
- if (output.sourcemap === 'inline') {
1552
- source += `\n//# ${rollup.SOURCEMAPPING_URL}=${file.map.toUrl()}\n`;
1553
- }
1554
- }
1555
1546
  if (outputs.length > 1)
1556
1547
  process$1.stdout.write(`\n${loadConfigFile_js.cyan(loadConfigFile_js.bold(`//→ ${file.fileName}:`))}\n`);
1557
- process$1.stdout.write(source);
1548
+ process$1.stdout.write(file.type === 'asset' ? file.source : file.code);
1558
1549
  }
1559
1550
  if (!silent) {
1560
1551
  warnings.flush();
@@ -1575,7 +1566,7 @@ async function build(inputOptions, warnings, silent = false) {
1575
1566
  const DEFAULT_CONFIG_BASE = 'rollup.config';
1576
1567
  async function getConfigPath(commandConfig) {
1577
1568
  if (commandConfig === true) {
1578
- return require$$0.resolve(await findConfigFileNameInCwd());
1569
+ return node_path.resolve(await findConfigFileNameInCwd());
1579
1570
  }
1580
1571
  if (commandConfig.slice(0, 5) === 'node:') {
1581
1572
  const pkgName = commandConfig.slice(5);
@@ -1588,19 +1579,16 @@ async function getConfigPath(commandConfig) {
1588
1579
  }
1589
1580
  catch (err) {
1590
1581
  if (err.code === 'MODULE_NOT_FOUND') {
1591
- loadConfigFile_js.handleError({
1592
- code: 'MISSING_EXTERNAL_CONFIG',
1593
- message: `Could not resolve config file "${commandConfig}"`
1594
- });
1582
+ loadConfigFile_js.handleError(rollup.errMissingExternalConfig(commandConfig));
1595
1583
  }
1596
1584
  throw err;
1597
1585
  }
1598
1586
  }
1599
1587
  }
1600
- return require$$0.resolve(commandConfig);
1588
+ return node_path.resolve(commandConfig);
1601
1589
  }
1602
1590
  async function findConfigFileNameInCwd() {
1603
- const filesInWorkingDir = new Set(await require$$0$1.promises.readdir(process$1.cwd()));
1591
+ const filesInWorkingDir = new Set(await node_fs.promises.readdir(process$1.cwd()));
1604
1592
  for (const extension of ['mjs', 'cjs', 'ts']) {
1605
1593
  const fileName = `${DEFAULT_CONFIG_BASE}.${extension}`;
1606
1594
  if (filesInWorkingDir.has(fileName))
@@ -1623,10 +1611,7 @@ async function runRollup(command) {
1623
1611
  let inputSource;
1624
1612
  if (command._.length > 0) {
1625
1613
  if (command.input) {
1626
- loadConfigFile_js.handleError({
1627
- code: 'DUPLICATE_IMPORT_OPTIONS',
1628
- message: 'Either use --input, or pass input path as argument'
1629
- });
1614
+ loadConfigFile_js.handleError(rollup.errDuplicateImportOptions());
1630
1615
  }
1631
1616
  inputSource = command._;
1632
1617
  }
@@ -1675,10 +1660,7 @@ async function runRollup(command) {
1675
1660
  }
1676
1661
  if (command.failAfterWarnings && warnings.warningOccurred) {
1677
1662
  warnings.flush();
1678
- loadConfigFile_js.handleError({
1679
- code: 'FAIL_AFTER_WARNINGS',
1680
- message: 'Warnings occurred and --failAfterWarnings flag present'
1681
- });
1663
+ loadConfigFile_js.handleError(rollup.errFailAfterWarnings());
1682
1664
  }
1683
1665
  }
1684
1666
  catch (err) {
@@ -1694,7 +1676,7 @@ async function runRollup(command) {
1694
1676
  async function getConfigs(command) {
1695
1677
  if (command.config) {
1696
1678
  const configFile = await getConfigPath(command.config);
1697
- const { options, warnings } = await loadConfigFile_js.loadAndParseConfigFile(configFile, command);
1679
+ const { options, warnings } = await loadConfigFile_js.loadConfigFile(configFile, command);
1698
1680
  return { options, warnings };
1699
1681
  }
1700
1682
  return await loadConfigFromCommand(command);
package/dist/es/rollup.js CHANGED
@@ -1,16 +1,17 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.0.0-2
4
- Fri, 15 Jul 2022 15:25:15 GMT - commit 13b0ef8778ca5ccfd54b113ef545bf235a4c7e34
3
+ Rollup.js v3.0.0-4
4
+ Wed, 31 Aug 2022 05:26:36 GMT - commit 392609619bcb75a0c7216f38e40d9573419a8e3f
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/rollup.js';
11
+ import 'node:path';
11
12
  import 'path';
12
- import 'process';
13
- import 'perf_hooks';
14
- import 'crypto';
15
- import 'fs';
16
- import 'events';
13
+ import 'node:process';
14
+ import 'node:perf_hooks';
15
+ import 'node:crypto';
16
+ import 'node:fs';
17
+ import 'node:events';