Sorry, the diff of this file is too big to display
| import type { MergedRollupOptions, RollupWarning } from './rollup'; | ||
| export interface BatchWarnings { | ||
| add: (warning: RollupWarning) => void; | ||
| readonly count: number; | ||
| flush: () => void; | ||
| readonly warningOccurred: boolean; | ||
| } | ||
| export type LoadConfigFile = typeof loadConfigFile; | ||
| export function loadConfigFile( | ||
| fileName: string, | ||
| commandOptions: any | ||
| ): Promise<{ | ||
| options: MergedRollupOptions[]; | ||
| warnings: BatchWarnings; | ||
| }>; |
| /* | ||
| @license | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
| https://github.com/rollup/rollup | ||
| Released under the MIT License. | ||
| */ | ||
| 'use strict'; | ||
| let fsEvents; | ||
| let fsEventsImportError; | ||
| async function loadFsEvents() { | ||
| try { | ||
| ({ default: fsEvents } = await import('fsevents')); | ||
| } | ||
| catch (error) { | ||
| fsEventsImportError = error; | ||
| } | ||
| } | ||
| // A call to this function will be injected into the chokidar code | ||
| function getFsEvents() { | ||
| if (fsEventsImportError) | ||
| throw fsEventsImportError; | ||
| return fsEvents; | ||
| } | ||
| const fseventsImporter = /*#__PURE__*/Object.defineProperty({ | ||
| __proto__: null, | ||
| getFsEvents, | ||
| loadFsEvents | ||
| }, Symbol.toStringTag, { value: 'Module' }); | ||
| exports.fseventsImporter = fseventsImporter; | ||
| exports.loadFsEvents = loadFsEvents; | ||
| //# sourceMappingURL=fsevents-importer.js.map |
| /* | ||
| @license | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
| https://github.com/rollup/rollup | ||
| Released under the MIT License. | ||
| */ | ||
| 'use strict'; | ||
| const rollup = require('./rollup.js'); | ||
| const fseventsImporter = require('./fsevents-importer.js'); | ||
| class WatchEmitter { | ||
| constructor() { | ||
| this.currentHandlers = Object.create(null); | ||
| this.persistentHandlers = Object.create(null); | ||
| } | ||
| // Will be overwritten by Rollup | ||
| async close() { } | ||
| emit(event, ...parameters) { | ||
| return Promise.all([...this.getCurrentHandlers(event), ...this.getPersistentHandlers(event)].map(handler => handler(...parameters))); | ||
| } | ||
| off(event, listener) { | ||
| const listeners = this.persistentHandlers[event]; | ||
| if (listeners) { | ||
| // A hack stolen from "mitt": ">>> 0" does not change numbers >= 0, but -1 | ||
| // (which would remove the last array element if used unchanged) is turned | ||
| // into max_int, which is outside the array and does not change anything. | ||
| listeners.splice(listeners.indexOf(listener) >>> 0, 1); | ||
| } | ||
| return this; | ||
| } | ||
| on(event, listener) { | ||
| this.getPersistentHandlers(event).push(listener); | ||
| return this; | ||
| } | ||
| onCurrentRun(event, listener) { | ||
| this.getCurrentHandlers(event).push(listener); | ||
| return this; | ||
| } | ||
| once(event, listener) { | ||
| const selfRemovingListener = (...parameters) => { | ||
| this.off(event, selfRemovingListener); | ||
| return listener(...parameters); | ||
| }; | ||
| this.on(event, selfRemovingListener); | ||
| return this; | ||
| } | ||
| removeAllListeners() { | ||
| this.removeListenersForCurrentRun(); | ||
| this.persistentHandlers = Object.create(null); | ||
| return this; | ||
| } | ||
| removeListenersForCurrentRun() { | ||
| this.currentHandlers = Object.create(null); | ||
| return this; | ||
| } | ||
| getCurrentHandlers(event) { | ||
| return this.currentHandlers[event] || (this.currentHandlers[event] = []); | ||
| } | ||
| getPersistentHandlers(event) { | ||
| return this.persistentHandlers[event] || (this.persistentHandlers[event] = []); | ||
| } | ||
| } | ||
| function watch(configs) { | ||
| const emitter = new WatchEmitter(); | ||
| watchInternal(configs, emitter).catch(error => { | ||
| rollup.handleError(error); | ||
| }); | ||
| return emitter; | ||
| } | ||
| async function watchInternal(configs, emitter) { | ||
| const optionsList = await Promise.all(rollup.ensureArray(configs).map(config => rollup.mergeOptions(config))); | ||
| const watchOptionsList = optionsList.filter(config => config.watch !== false); | ||
| if (watchOptionsList.length === 0) { | ||
| return rollup.error(rollup.errorInvalidOption('watch', rollup.URL_WATCH, 'there must be at least one config where "watch" is not set to "false"')); | ||
| } | ||
| await fseventsImporter.loadFsEvents(); | ||
| const { Watcher } = await Promise.resolve().then(() => require('./watch.js')); | ||
| new Watcher(watchOptionsList, emitter); | ||
| } | ||
| exports.watch = watch; | ||
| //# sourceMappingURL=watch-proxy.js.map |
+10
-8
| /* | ||
| @license | ||
| Rollup.js v2.79.1 | ||
| Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8 | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
@@ -10,8 +10,10 @@ https://github.com/rollup/rollup | ||
| */ | ||
| export { version as VERSION, defineConfig, rollup, watch } from './shared/rollup.js'; | ||
| export { version as VERSION, defineConfig, rollup, watch } from './shared/node-entry.js'; | ||
| import 'node:path'; | ||
| import 'path'; | ||
| import 'process'; | ||
| import 'perf_hooks'; | ||
| import 'crypto'; | ||
| import 'fs'; | ||
| import 'events'; | ||
| import 'node:process'; | ||
| import 'node:perf_hooks'; | ||
| import 'node:crypto'; | ||
| import 'node:fs/promises'; | ||
| import 'node:events'; | ||
| import 'tty'; |
+14
-12
| /* | ||
| @license | ||
| Rollup.js v2.79.1 | ||
| Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8 | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
@@ -12,17 +12,19 @@ https://github.com/rollup/rollup | ||
| require('path'); | ||
| require('process'); | ||
| require('url'); | ||
| Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
| require('node:fs/promises'); | ||
| require('node:path'); | ||
| require('node:process'); | ||
| require('node:url'); | ||
| require('./shared/rollup.js'); | ||
| const loadConfigFile_js = require('./shared/loadConfigFile.js'); | ||
| require('./shared/rollup.js'); | ||
| require('./shared/mergeOptions.js'); | ||
| require('tty'); | ||
| require('perf_hooks'); | ||
| require('crypto'); | ||
| require('fs'); | ||
| require('events'); | ||
| require('path'); | ||
| require('node:perf_hooks'); | ||
| require('node:crypto'); | ||
| require('node:events'); | ||
| module.exports = loadConfigFile_js.loadAndParseConfigFile; | ||
| exports.loadConfigFile = loadConfigFile_js.loadConfigFile; | ||
| //# sourceMappingURL=loadConfigFile.js.map |
+156
-139
| export const VERSION: string; | ||
| export interface RollupError extends RollupLogProps { | ||
| parserError?: Error; | ||
| // utils | ||
| type NullValue = null | undefined | void; | ||
| type MaybeArray<T> = T | T[]; | ||
| type MaybePromise<T> = T | Promise<T>; | ||
| type PartialNull<T> = { | ||
| [P in keyof T]: T[P] | null; | ||
| }; | ||
| export interface RollupError extends RollupLog { | ||
| name?: string; | ||
| stack?: string; | ||
@@ -9,22 +18,13 @@ watchFiles?: string[]; | ||
| export interface RollupWarning extends RollupLogProps { | ||
| chunkName?: string; | ||
| cycle?: string[]; | ||
| exportName?: string; | ||
| exporter?: string; | ||
| guess?: string; | ||
| importer?: string; | ||
| missing?: string; | ||
| modules?: string[]; | ||
| names?: string[]; | ||
| reexporter?: string; | ||
| source?: string; | ||
| sources?: string[]; | ||
| } | ||
| export type RollupWarning = RollupLog; | ||
| export interface RollupLogProps { | ||
| export interface RollupLog { | ||
| binding?: string; | ||
| cause?: unknown; | ||
| code?: string; | ||
| exporter?: string; | ||
| frame?: string; | ||
| hook?: string; | ||
| id?: string; | ||
| ids?: string[]; | ||
| loc?: { | ||
@@ -36,6 +36,8 @@ column: number; | ||
| message: string; | ||
| name?: string; | ||
| names?: string[]; | ||
| plugin?: string; | ||
| pluginCode?: string; | ||
| pos?: number; | ||
| reexporter?: string; | ||
| stack?: string; | ||
| url?: string; | ||
@@ -55,4 +57,5 @@ } | ||
| sources: string[]; | ||
| sourcesContent?: string[]; | ||
| sourcesContent?: (string | null)[]; | ||
| version: number; | ||
| x_google_ignoreList?: number[]; | ||
| } | ||
@@ -66,4 +69,5 @@ | ||
| sources: string[]; | ||
| sourcesContent?: string[]; | ||
| sourcesContent?: (string | null)[]; | ||
| version: number; | ||
| x_google_ignoreList?: number[]; | ||
| } | ||
@@ -84,3 +88,3 @@ | ||
| sources: string[]; | ||
| sourcesContent: string[]; | ||
| sourcesContent: (string | null)[]; | ||
| version: number; | ||
@@ -93,7 +97,4 @@ toString(): string; | ||
| type PartialNull<T> = { | ||
| [P in keyof T]: T[P] | null; | ||
| }; | ||
| interface ModuleOptions { | ||
| assertions: Record<string, string>; | ||
| meta: CustomPluginOptions; | ||
@@ -143,2 +144,3 @@ moduleSideEffects: boolean | 'no-treeshake'; | ||
| name?: string; | ||
| needsCodeReference?: boolean; | ||
| source?: string | Uint8Array; | ||
@@ -160,6 +162,2 @@ type: 'asset'; | ||
| export type EmitAsset = (name: string, source?: string | Uint8Array) => string; | ||
| export type EmitChunk = (id: string, options?: { name?: string }) => string; | ||
| export type EmitFile = (emittedFile: EmittedFile) => string; | ||
@@ -173,2 +171,4 @@ | ||
| dynamicallyImportedIds: readonly string[]; | ||
| exportedBindings: Record<string, string[]> | null; | ||
| exports: string[] | null; | ||
| hasDefaultExport: boolean | null; | ||
@@ -197,12 +197,4 @@ /** @deprecated Use `moduleSideEffects` instead */ | ||
| cache: PluginCache; | ||
| /** @deprecated Use `this.emitFile` instead */ | ||
| emitAsset: EmitAsset; | ||
| /** @deprecated Use `this.emitFile` instead */ | ||
| emitChunk: EmitChunk; | ||
| emitFile: EmitFile; | ||
| error: (err: RollupError | string, pos?: number | { column: number; line: number }) => never; | ||
| /** @deprecated Use `this.getFileName` instead */ | ||
| getAssetFileName: (assetReferenceId: string) => string; | ||
| /** @deprecated Use `this.getFileName` instead */ | ||
| getChunkFileName: (chunkReferenceId: string) => string; | ||
| error: (error: RollupError | string, pos?: number | { column: number; line: number }) => never; | ||
| getFileName: (fileReferenceId: string) => string; | ||
@@ -212,4 +204,2 @@ getModuleIds: () => IterableIterator<string>; | ||
| getWatchFiles: () => string[]; | ||
| /** @deprecated Use `this.resolve` instead */ | ||
| isExternal: IsExternal; | ||
| load: ( | ||
@@ -224,6 +214,9 @@ options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>> | ||
| importer?: string, | ||
| options?: { custom?: CustomPluginOptions; isEntry?: boolean; skipSelf?: boolean } | ||
| options?: { | ||
| assertions?: Record<string, string>; | ||
| custom?: CustomPluginOptions; | ||
| isEntry?: boolean; | ||
| skipSelf?: boolean; | ||
| } | ||
| ) => Promise<ResolvedId | null>; | ||
| /** @deprecated Use `this.resolve` instead */ | ||
| resolveId: (source: string, importer?: string) => Promise<string | null>; | ||
| setAssetSource: (assetReferenceId: string, source: string | Uint8Array) => void; | ||
@@ -241,2 +234,3 @@ warn: (warning: RollupWarning | string, pos?: number | { column: number; line: number }) => void; | ||
| id: string; | ||
| resolvedBy: string; | ||
| } | ||
@@ -251,6 +245,9 @@ | ||
| id: string; | ||
| resolvedBy?: string; | ||
| } | ||
| export type ResolveIdResult = string | false | null | void | PartialResolvedId; | ||
| export type ResolveIdResult = string | NullValue | false | PartialResolvedId; | ||
| export type ResolveIdResultWithoutNullValue = string | false | PartialResolvedId; | ||
| export type ResolveIdHook = ( | ||
@@ -260,3 +257,3 @@ this: PluginContext, | ||
| importer: string | undefined, | ||
| options: { custom?: CustomPluginOptions; isEntry: boolean } | ||
| options: { assertions: Record<string, string>; custom?: CustomPluginOptions; isEntry: boolean } | ||
| ) => ResolveIdResult; | ||
@@ -283,7 +280,7 @@ | ||
| export type IsPureModule = (id: string) => boolean | null | void; | ||
| export type IsPureModule = (id: string) => boolean | NullValue; | ||
| export type HasModuleSideEffects = (id: string, external: boolean) => boolean; | ||
| export type LoadResult = SourceDescription | string | null | void; | ||
| export type LoadResult = SourceDescription | string | NullValue; | ||
@@ -296,3 +293,3 @@ export type LoadHook = (this: PluginContext, id: string) => LoadResult; | ||
| export type TransformResult = string | null | void | Partial<SourceDescription>; | ||
| export type TransformResult = string | NullValue | Partial<SourceDescription>; | ||
@@ -311,4 +308,5 @@ export type TransformHook = ( | ||
| chunk: RenderedChunk, | ||
| options: NormalizedOutputOptions | ||
| ) => { code: string; map?: SourceMapInput } | string | null | undefined; | ||
| options: NormalizedOutputOptions, | ||
| meta: { chunks: Record<string, RenderedChunk> } | ||
| ) => { code: string; map?: SourceMapInput } | string | NullValue; | ||
@@ -318,3 +316,4 @@ export type ResolveDynamicImportHook = ( | ||
| specifier: string | AcornNode, | ||
| importer: string | ||
| importer: string, | ||
| options: { assertions: Record<string, string> } | ||
| ) => ResolveIdResult; | ||
@@ -324,23 +323,10 @@ | ||
| this: PluginContext, | ||
| prop: string | null, | ||
| property: string | null, | ||
| options: { chunkId: string; format: InternalModuleFormat; moduleId: string } | ||
| ) => string | null | void; | ||
| ) => string | NullValue; | ||
| export type ResolveAssetUrlHook = ( | ||
| this: PluginContext, | ||
| options: { | ||
| assetFileName: string; | ||
| chunkId: string; | ||
| format: InternalModuleFormat; | ||
| moduleId: string; | ||
| relativeAssetPath: string; | ||
| } | ||
| ) => string | null | void; | ||
| export type ResolveFileUrlHook = ( | ||
| this: PluginContext, | ||
| options: { | ||
| assetReferenceId: string | null; | ||
| chunkId: string; | ||
| chunkReferenceId: string | null; | ||
| fileName: string; | ||
@@ -352,5 +338,8 @@ format: InternalModuleFormat; | ||
| } | ||
| ) => string | null | void; | ||
| ) => string | NullValue; | ||
| export type AddonHookFunction = (this: PluginContext) => string | Promise<string>; | ||
| export type AddonHookFunction = ( | ||
| this: PluginContext, | ||
| chunk: RenderedChunk | ||
| ) => string | Promise<string>; | ||
| export type AddonHook = string | AddonHookFunction; | ||
@@ -383,4 +372,4 @@ | ||
| export interface FunctionPluginHooks { | ||
| augmentChunkHash: (this: PluginContext, chunk: PreRenderedChunk) => string | void; | ||
| buildEnd: (this: PluginContext, err?: Error) => void; | ||
| augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void; | ||
| buildEnd: (this: PluginContext, error?: Error) => void; | ||
| buildStart: (this: PluginContext, options: NormalizedInputOptions) => void; | ||
@@ -397,4 +386,4 @@ closeBundle: (this: PluginContext) => void; | ||
| moduleParsed: ModuleParsedHook; | ||
| options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | null | void; | ||
| outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | null | void; | ||
| options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | NullValue; | ||
| outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | NullValue; | ||
| renderChunk: RenderChunkHook; | ||
@@ -409,4 +398,4 @@ renderDynamicImport: ( | ||
| } | ||
| ) => { left: string; right: string } | null | void; | ||
| renderError: (this: PluginContext, err?: Error) => void; | ||
| ) => { left: string; right: string } | NullValue; | ||
| renderError: (this: PluginContext, error?: Error) => void; | ||
| renderStart: ( | ||
@@ -417,4 +406,2 @@ this: PluginContext, | ||
| ) => void; | ||
| /** @deprecated Use `resolveFileUrl` instead */ | ||
| resolveAssetUrl: ResolveAssetUrlHook; | ||
| resolveDynamicImport: ResolveDynamicImportHook; | ||
@@ -442,3 +429,2 @@ resolveFileUrl: ResolveFileUrlHook; | ||
| | 'renderStart' | ||
| | 'resolveAssetUrl' | ||
| | 'resolveFileUrl' | ||
@@ -454,3 +440,2 @@ | 'resolveImportMeta' | ||
| | 'renderDynamicImport' | ||
| | 'resolveAssetUrl' | ||
| | 'resolveFileUrl' | ||
@@ -464,3 +449,2 @@ | 'resolveImportMeta'; | ||
| | 'renderDynamicImport' | ||
| | 'resolveAssetUrl' | ||
| | 'resolveDynamicImport' | ||
@@ -487,4 +471,7 @@ | 'resolveFileUrl' | ||
| type MakeAsync<Fn> = Fn extends (this: infer This, ...args: infer Args) => infer Return | ||
| ? (this: This, ...args: Args) => Return | Promise<Return> | ||
| type MakeAsync<Function_> = Function_ extends ( | ||
| this: infer This, | ||
| ...parameters: infer Arguments | ||
| ) => infer Return | ||
| ? (this: This, ...parameters: Arguments) => Return | Promise<Return> | ||
| : never; | ||
@@ -508,2 +495,3 @@ | ||
| name: string; | ||
| version?: string; | ||
| } | ||
@@ -521,2 +509,3 @@ | ||
| correctVarValueBeforeDeclaration: boolean; | ||
| manualPureFunctions: readonly string[]; | ||
| moduleSideEffects: HasModuleSideEffects; | ||
@@ -532,11 +521,9 @@ propertyReadSideEffects: boolean | 'always'; | ||
| preset?: TreeshakingPreset; | ||
| /** @deprecated Use `moduleSideEffects` instead */ | ||
| pureExternalModules?: PureModulesOption; | ||
| } | ||
| interface GetManualChunkApi { | ||
| interface ManualChunkMeta { | ||
| getModuleIds: () => IterableIterator<string>; | ||
| getModuleInfo: GetModuleInfo; | ||
| } | ||
| export type GetManualChunk = (id: string, api: GetManualChunkApi) => string | null | void; | ||
| export type GetManualChunk = (id: string, meta: ManualChunkMeta) => string | NullValue; | ||
@@ -547,3 +534,3 @@ export type ExternalOption = | ||
| | RegExp | ||
| | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | null | void); | ||
| | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue); | ||
| export type PureModulesOption = boolean | string[] | IsPureModule; | ||
@@ -559,9 +546,16 @@ export type GlobalsOption = { [name: string]: string } | ((name: string) => string); | ||
| ) => string; | ||
| export type SourcemapIgnoreListOption = ( | ||
| relativeSourcePath: string, | ||
| sourcemapPath: string | ||
| ) => boolean; | ||
| export type InputPluginOption = MaybePromise<Plugin | NullValue | false | InputPluginOption[]>; | ||
| export interface InputOptions { | ||
| acorn?: Record<string, unknown>; | ||
| acornInjectPlugins?: (() => unknown)[] | (() => unknown); | ||
| cache?: false | RollupCache; | ||
| cache?: boolean | RollupCache; | ||
| context?: string; | ||
| experimentalCacheExpiry?: number; | ||
| experimentalLogSideEffects?: boolean; | ||
| external?: ExternalOption; | ||
@@ -577,6 +571,6 @@ /** @deprecated Use the "inlineDynamicImports" output option instead. */ | ||
| maxParallelFileReads?: number; | ||
| moduleContext?: ((id: string) => string | null | void) | { [id: string]: string }; | ||
| moduleContext?: ((id: string) => string | NullValue) | { [id: string]: string }; | ||
| onwarn?: WarningHandlerWithDefault; | ||
| perf?: boolean; | ||
| plugins?: (Plugin | null | false | undefined)[]; | ||
| plugins?: InputPluginOption; | ||
| preserveEntrySignatures?: PreserveEntrySignaturesOption; | ||
@@ -592,2 +586,6 @@ /** @deprecated Use the "preserveModules" output option instead. */ | ||
| export interface InputOptionsWithPlugins extends InputOptions { | ||
| plugins: Plugin[]; | ||
| } | ||
| export interface NormalizedInputOptions { | ||
@@ -599,2 +597,3 @@ acorn: Record<string, unknown>; | ||
| experimentalCacheExpiry: number; | ||
| experimentalLogSideEffects: boolean; | ||
| external: IsExternal; | ||
@@ -643,3 +642,3 @@ /** @deprecated Use the "inlineDynamicImports" output option instead. */ | ||
| export type InteropType = boolean | 'auto' | 'esModule' | 'default' | 'defaultOnly'; | ||
| export type InteropType = 'compat' | 'auto' | 'esModule' | 'default' | 'defaultOnly'; | ||
@@ -681,6 +680,10 @@ export type GetInterop = (id: string | null) => InteropType; | ||
| type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>; | ||
| type OutputPluginOption = MaybePromise<OutputPlugin | NullValue | false | OutputPluginOption[]>; | ||
| export interface OutputOptions { | ||
| amd?: AmdOptions; | ||
| assetFileNames?: string | ((chunkInfo: PreRenderedAsset) => string); | ||
| banner?: string | (() => string | Promise<string>); | ||
| banner?: string | AddonFunction; | ||
| chunkFileNames?: string | ((chunkInfo: PreRenderedChunk) => string); | ||
@@ -692,10 +695,15 @@ compact?: boolean; | ||
| dynamicImportFunction?: string; | ||
| dynamicImportInCjs?: boolean; | ||
| entryFileNames?: string | ((chunkInfo: PreRenderedChunk) => string); | ||
| esModule?: boolean; | ||
| esModule?: boolean | 'if-default-prop'; | ||
| /** @deprecated This option is no longer needed and ignored. */ | ||
| experimentalDeepDynamicChunkOptimization?: boolean; | ||
| experimentalMinChunkSize?: number; | ||
| exports?: 'default' | 'named' | 'none' | 'auto'; | ||
| extend?: boolean; | ||
| externalImportAssertions?: boolean; | ||
| externalLiveBindings?: boolean; | ||
| // only required for bundle.write | ||
| file?: string; | ||
| footer?: string | (() => string | Promise<string>); | ||
| footer?: string | AddonFunction; | ||
| format?: ModuleFormat; | ||
@@ -709,3 +717,3 @@ freeze?: boolean; | ||
| interop?: InteropType | GetInterop; | ||
| intro?: string | (() => string | Promise<string>); | ||
| intro?: string | AddonFunction; | ||
| manualChunks?: ManualChunksOption; | ||
@@ -717,5 +725,5 @@ minifyInternalExports?: boolean; | ||
| noConflict?: boolean; | ||
| outro?: string | (() => string | Promise<string>); | ||
| outro?: string | AddonFunction; | ||
| paths?: OptionsPaths; | ||
| plugins?: (OutputPlugin | null | false | undefined)[]; | ||
| plugins?: OutputPluginOption; | ||
| /** @deprecated Use "generatedCode.constBindings" instead. */ | ||
@@ -730,2 +738,3 @@ preferConst?: boolean; | ||
| sourcemapFile?: string; | ||
| sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption; | ||
| sourcemapPathTransform?: SourcemapPathTransformOption; | ||
@@ -740,3 +749,3 @@ strict?: boolean; | ||
| assetFileNames: string | ((chunkInfo: PreRenderedAsset) => string); | ||
| banner: () => string | Promise<string>; | ||
| banner: AddonFunction; | ||
| chunkFileNames: string | ((chunkInfo: PreRenderedChunk) => string); | ||
@@ -747,9 +756,14 @@ compact: boolean; | ||
| dynamicImportFunction: string | undefined; | ||
| dynamicImportInCjs: boolean; | ||
| entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string); | ||
| esModule: boolean; | ||
| esModule: boolean | 'if-default-prop'; | ||
| /** @deprecated This option is no longer needed and ignored. */ | ||
| experimentalDeepDynamicChunkOptimization: boolean; | ||
| experimentalMinChunkSize: number; | ||
| exports: 'default' | 'named' | 'none' | 'auto'; | ||
| extend: boolean; | ||
| externalImportAssertions: boolean; | ||
| externalLiveBindings: boolean; | ||
| file: string | undefined; | ||
| footer: () => string | Promise<string>; | ||
| footer: AddonFunction; | ||
| format: InternalModuleFormat; | ||
@@ -763,12 +777,13 @@ freeze: boolean; | ||
| interop: GetInterop; | ||
| intro: () => string | Promise<string>; | ||
| intro: AddonFunction; | ||
| manualChunks: ManualChunksOption; | ||
| minifyInternalExports: boolean; | ||
| name: string | undefined; | ||
| /** @deprecated Use "generatedCode.symbols" instead. */ | ||
| namespaceToStringTag: boolean; | ||
| noConflict: boolean; | ||
| outro: () => string | Promise<string>; | ||
| outro: AddonFunction; | ||
| paths: OptionsPaths; | ||
| plugins: OutputPlugin[]; | ||
| /** @deprecated Use the "renderDynamicImport" plugin hook instead. */ | ||
| /** @deprecated Use "generatedCode.constBindings" instead. */ | ||
| preferConst: boolean; | ||
@@ -782,2 +797,3 @@ preserveModules: boolean; | ||
| sourcemapFile: string | undefined; | ||
| sourcemapIgnoreList: SourcemapIgnoreListOption; | ||
| sourcemapPathTransform: SourcemapPathTransformOption | undefined; | ||
@@ -807,4 +823,3 @@ strict: boolean; | ||
| fileName: string; | ||
| /** @deprecated Accessing "isAsset" on files in the bundle is deprecated, please use "type === \'asset\'" instead */ | ||
| isAsset: true; | ||
| needsCodeReference: boolean; | ||
| } | ||
@@ -826,5 +841,3 @@ | ||
| isImplicitEntry: boolean; | ||
| modules: { | ||
| [id: string]: RenderedModule; | ||
| }; | ||
| moduleIds: string[]; | ||
| name: string; | ||
@@ -835,3 +848,2 @@ type: 'chunk'; | ||
| export interface RenderedChunk extends PreRenderedChunk { | ||
| code?: string; | ||
| dynamicImports: string[]; | ||
@@ -844,3 +856,5 @@ fileName: string; | ||
| imports: string[]; | ||
| map?: SourceMap; | ||
| modules: { | ||
| [id: string]: RenderedModule; | ||
| }; | ||
| referencedFiles: string[]; | ||
@@ -851,2 +865,3 @@ } | ||
| code: string; | ||
| map: SourceMap | null; | ||
| } | ||
@@ -882,3 +897,3 @@ | ||
| export interface MergedRollupOptions extends InputOptions { | ||
| export interface MergedRollupOptions extends InputOptionsWithPlugins { | ||
| output: OutputOptions[]; | ||
@@ -928,36 +943,33 @@ } | ||
| interface TypedEventEmitter<T extends { [event: string]: (...args: any) => any }> { | ||
| addListener<K extends keyof T>(event: K, listener: T[K]): this; | ||
| emit<K extends keyof T>(event: K, ...args: Parameters<T[K]>): boolean; | ||
| eventNames(): Array<keyof T>; | ||
| getMaxListeners(): number; | ||
| listenerCount(type: keyof T): number; | ||
| listeners<K extends keyof T>(event: K): Array<T[K]>; | ||
| off<K extends keyof T>(event: K, listener: T[K]): this; | ||
| on<K extends keyof T>(event: K, listener: T[K]): this; | ||
| once<K extends keyof T>(event: K, listener: T[K]): this; | ||
| prependListener<K extends keyof T>(event: K, listener: T[K]): this; | ||
| prependOnceListener<K extends keyof T>(event: K, listener: T[K]): this; | ||
| rawListeners<K extends keyof T>(event: K): Array<T[K]>; | ||
| removeAllListeners<K extends keyof T>(event?: K): this; | ||
| removeListener<K extends keyof T>(event: K, listener: T[K]): this; | ||
| setMaxListeners(n: number): this; | ||
| } | ||
| export type AwaitedEventListener< | ||
| T extends { [event: string]: (...parameters: any) => any }, | ||
| K extends keyof T | ||
| > = (...parameters: Parameters<T[K]>) => void | Promise<void>; | ||
| export interface RollupAwaitingEmitter<T extends { [event: string]: (...args: any) => any }> | ||
| extends TypedEventEmitter<T> { | ||
| export interface AwaitingEventEmitter<T extends { [event: string]: (...parameters: any) => any }> { | ||
| close(): Promise<void>; | ||
| emitAndAwait<K extends keyof T>(event: K, ...args: Parameters<T[K]>): Promise<ReturnType<T[K]>[]>; | ||
| emit<K extends keyof T>(event: K, ...parameters: Parameters<T[K]>): Promise<unknown>; | ||
| /** | ||
| * Registers an event listener that will be awaited before Rollup continues | ||
| * for events emitted via emitAndAwait. All listeners will be awaited in | ||
| * parallel while rejections are tracked via Promise.all. | ||
| * Listeners are removed automatically when removeAwaited is called, which | ||
| * happens automatically after each run. | ||
| * Removes an event listener. | ||
| */ | ||
| onCurrentAwaited<K extends keyof T>( | ||
| off<K extends keyof T>(event: K, listener: AwaitedEventListener<T, K>): this; | ||
| /** | ||
| * Registers an event listener that will be awaited before Rollup continues. | ||
| * All listeners will be awaited in parallel while rejections are tracked via | ||
| * Promise.all. | ||
| */ | ||
| on<K extends keyof T>(event: K, listener: AwaitedEventListener<T, K>): this; | ||
| /** | ||
| * Registers an event listener that will be awaited before Rollup continues. | ||
| * All listeners will be awaited in parallel while rejections are tracked via | ||
| * Promise.all. | ||
| * Listeners are removed automatically when removeListenersForCurrentRun is | ||
| * called, which happens automatically after each run. | ||
| */ | ||
| onCurrentRun<K extends keyof T>( | ||
| event: K, | ||
| listener: (...args: Parameters<T[K]>) => Promise<ReturnType<T[K]>> | ||
| listener: (...parameters: Parameters<T[K]>) => Promise<ReturnType<T[K]>> | ||
| ): this; | ||
| removeAwaited(): this; | ||
| removeAllListeners(): this; | ||
| removeListenersForCurrentRun(): this; | ||
| } | ||
@@ -978,3 +990,3 @@ | ||
| export type RollupWatcher = RollupAwaitingEmitter<{ | ||
| export type RollupWatcher = AwaitingEventEmitter<{ | ||
| change: (id: string, change: { event: ChangeEvent }) => void; | ||
@@ -996,1 +1008,6 @@ close: () => void; | ||
| export function defineConfig(options: RollupOptions[]): RollupOptions[]; | ||
| export function defineConfig(optionsFunction: RollupOptionsFunction): RollupOptionsFunction; | ||
| export type RollupOptionsFunction = ( | ||
| commandLineArguments: Record<string, any> | ||
| ) => MaybePromise<RollupOptions | RollupOptions[]>; |
+13
-9
| /* | ||
| @license | ||
| Rollup.js v2.79.1 | ||
| Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8 | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
@@ -12,11 +12,15 @@ https://github.com/rollup/rollup | ||
| Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); | ||
| Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
| const rollup = require('./shared/rollup.js'); | ||
| const watchProxy = require('./shared/watch-proxy.js'); | ||
| require('node:process'); | ||
| require('tty'); | ||
| require('node:path'); | ||
| require('path'); | ||
| require('process'); | ||
| require('perf_hooks'); | ||
| require('crypto'); | ||
| require('fs'); | ||
| require('events'); | ||
| require('node:perf_hooks'); | ||
| require('node:crypto'); | ||
| require('node:fs/promises'); | ||
| require('node:events'); | ||
| require('./shared/fsevents-importer.js'); | ||
@@ -28,3 +32,3 @@ | ||
| exports.rollup = rollup.rollup; | ||
| exports.watch = rollup.watch; | ||
| exports.watch = watchProxy.watch; | ||
| //# sourceMappingURL=rollup.js.map |
+137
-299
| /* | ||
| @license | ||
| Rollup.js v2.79.1 | ||
| Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8 | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
@@ -12,163 +12,8 @@ https://github.com/rollup/rollup | ||
| const require$$0 = require('path'); | ||
| const process$1 = require('process'); | ||
| const url = require('url'); | ||
| const tty = require('tty'); | ||
| const promises = require('node:fs/promises'); | ||
| const node_path = require('node:path'); | ||
| const process = require('node:process'); | ||
| const node_url = require('node:url'); | ||
| const rollup = require('./rollup.js'); | ||
| const mergeOptions = require('./mergeOptions.js'); | ||
| function _interopNamespaceDefault(e) { | ||
| const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } }); | ||
| if (e) { | ||
| for (const k in e) { | ||
| n[k] = e[k]; | ||
| } | ||
| } | ||
| n.default = e; | ||
| return n; | ||
| } | ||
| const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty); | ||
| const { | ||
| env = {}, | ||
| argv = [], | ||
| platform = "", | ||
| } = typeof process === "undefined" ? {} : process; | ||
| const isDisabled = "NO_COLOR" in env || argv.includes("--no-color"); | ||
| const isForced = "FORCE_COLOR" in env || argv.includes("--color"); | ||
| const isWindows = platform === "win32"; | ||
| const isDumbTerminal = env.TERM === "dumb"; | ||
| const isCompatibleTerminal = | ||
| tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal; | ||
| const isCI = | ||
| "CI" in env && | ||
| ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env); | ||
| const isColorSupported = | ||
| !isDisabled && | ||
| (isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI); | ||
| const replaceClose = ( | ||
| index, | ||
| string, | ||
| close, | ||
| replace, | ||
| head = string.substring(0, index) + replace, | ||
| tail = string.substring(index + close.length), | ||
| next = tail.indexOf(close) | ||
| ) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace)); | ||
| const clearBleed = (index, string, open, close, replace) => | ||
| index < 0 | ||
| ? open + string + close | ||
| : open + replaceClose(index, string, close, replace) + close; | ||
| const filterEmpty = | ||
| (open, close, replace = open, at = open.length + 1) => | ||
| (string) => | ||
| string || !(string === "" || string === undefined) | ||
| ? clearBleed( | ||
| ("" + string).indexOf(close, at), | ||
| string, | ||
| open, | ||
| close, | ||
| replace | ||
| ) | ||
| : ""; | ||
| const init = (open, close, replace) => | ||
| filterEmpty(`\x1b[${open}m`, `\x1b[${close}m`, replace); | ||
| const colors = { | ||
| reset: init(0, 0), | ||
| bold: init(1, 22, "\x1b[22m\x1b[1m"), | ||
| dim: init(2, 22, "\x1b[22m\x1b[2m"), | ||
| italic: init(3, 23), | ||
| underline: init(4, 24), | ||
| inverse: init(7, 27), | ||
| hidden: init(8, 28), | ||
| strikethrough: init(9, 29), | ||
| black: init(30, 39), | ||
| red: init(31, 39), | ||
| green: init(32, 39), | ||
| yellow: init(33, 39), | ||
| blue: init(34, 39), | ||
| magenta: init(35, 39), | ||
| cyan: init(36, 39), | ||
| white: init(37, 39), | ||
| gray: init(90, 39), | ||
| bgBlack: init(40, 49), | ||
| bgRed: init(41, 49), | ||
| bgGreen: init(42, 49), | ||
| bgYellow: init(43, 49), | ||
| bgBlue: init(44, 49), | ||
| bgMagenta: init(45, 49), | ||
| bgCyan: init(46, 49), | ||
| bgWhite: init(47, 49), | ||
| blackBright: init(90, 39), | ||
| redBright: init(91, 39), | ||
| greenBright: init(92, 39), | ||
| yellowBright: init(93, 39), | ||
| blueBright: init(94, 39), | ||
| magentaBright: init(95, 39), | ||
| cyanBright: init(96, 39), | ||
| whiteBright: init(97, 39), | ||
| bgBlackBright: init(100, 49), | ||
| bgRedBright: init(101, 49), | ||
| bgGreenBright: init(102, 49), | ||
| bgYellowBright: init(103, 49), | ||
| bgBlueBright: init(104, 49), | ||
| bgMagentaBright: init(105, 49), | ||
| bgCyanBright: init(106, 49), | ||
| bgWhiteBright: init(107, 49), | ||
| }; | ||
| const createColors = ({ useColor = isColorSupported } = {}) => | ||
| useColor | ||
| ? colors | ||
| : Object.keys(colors).reduce( | ||
| (colors, key) => ({ ...colors, [key]: String }), | ||
| {} | ||
| ); | ||
| createColors(); | ||
| // @see https://no-color.org | ||
| // @see https://www.npmjs.com/package/chalk | ||
| const { bold, cyan, dim, gray, green, red, underline, yellow } = createColors({ | ||
| useColor: process$1.env.FORCE_COLOR !== '0' && !process$1.env.NO_COLOR | ||
| }); | ||
| // log to stderr to keep `rollup main.js > bundle.js` from breaking | ||
| const stderr = (...args) => process$1.stderr.write(`${args.join('')}\n`); | ||
| function handleError(err, recover = false) { | ||
| let description = err.message || err; | ||
| if (err.name) | ||
| description = `${err.name}: ${description}`; | ||
| const message = (err.plugin ? `(plugin ${err.plugin}) ${description}` : description) || err; | ||
| stderr(bold(red(`[!] ${bold(message.toString())}`))); | ||
| if (err.url) { | ||
| stderr(cyan(err.url)); | ||
| } | ||
| if (err.loc) { | ||
| stderr(`${rollup.relativeId((err.loc.file || err.id))} (${err.loc.line}:${err.loc.column})`); | ||
| } | ||
| else if (err.id) { | ||
| stderr(rollup.relativeId(err.id)); | ||
| } | ||
| if (err.frame) { | ||
| stderr(dim(err.frame)); | ||
| } | ||
| if (err.stack) { | ||
| stderr(dim(err.stack)); | ||
| } | ||
| stderr(''); | ||
| if (!recover) | ||
| process$1.exit(1); | ||
| } | ||
| function batchWarnings() { | ||
@@ -183,3 +28,3 @@ let count = 0; | ||
| if (warning.code in deferredHandlers) { | ||
| rollup.getOrCreate(deferredWarnings, warning.code, () => []).push(warning); | ||
| rollup.getOrCreate(deferredWarnings, warning.code, rollup.getNewArray).push(warning); | ||
| } | ||
@@ -193,3 +38,3 @@ else if (warning.code in immediateHandlers) { | ||
| info(warning.url); | ||
| const id = (warning.loc && warning.loc.file) || warning.id; | ||
| const id = warning.loc?.file || warning.id; | ||
| if (id) { | ||
@@ -199,3 +44,3 @@ const loc = warning.loc | ||
| : rollup.relativeId(id); | ||
| stderr(bold(rollup.relativeId(loc))); | ||
| rollup.stderr(rollup.bold(rollup.relativeId(loc))); | ||
| } | ||
@@ -212,3 +57,3 @@ if (warning.frame) | ||
| return; | ||
| const codes = Array.from(deferredWarnings.keys()).sort((a, b) => deferredWarnings.get(b).length - deferredWarnings.get(a).length); | ||
| const codes = [...deferredWarnings.keys()].sort((a, b) => deferredWarnings.get(b).length - deferredWarnings.get(a).length); | ||
| for (const code of codes) { | ||
@@ -228,7 +73,7 @@ deferredHandlers[code](deferredWarnings.get(code)); | ||
| title(`Missing shims for Node.js built-ins`); | ||
| stderr(`Creating a browser bundle that depends on ${rollup.printQuotedStringList(warning.modules)}. You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`); | ||
| rollup.stderr(`Creating a browser bundle that depends on ${rollup.printQuotedStringList(warning.ids)}. You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`); | ||
| }, | ||
| UNKNOWN_OPTION(warning) { | ||
| title(`You have passed an unrecognized option`); | ||
| stderr(warning.message); | ||
| rollup.stderr(warning.message); | ||
| } | ||
@@ -241,6 +86,6 @@ }; | ||
| for (const warning of displayed) { | ||
| stderr(warning.cycle.join(' -> ')); | ||
| rollup.stderr(warning.ids.map(rollup.relativeId).join(' -> ')); | ||
| } | ||
| if (warnings.length > displayed.length) { | ||
| stderr(`...and ${warnings.length - displayed.length} more`); | ||
| rollup.stderr(`...and ${warnings.length - displayed.length} more`); | ||
| } | ||
@@ -250,7 +95,7 @@ }, | ||
| title(`Generated${warnings.length === 1 ? ' an' : ''} empty ${warnings.length > 1 ? 'chunks' : 'chunk'}`); | ||
| stderr(warnings.map(warning => warning.chunkName).join(', ')); | ||
| rollup.stderr(rollup.printQuotedStringList(warnings.map(warning => warning.names[0]))); | ||
| }, | ||
| EVAL(warnings) { | ||
| title('Use of eval is strongly discouraged'); | ||
| info('https://rollupjs.org/guide/en/#avoiding-eval'); | ||
| info(rollup.getRollupUrl(rollup.URL_AVOIDING_EVAL)); | ||
| showTruncatedWarnings(warnings); | ||
@@ -260,7 +105,7 @@ }, | ||
| title('Missing exports'); | ||
| info('https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module'); | ||
| info(rollup.getRollupUrl(rollup.URL_NAME_IS_NOT_EXPORTED)); | ||
| for (const warning of warnings) { | ||
| stderr(bold(warning.importer)); | ||
| stderr(`${warning.missing} is not exported by ${warning.exporter}`); | ||
| stderr(gray(warning.frame)); | ||
| rollup.stderr(rollup.bold(rollup.relativeId(warning.id))); | ||
| rollup.stderr(`${warning.binding} is not exported by ${rollup.relativeId(warning.exporter)}`); | ||
| rollup.stderr(rollup.gray(warning.frame)); | ||
| } | ||
@@ -270,5 +115,6 @@ }, | ||
| title(`Missing global variable ${warnings.length > 1 ? 'names' : 'name'}`); | ||
| stderr(`Use output.globals to specify browser global variable names corresponding to external modules`); | ||
| info(rollup.getRollupUrl(rollup.URL_OUTPUT_GLOBALS)); | ||
| rollup.stderr(`Use "output.globals" to specify browser global variable names corresponding to external modules:`); | ||
| for (const warning of warnings) { | ||
| stderr(`${bold(warning.source)} (guessing '${warning.guess}')`); | ||
| rollup.stderr(`${rollup.bold(warning.id)} (guessing "${warning.names[0]}")`); | ||
| } | ||
@@ -278,13 +124,13 @@ }, | ||
| title('Mixing named and default exports'); | ||
| info(`https://rollupjs.org/guide/en/#outputexports`); | ||
| stderr(bold('The following entry modules are using named and default exports together:')); | ||
| info(rollup.getRollupUrl(rollup.URL_OUTPUT_EXPORTS)); | ||
| rollup.stderr(rollup.bold('The following entry modules are using named and default exports together:')); | ||
| warnings.sort((a, b) => (a.id < b.id ? -1 : 1)); | ||
| const displayedWarnings = warnings.length > 5 ? warnings.slice(0, 3) : warnings; | ||
| for (const warning of displayedWarnings) { | ||
| stderr(rollup.relativeId(warning.id)); | ||
| rollup.stderr(rollup.relativeId(warning.id)); | ||
| } | ||
| if (displayedWarnings.length < warnings.length) { | ||
| stderr(`...and ${warnings.length - displayedWarnings.length} other entry modules`); | ||
| rollup.stderr(`...and ${warnings.length - displayedWarnings.length} other entry modules`); | ||
| } | ||
| stderr(`\nConsumers of your bundle will have to use chunk['default'] to access their default export, which may not be what you want. Use \`output.exports: 'named'\` to disable this warning`); | ||
| rollup.stderr(`\nConsumers of your bundle will have to use chunk.default to access their default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`); | ||
| }, | ||
@@ -294,11 +140,6 @@ NAMESPACE_CONFLICT(warnings) { | ||
| for (const warning of warnings) { | ||
| stderr(`"${bold(rollup.relativeId(warning.reexporter))}" re-exports "${warning.name}" from both "${rollup.relativeId(warning.sources[0])}" and "${rollup.relativeId(warning.sources[1])}" (will be ignored)`); | ||
| rollup.stderr(`"${rollup.bold(rollup.relativeId(warning.reexporter))}" re-exports "${warning.binding}" from both "${rollup.relativeId(warning.ids[0])}" and "${rollup.relativeId(warning.ids[1])}" (will be ignored).`); | ||
| } | ||
| }, | ||
| NON_EXISTENT_EXPORT(warnings) { | ||
| title(`Import of non-existent ${warnings.length > 1 ? 'exports' : 'export'}`); | ||
| showTruncatedWarnings(warnings); | ||
| }, | ||
| PLUGIN_WARNING(warnings) { | ||
| var _a; | ||
| const nestedByPlugin = nest(warnings, 'plugin'); | ||
@@ -313,3 +154,3 @@ for (const { key: plugin, items } of nestedByPlugin) { | ||
| info((lastUrl = warning.url)); | ||
| const id = warning.id || ((_a = warning.loc) === null || _a === void 0 ? void 0 : _a.file); | ||
| const id = warning.id || warning.loc?.file; | ||
| if (id) { | ||
@@ -320,3 +161,3 @@ let loc = rollup.relativeId(id); | ||
| } | ||
| stderr(bold(loc)); | ||
| rollup.stderr(rollup.bold(loc)); | ||
| } | ||
@@ -331,9 +172,9 @@ if (warning.frame) | ||
| title(`Broken sourcemap`); | ||
| info('https://rollupjs.org/guide/en/#warning-sourcemap-is-likely-to-be-incorrect'); | ||
| info(rollup.getRollupUrl(rollup.URL_SOURCEMAP_IS_LIKELY_TO_BE_INCORRECT)); | ||
| const plugins = [...new Set(warnings.map(({ plugin }) => plugin).filter(Boolean))]; | ||
| stderr(`Plugins that transform code (such as ${rollup.printQuotedStringList(plugins)}) should generate accompanying sourcemaps`); | ||
| rollup.stderr(`Plugins that transform code (such as ${rollup.printQuotedStringList(plugins)}) should generate accompanying sourcemaps.`); | ||
| }, | ||
| THIS_IS_UNDEFINED(warnings) { | ||
| title('`this` has been rewritten to `undefined`'); | ||
| info('https://rollupjs.org/guide/en/#error-this-is-undefined'); | ||
| title('"this" has been rewritten to "undefined"'); | ||
| info(rollup.getRollupUrl(rollup.URL_THIS_IS_UNDEFINED)); | ||
| showTruncatedWarnings(warnings); | ||
@@ -343,9 +184,9 @@ }, | ||
| title('Unresolved dependencies'); | ||
| info('https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency'); | ||
| info(rollup.getRollupUrl(rollup.URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY)); | ||
| const dependencies = new Map(); | ||
| for (const warning of warnings) { | ||
| rollup.getOrCreate(dependencies, warning.source, () => []).push(warning.importer); | ||
| rollup.getOrCreate(dependencies, rollup.relativeId(warning.exporter), rollup.getNewArray).push(rollup.relativeId(warning.id)); | ||
| } | ||
| for (const [dependency, importers] of dependencies) { | ||
| stderr(`${bold(dependency)} (imported by ${importers.join(', ')})`); | ||
| rollup.stderr(`${rollup.bold(dependency)} (imported by ${rollup.printQuotedStringList(importers)})`); | ||
| } | ||
@@ -356,21 +197,22 @@ }, | ||
| for (const warning of warnings) { | ||
| stderr(warning.names + | ||
| rollup.stderr(warning.names + | ||
| ' imported from external module "' + | ||
| warning.source + | ||
| warning.exporter + | ||
| '" but never used in ' + | ||
| rollup.printQuotedStringList(warning.sources.map(id => rollup.relativeId(id)))); | ||
| rollup.printQuotedStringList(warning.ids.map(rollup.relativeId)) + | ||
| '.'); | ||
| } | ||
| } | ||
| }; | ||
| function title(str) { | ||
| stderr(bold(yellow(`(!) ${str}`))); | ||
| function title(string_) { | ||
| rollup.stderr(rollup.bold(rollup.yellow(`(!) ${string_}`))); | ||
| } | ||
| function info(url) { | ||
| stderr(gray(url)); | ||
| rollup.stderr(rollup.gray(url)); | ||
| } | ||
| function nest(array, prop) { | ||
| function nest(array, property) { | ||
| const nested = []; | ||
| const lookup = new Map(); | ||
| for (const item of array) { | ||
| const key = item[prop]; | ||
| const key = item[property]; | ||
| rollup.getOrCreate(lookup, key, () => { | ||
@@ -391,10 +233,10 @@ const items = { | ||
| for (const { key: id, items } of displayedByModule) { | ||
| stderr(bold(rollup.relativeId(id))); | ||
| stderr(gray(items[0].frame)); | ||
| rollup.stderr(rollup.bold(rollup.relativeId(id))); | ||
| rollup.stderr(rollup.gray(items[0].frame)); | ||
| if (items.length > 1) { | ||
| stderr(`...and ${items.length - 1} other ${items.length > 2 ? 'occurrences' : 'occurrence'}`); | ||
| rollup.stderr(`...and ${items.length - 1} other ${items.length > 2 ? 'occurrences' : 'occurrence'}`); | ||
| } | ||
| } | ||
| if (nestedByModule.length > displayedByModule.length) { | ||
| stderr(`\n...and ${nestedByModule.length - displayedByModule.length} other files`); | ||
| rollup.stderr(`\n...and ${nestedByModule.length - displayedByModule.length} other files`); | ||
| } | ||
@@ -405,4 +247,4 @@ } | ||
| let stdinResult = null; | ||
| function stdinPlugin(arg) { | ||
| const suffix = typeof arg == 'string' && arg.length ? '.' + arg : ''; | ||
| function stdinPlugin(argument) { | ||
| const suffix = typeof argument == 'string' && argument.length > 0 ? '.' + argument : ''; | ||
| return { | ||
@@ -425,4 +267,4 @@ load(id) { | ||
| const chunks = []; | ||
| process$1.stdin.setEncoding('utf8'); | ||
| process$1.stdin | ||
| process.stdin.setEncoding('utf8'); | ||
| process.stdin | ||
| .on('data', chunk => chunks.push(chunk)) | ||
@@ -433,4 +275,4 @@ .on('end', () => { | ||
| }) | ||
| .on('error', err => { | ||
| reject(err); | ||
| .on('error', error => { | ||
| reject(error); | ||
| }); | ||
@@ -451,3 +293,3 @@ }); | ||
| if (lastAwaitedSpecifier !== specifier) { | ||
| stderr(`waiting for input ${bold(specifier)}...`); | ||
| rollup.stderr(`waiting for input ${rollup.bold(specifier)}...`); | ||
| lastAwaitedSpecifier = specifier; | ||
@@ -477,3 +319,3 @@ } | ||
| if (commandPlugin) { | ||
| const plugins = Array.isArray(commandPlugin) ? commandPlugin : [commandPlugin]; | ||
| const plugins = await rollup.normalizePluginOption(commandPlugin); | ||
| for (const plugin of plugins) { | ||
@@ -497,3 +339,3 @@ if (/[={}]/.test(plugin)) { | ||
| let plugin = null; | ||
| let pluginArg = undefined; | ||
| let pluginArgument = undefined; | ||
| if (pluginText[0] === '{') { | ||
@@ -504,3 +346,3 @@ // -p "{transform(c,i){...}}" | ||
| else { | ||
| const match = pluginText.match(/^([@.:/\\\w|^{}-]+)(=(.*))?$/); | ||
| const match = pluginText.match(/^([\w./:@\\^{|}-]+)(=(.*))?$/); | ||
| if (match) { | ||
@@ -510,3 +352,3 @@ // -p plugin | ||
| pluginText = match[1]; | ||
| pluginArg = new Function('return ' + match[3])(); | ||
| pluginArgument = new Function('return ' + match[3])(); | ||
| } | ||
@@ -516,3 +358,3 @@ else { | ||
| } | ||
| if (!/^\.|^rollup-plugin-|[@/\\]/.test(pluginText)) { | ||
| if (!/^\.|^rollup-plugin-|[/@\\]/.test(pluginText)) { | ||
| // Try using plugin prefix variations first if applicable. | ||
@@ -525,3 +367,3 @@ // Prefix order is significant - left has higher precedence. | ||
| } | ||
| catch (_a) { | ||
| catch { | ||
| // if this does not work, we try requiring the actual name below | ||
@@ -534,12 +376,12 @@ } | ||
| if (pluginText[0] == '.') | ||
| pluginText = require$$0.resolve(pluginText); | ||
| pluginText = node_path.resolve(pluginText); | ||
| // Windows absolute paths must be specified as file:// protocol URL | ||
| // Note that we do not have coverage for Windows-only code paths | ||
| else if (pluginText.match(/^[A-Za-z]:\\/)) { | ||
| pluginText = url.pathToFileURL(require$$0.resolve(pluginText)).href; | ||
| else if (/^[A-Za-z]:\\/.test(pluginText)) { | ||
| pluginText = node_url.pathToFileURL(node_path.resolve(pluginText)).href; | ||
| } | ||
| plugin = await requireOrImport(pluginText); | ||
| } | ||
| catch (err) { | ||
| throw new Error(`Cannot load plugin "${pluginText}": ${err.message}.`); | ||
| catch (error) { | ||
| throw new Error(`Cannot load plugin "${pluginText}": ${error.message}.`); | ||
| } | ||
@@ -556,8 +398,7 @@ } | ||
| } | ||
| inputOptions.plugins.push(typeof plugin === 'function' ? plugin.call(plugin, pluginArg) : plugin); | ||
| inputOptions.plugins.push(typeof plugin === 'function' ? plugin.call(plugin, pluginArgument) : plugin); | ||
| } | ||
| function getCamelizedPluginBaseName(pluginText) { | ||
| var _a; | ||
| return (((_a = pluginText.match(/(@rollup\/plugin-|rollup-plugin-)(.+)$/)) === null || _a === void 0 ? void 0 : _a[2]) || pluginText) | ||
| .split(/[\\/]/) | ||
| return (pluginText.match(/(@rollup\/plugin-|rollup-plugin-)(.+)$/)?.[2] || pluginText) | ||
| .split(/[/\\]/) | ||
| .slice(-1)[0] | ||
@@ -571,5 +412,6 @@ .split('.')[0] | ||
| try { | ||
| // eslint-disable-next-line unicorn/prefer-module | ||
| return require(pluginPath); | ||
| } | ||
| catch (_a) { | ||
| catch { | ||
| return import(pluginPath); | ||
@@ -579,7 +421,4 @@ } | ||
| function supportsNativeESM() { | ||
| return Number(/^v(\d+)/.exec(process$1.version)[1]) >= 13; | ||
| } | ||
| async function loadAndParseConfigFile(fileName, commandOptions = {}) { | ||
| const configs = await loadConfigFile(fileName, commandOptions); | ||
| const loadConfigFile = async (fileName, commandOptions = {}) => { | ||
| const configs = await getConfigList(getDefaultFromCjs(await getConfigFileExport(fileName, commandOptions)), commandOptions); | ||
| const warnings = batchWarnings(); | ||
@@ -589,3 +428,3 @@ try { | ||
| for (const config of configs) { | ||
| const options = mergeOptions.mergeOptions(config, commandOptions, warnings.add); | ||
| const options = await rollup.mergeOptions(config, commandOptions, warnings.add); | ||
| await addCommandPluginsToInputOptions(options, commandOptions); | ||
@@ -596,24 +435,54 @@ normalizedConfigs.push(options); | ||
| } | ||
| catch (err) { | ||
| catch (error_) { | ||
| warnings.flush(); | ||
| throw err; | ||
| throw error_; | ||
| } | ||
| }; | ||
| async function getConfigFileExport(fileName, commandOptions) { | ||
| if (commandOptions.configPlugin || commandOptions.bundleConfigAsCjs) { | ||
| try { | ||
| return await loadTranspiledConfigFile(fileName, commandOptions); | ||
| } | ||
| catch (error_) { | ||
| if (error_.message.includes('not defined in ES module scope')) { | ||
| return rollup.error(rollup.errorCannotBundleConfigAsEsm(error_)); | ||
| } | ||
| throw error_; | ||
| } | ||
| } | ||
| let cannotLoadEsm = false; | ||
| const handleWarning = (warning) => { | ||
| if (warning.message.includes('To load an ES module')) { | ||
| cannotLoadEsm = true; | ||
| } | ||
| }; | ||
| process.on('warning', handleWarning); | ||
| try { | ||
| const fileUrl = node_url.pathToFileURL(fileName); | ||
| if (process.env.ROLLUP_WATCH) { | ||
| // We are adding the current date to allow reloads in watch mode | ||
| fileUrl.search = `?${Date.now()}`; | ||
| } | ||
| return (await import(fileUrl.href)).default; | ||
| } | ||
| catch (error_) { | ||
| if (cannotLoadEsm) { | ||
| return rollup.error(rollup.errorCannotLoadConfigAsCjs(error_)); | ||
| } | ||
| if (error_.message.includes('not defined in ES module scope')) { | ||
| return rollup.error(rollup.errorCannotLoadConfigAsEsm(error_)); | ||
| } | ||
| throw error_; | ||
| } | ||
| finally { | ||
| process.off('warning', handleWarning); | ||
| } | ||
| } | ||
| async function loadConfigFile(fileName, commandOptions) { | ||
| const extension = require$$0.extname(fileName); | ||
| const configFileExport = commandOptions.configPlugin || | ||
| !(extension === '.cjs' || (extension === '.mjs' && supportsNativeESM())) | ||
| ? await getDefaultFromTranspiledConfigFile(fileName, commandOptions) | ||
| : extension === '.cjs' | ||
| ? getDefaultFromCjs(require(fileName)) | ||
| : (await import(url.pathToFileURL(fileName).href)).default; | ||
| return getConfigList(configFileExport, commandOptions); | ||
| } | ||
| function getDefaultFromCjs(namespace) { | ||
| return namespace.__esModule ? namespace.default : namespace; | ||
| return namespace.default || namespace; | ||
| } | ||
| async function getDefaultFromTranspiledConfigFile(fileName, commandOptions) { | ||
| async function loadTranspiledConfigFile(fileName, { bundleConfigAsCjs, configPlugin, silent }) { | ||
| const warnings = batchWarnings(); | ||
| const inputOptions = { | ||
| external: (id) => (id[0] !== '.' && !require$$0.isAbsolute(id)) || id.slice(-5, id.length) === '.json', | ||
| external: (id) => (id[0] !== '.' && !node_path.isAbsolute(id)) || id.slice(-5, id.length) === '.json', | ||
| input: fileName, | ||
@@ -624,6 +493,6 @@ onwarn: warnings.add, | ||
| }; | ||
| await addPluginsFromCommandOption(commandOptions.configPlugin, inputOptions); | ||
| await addPluginsFromCommandOption(configPlugin, inputOptions); | ||
| const bundle = await rollup.rollup(inputOptions); | ||
| if (!commandOptions.silent && warnings.count > 0) { | ||
| stderr(bold(`loaded ${rollup.relativeId(fileName)} with warnings`)); | ||
| if (!silent && warnings.count > 0) { | ||
| rollup.stderr(rollup.bold(`loaded ${rollup.relativeId(fileName)} with warnings`)); | ||
| warnings.flush(); | ||
@@ -633,3 +502,3 @@ } | ||
| exports: 'named', | ||
| format: 'cjs', | ||
| format: bundleConfigAsCjs ? 'cjs' : 'es', | ||
| plugins: [ | ||
@@ -640,6 +509,6 @@ { | ||
| if (property === 'url') { | ||
| return `'${url.pathToFileURL(moduleId).href}'`; | ||
| return `'${node_url.pathToFileURL(moduleId).href}'`; | ||
| } | ||
| if (property == null) { | ||
| return `{url:'${url.pathToFileURL(moduleId).href}'}`; | ||
| return `{url:'${node_url.pathToFileURL(moduleId).href}'}`; | ||
| } | ||
@@ -650,33 +519,12 @@ } | ||
| }); | ||
| return loadConfigFromBundledFile(fileName, code); | ||
| return loadConfigFromWrittenFile(node_path.join(node_path.dirname(fileName), `rollup.config-${Date.now()}.${bundleConfigAsCjs ? 'cjs' : 'mjs'}`), code); | ||
| } | ||
| function loadConfigFromBundledFile(fileName, bundledCode) { | ||
| const resolvedFileName = require.resolve(fileName); | ||
| const extension = require$$0.extname(resolvedFileName); | ||
| const defaultLoader = require.extensions[extension]; | ||
| require.extensions[extension] = (module, requiredFileName) => { | ||
| if (requiredFileName === resolvedFileName) { | ||
| module._compile(bundledCode, requiredFileName); | ||
| } | ||
| else { | ||
| if (defaultLoader) { | ||
| defaultLoader(module, requiredFileName); | ||
| } | ||
| } | ||
| }; | ||
| delete require.cache[resolvedFileName]; | ||
| async function loadConfigFromWrittenFile(bundledFileName, bundledCode) { | ||
| await promises.writeFile(bundledFileName, bundledCode); | ||
| try { | ||
| const config = getDefaultFromCjs(require(fileName)); | ||
| require.extensions[extension] = defaultLoader; | ||
| return config; | ||
| return (await import(node_url.pathToFileURL(bundledFileName).href)).default; | ||
| } | ||
| catch (err) { | ||
| if (err.code === 'ERR_REQUIRE_ESM') { | ||
| return rollup.error({ | ||
| code: 'TRANSPILED_ESM_CONFIG', | ||
| message: `While loading the Rollup configuration from "${rollup.relativeId(fileName)}", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.`, | ||
| url: 'https://rollupjs.org/guide/en/#using-untranspiled-config-files' | ||
| }); | ||
| } | ||
| throw err; | ||
| finally { | ||
| // Not awaiting here saves some ms while potentially hiding a non-critical error | ||
| promises.unlink(bundledFileName); | ||
| } | ||
@@ -689,7 +537,3 @@ } | ||
| if (Object.keys(config).length === 0) { | ||
| return rollup.error({ | ||
| code: 'MISSING_CONFIG', | ||
| message: 'Config file must export an options object, or an array of options objects', | ||
| url: 'https://rollupjs.org/guide/en/#configuration-files' | ||
| }); | ||
| return rollup.error(rollup.errorMissingConfig()); | ||
| } | ||
@@ -701,10 +545,4 @@ return Array.isArray(config) ? config : [config]; | ||
| exports.batchWarnings = batchWarnings; | ||
| exports.bold = bold; | ||
| exports.cyan = cyan; | ||
| exports.green = green; | ||
| exports.handleError = handleError; | ||
| exports.loadAndParseConfigFile = loadAndParseConfigFile; | ||
| exports.stderr = stderr; | ||
| exports.loadConfigFile = loadConfigFile; | ||
| exports.stdinName = stdinName; | ||
| exports.underline = underline; | ||
| //# sourceMappingURL=loadConfigFile.js.map |
+61
-48
| /* | ||
| @license | ||
| Rollup.js v2.79.1 | ||
| Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8 | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
@@ -14,4 +14,4 @@ https://github.com/rollup/rollup | ||
| const require$$0$2 = require('fs'); | ||
| const process$2 = require('process'); | ||
| const promises = require('node:fs/promises'); | ||
| const process$2 = require('node:process'); | ||
| const index = require('./index.js'); | ||
@@ -23,3 +23,5 @@ const cli = require('../bin/rollup'); | ||
| const loadConfigFile_js = require('./loadConfigFile.js'); | ||
| const child_process = require('child_process'); | ||
| const node_child_process = require('node:child_process'); | ||
| const watchProxy = require('./watch-proxy.js'); | ||
| require('fs'); | ||
| require('util'); | ||
@@ -29,7 +31,9 @@ require('stream'); | ||
| require('os'); | ||
| require('./mergeOptions.js'); | ||
| require('perf_hooks'); | ||
| require('crypto'); | ||
| require('url'); | ||
| require('./fsevents-importer.js'); | ||
| require('node:path'); | ||
| require('tty'); | ||
| require('node:perf_hooks'); | ||
| require('node:crypto'); | ||
| require('node:events'); | ||
| require('node:url'); | ||
@@ -74,5 +78,13 @@ function timeZone(date = new Date()) { | ||
| var signalExit = {exports: {}}; | ||
| var signalExitExports = {}; | ||
| var signalExit = { | ||
| get exports(){ return signalExitExports; }, | ||
| set exports(v){ signalExitExports = v; }, | ||
| }; | ||
| var signals$1 = {exports: {}}; | ||
| var signalsExports = {}; | ||
| var signals$1 = { | ||
| get exports(){ return signalsExports; }, | ||
| set exports(v){ signalsExports = v; }, | ||
| }; | ||
@@ -82,3 +94,3 @@ var hasRequiredSignals; | ||
| function requireSignals () { | ||
| if (hasRequiredSignals) return signals$1.exports; | ||
| if (hasRequiredSignals) return signalsExports; | ||
| hasRequiredSignals = 1; | ||
@@ -140,3 +152,3 @@ (function (module) { | ||
| } (signals$1)); | ||
| return signals$1.exports; | ||
| return signalsExports; | ||
| } | ||
@@ -240,3 +252,3 @@ | ||
| }; | ||
| signalExit.exports.unload = unload; | ||
| signalExitExports.unload = unload; | ||
@@ -282,3 +294,3 @@ var emit = function emit (event, code, signal) { | ||
| signalExit.exports.signals = function () { | ||
| signalExitExports.signals = function () { | ||
| return signals | ||
@@ -313,3 +325,3 @@ }; | ||
| }; | ||
| signalExit.exports.load = load; | ||
| signalExitExports.load = load; | ||
@@ -359,3 +371,3 @@ var originalProcessReallyExit = process$1.reallyExit; | ||
| if (clearScreen) { | ||
| return (heading) => loadConfigFile_js.stderr(CLEAR_SCREEN + heading); | ||
| return (heading) => rollup.stderr(CLEAR_SCREEN + heading); | ||
| } | ||
@@ -365,3 +377,3 @@ let firstRun = true; | ||
| if (firstRun) { | ||
| loadConfigFile_js.stderr(heading); | ||
| rollup.stderr(heading); | ||
| firstRun = false; | ||
@@ -377,3 +389,3 @@ } | ||
| .filter(value => typeof value === 'object') | ||
| .reduce((acc, keyValueOption) => ({ ...acc, ...keyValueOption }), {}); | ||
| .reduce((accumulator, keyValueOption) => ({ ...accumulator, ...keyValueOption }), {}); | ||
| } | ||
@@ -386,3 +398,3 @@ function createWatchHooks(command) { | ||
| if (!command.silent) { | ||
| loadConfigFile_js.stderr(loadConfigFile_js.cyan(`watch.${hook} ${loadConfigFile_js.bold(`$ ${cmd}`)}`)); | ||
| rollup.stderr(rollup.cyan(`watch.${hook} ${rollup.bold(`$ ${cmd}`)}`)); | ||
| } | ||
@@ -392,6 +404,6 @@ try { | ||
| const stdio = [process.stdin, process.stderr, process.stderr]; | ||
| child_process.execSync(cmd, { stdio: command.silent ? 'ignore' : stdio }); | ||
| node_child_process.execSync(cmd, { stdio: command.silent ? 'ignore' : stdio }); | ||
| } | ||
| catch (e) { | ||
| loadConfigFile_js.stderr(e.message); | ||
| catch (error) { | ||
| rollup.stderr(error.message); | ||
| } | ||
@@ -411,3 +423,3 @@ } | ||
| const runWatchHook = createWatchHooks(command); | ||
| signalExit.exports(close); | ||
| signalExitExports(close); | ||
| process$2.on('uncaughtException', close); | ||
@@ -425,3 +437,3 @@ if (!process$2.stdin.isTTY) { | ||
| try { | ||
| const newConfigFileData = await require$$0$2.promises.readFile(configFile, 'utf8'); | ||
| const newConfigFileData = await promises.readFile(configFile, 'utf8'); | ||
| if (newConfigFileData === configFileData) { | ||
@@ -433,6 +445,6 @@ return; | ||
| if (configFileData) { | ||
| loadConfigFile_js.stderr(`\nReloading updated config...`); | ||
| rollup.stderr(`\nReloading updated config...`); | ||
| } | ||
| configFileData = newConfigFileData; | ||
| const { options, warnings } = await loadConfigFile_js.loadAndParseConfigFile(configFile, command); | ||
| const { options, warnings } = await loadConfigFile_js.loadConfigFile(configFile, command); | ||
| if (currentConfigFileRevision !== configFileRevision) { | ||
@@ -446,4 +458,4 @@ return; | ||
| } | ||
| catch (err) { | ||
| loadConfigFile_js.handleError(err, true); | ||
| catch (error) { | ||
| rollup.handleError(error, true); | ||
| } | ||
@@ -457,19 +469,15 @@ } | ||
| const { options, warnings } = await cli.loadConfigFromCommand(command); | ||
| start(options, warnings); | ||
| await start(options, warnings); | ||
| } | ||
| function start(configs, warnings) { | ||
| try { | ||
| watcher = rollup.watch(configs); | ||
| } | ||
| catch (err) { | ||
| return loadConfigFile_js.handleError(err); | ||
| } | ||
| async function start(configs, warnings) { | ||
| watcher = watchProxy.watch(configs); | ||
| watcher.on('event', event => { | ||
| switch (event.code) { | ||
| case 'ERROR': | ||
| case 'ERROR': { | ||
| warnings.flush(); | ||
| loadConfigFile_js.handleError(event.error, true); | ||
| rollup.handleError(event.error, true); | ||
| runWatchHook('onError'); | ||
| break; | ||
| case 'START': | ||
| } | ||
| case 'START': { | ||
| if (!silent) { | ||
@@ -479,7 +487,8 @@ if (!resetScreen) { | ||
| } | ||
| resetScreen(loadConfigFile_js.underline(`rollup v${rollup.version}`)); | ||
| resetScreen(rollup.underline(`rollup v${rollup.version}`)); | ||
| } | ||
| runWatchHook('onStart'); | ||
| break; | ||
| case 'BUNDLE_START': | ||
| } | ||
| case 'BUNDLE_START': { | ||
| if (!silent) { | ||
@@ -492,10 +501,11 @@ let input = event.input; | ||
| } | ||
| loadConfigFile_js.stderr(loadConfigFile_js.cyan(`bundles ${loadConfigFile_js.bold(input)} → ${loadConfigFile_js.bold(event.output.map(rollup.relativeId).join(', '))}...`)); | ||
| rollup.stderr(rollup.cyan(`bundles ${rollup.bold(input)} → ${rollup.bold(event.output.map(rollup.relativeId).join(', '))}...`)); | ||
| } | ||
| runWatchHook('onBundleStart'); | ||
| break; | ||
| case 'BUNDLE_END': | ||
| } | ||
| case 'BUNDLE_END': { | ||
| warnings.flush(); | ||
| if (!silent) | ||
| loadConfigFile_js.stderr(loadConfigFile_js.green(`created ${loadConfigFile_js.bold(event.output.map(rollup.relativeId).join(', '))} in ${loadConfigFile_js.bold(cli.ms(event.duration))}`)); | ||
| rollup.stderr(rollup.green(`created ${rollup.bold(event.output.map(rollup.relativeId).join(', '))} in ${rollup.bold(cli.prettyMilliseconds(event.duration))}`)); | ||
| runWatchHook('onBundleEnd'); | ||
@@ -506,10 +516,12 @@ if (event.result && event.result.getTimings) { | ||
| break; | ||
| case 'END': | ||
| } | ||
| case 'END': { | ||
| runWatchHook('onEnd'); | ||
| if (!silent && isTTY) { | ||
| loadConfigFile_js.stderr(`\n[${dateTime()}] waiting for changes...`); | ||
| rollup.stderr(`\n[${dateTime()}] waiting for changes...`); | ||
| } | ||
| } | ||
| } | ||
| if ('result' in event && event.result) { | ||
| event.result.close().catch(error => loadConfigFile_js.handleError(error, true)); | ||
| event.result.close().catch(error => rollup.handleError(error, true)); | ||
| } | ||
@@ -527,2 +539,3 @@ }); | ||
| if (code) { | ||
| // eslint-disable-next-line unicorn/no-process-exit | ||
| process$2.exit(code); | ||
@@ -529,0 +542,0 @@ } |
+45
-35
| /* | ||
| @license | ||
| Rollup.js v2.79.1 | ||
| Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8 | ||
| Rollup.js v3.20.2 | ||
| Fri, 24 Mar 2023 06:17:57 GMT - commit 1517d0360d66893d5cacdbaf7bc9d841c1c38069 | ||
@@ -14,14 +14,19 @@ https://github.com/rollup/rollup | ||
| const require$$0 = require('path'); | ||
| const process = require('process'); | ||
| const node_path = require('node:path'); | ||
| const process = require('node:process'); | ||
| const rollup = require('./rollup.js'); | ||
| const mergeOptions = require('./mergeOptions.js'); | ||
| const require$$2 = require('os'); | ||
| const node_os = require('node:os'); | ||
| const index = require('./index.js'); | ||
| require('perf_hooks'); | ||
| require('crypto'); | ||
| require('tty'); | ||
| require('path'); | ||
| require('node:perf_hooks'); | ||
| require('node:crypto'); | ||
| require('node:fs/promises'); | ||
| require('node:events'); | ||
| require('fs'); | ||
| require('events'); | ||
| require('util'); | ||
| require('stream'); | ||
| require('os'); | ||
| require('./fsevents-importer.js'); | ||
| require('events'); | ||
@@ -50,5 +55,4 @@ class FileWatcher { | ||
| watch(id, isTransformDependency) { | ||
| var _a; | ||
| if (isTransformDependency) { | ||
| const watcher = (_a = this.transformWatchers.get(id)) !== null && _a !== void 0 ? _a : this.createWatcher(id); | ||
| const watcher = this.transformWatchers.get(id) ?? this.createWatcher(id); | ||
| watcher.add(id); | ||
@@ -63,3 +67,3 @@ this.transformWatchers.set(id, watcher); | ||
| const task = this.task; | ||
| const isLinux = require$$2.platform() === 'linux'; | ||
| const isLinux = node_os.platform() === 'linux'; | ||
| const isTransformDependency = transformWatcherId !== null; | ||
@@ -104,5 +108,6 @@ const handleChange = (id, event) => { | ||
| class Watcher { | ||
| constructor(configs, emitter) { | ||
| constructor(optionsList, emitter) { | ||
| this.buildDelay = 0; | ||
| this.buildTimeout = null; | ||
| this.closed = false; | ||
| this.invalidatedIds = new Map(); | ||
@@ -113,9 +118,14 @@ this.rerun = false; | ||
| emitter.close = this.close.bind(this); | ||
| this.tasks = configs.map(config => new Task(this, config)); | ||
| this.buildDelay = configs.reduce((buildDelay, { watch }) => watch && typeof watch.buildDelay === 'number' | ||
| ? Math.max(buildDelay, watch.buildDelay) | ||
| : buildDelay, this.buildDelay); | ||
| this.tasks = optionsList.map(options => new Task(this, options)); | ||
| for (const { watch } of optionsList) { | ||
| if (watch && typeof watch.buildDelay === 'number') { | ||
| this.buildDelay = Math.max(this.buildDelay, watch.buildDelay); | ||
| } | ||
| } | ||
| process.nextTick(() => this.run()); | ||
| } | ||
| async close() { | ||
| if (this.closed) | ||
| return; | ||
| this.closed = true; | ||
| if (this.buildTimeout) | ||
@@ -126,3 +136,3 @@ clearTimeout(this.buildTimeout); | ||
| } | ||
| await this.emitter.emitAndAwait('close'); | ||
| await this.emitter.emit('close'); | ||
| this.emitter.removeAllListeners(); | ||
@@ -132,4 +142,4 @@ } | ||
| if (file) { | ||
| const prevEvent = this.invalidatedIds.get(file.id); | ||
| const event = prevEvent ? eventsRewrites[prevEvent][file.event] : file.event; | ||
| const previousEvent = this.invalidatedIds.get(file.id); | ||
| const event = previousEvent ? eventsRewrites[previousEvent][file.event] : file.event; | ||
| if (event === 'buggy') { | ||
@@ -155,6 +165,6 @@ //TODO: throws or warn? Currently just ignore, uses new event | ||
| try { | ||
| await Promise.all([...this.invalidatedIds].map(([id, event]) => this.emitter.emitAndAwait('change', id, { event }))); | ||
| await Promise.all([...this.invalidatedIds].map(([id, event]) => this.emitter.emit('change', id, { event }))); | ||
| this.invalidatedIds.clear(); | ||
| this.emitter.emit('restart'); | ||
| this.emitter.removeAwaited(); | ||
| await this.emitter.emit('restart'); | ||
| this.emitter.removeListenersForCurrentRun(); | ||
| this.run(); | ||
@@ -164,3 +174,3 @@ } | ||
| this.invalidatedIds.clear(); | ||
| this.emitter.emit('event', { | ||
| await this.emitter.emit('event', { | ||
| code: 'ERROR', | ||
@@ -170,3 +180,3 @@ error, | ||
| }); | ||
| this.emitter.emit('event', { | ||
| await this.emitter.emit('event', { | ||
| code: 'END' | ||
@@ -179,3 +189,3 @@ }); | ||
| this.running = true; | ||
| this.emitter.emit('event', { | ||
| await this.emitter.emit('event', { | ||
| code: 'START' | ||
@@ -187,3 +197,3 @@ }); | ||
| this.running = false; | ||
| this.emitter.emit('event', { | ||
| await this.emitter.emit('event', { | ||
| code: 'END' | ||
@@ -198,3 +208,3 @@ }); | ||
| class Task { | ||
| constructor(watcher, config) { | ||
| constructor(watcher, options) { | ||
| this.cache = { modules: [] }; | ||
@@ -206,8 +216,8 @@ this.watchFiles = []; | ||
| this.watcher = watcher; | ||
| this.skipWrite = Boolean(config.watch && config.watch.skipWrite); | ||
| this.options = mergeOptions.mergeOptions(config); | ||
| this.options = options; | ||
| this.skipWrite = Boolean(options.watch && options.watch.skipWrite); | ||
| this.outputs = this.options.output; | ||
| this.outputFiles = this.outputs.map(output => { | ||
| if (output.file || output.dir) | ||
| return require$$0.resolve(output.file || output.dir); | ||
| return node_path.resolve(output.file || output.dir); | ||
| return undefined; | ||
@@ -248,3 +258,3 @@ }); | ||
| const start = Date.now(); | ||
| this.watcher.emitter.emit('event', { | ||
| await this.watcher.emitter.emit('event', { | ||
| code: 'BUNDLE_START', | ||
@@ -262,3 +272,3 @@ input: this.options.input, | ||
| this.skipWrite || (await Promise.all(this.outputs.map(output => result.write(output)))); | ||
| this.watcher.emitter.emit('event', { | ||
| await this.watcher.emitter.emit('event', { | ||
| code: 'BUNDLE_END', | ||
@@ -282,3 +292,3 @@ duration: Date.now() - start, | ||
| } | ||
| this.watcher.emitter.emit('event', { | ||
| await this.watcher.emitter.emit('event', { | ||
| code: 'ERROR', | ||
@@ -313,3 +323,3 @@ error, | ||
| this.watched.add(id); | ||
| if (this.outputFiles.some(file => file === id)) { | ||
| if (this.outputFiles.includes(id)) { | ||
| throw new Error('Cannot import the generated bundle'); | ||
@@ -316,0 +326,0 @@ } |
+72
-80
@@ -19,2 +19,31 @@ # Rollup core license | ||
| # Bundled dependencies: | ||
| ## @jridgewell/sourcemap-codec | ||
| License: MIT | ||
| By: Rich Harris | ||
| Repository: git+https://github.com/jridgewell/sourcemap-codec.git | ||
| > The MIT License | ||
| > | ||
| > Copyright (c) 2015 Rich Harris | ||
| > | ||
| > Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| > of this software and associated documentation files (the "Software"), to deal | ||
| > in the Software without restriction, including without limitation the rights | ||
| > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| > copies of the Software, and to permit persons to whom the Software is | ||
| > furnished to do so, subject to the following conditions: | ||
| > | ||
| > The above copyright notice and this permission notice shall be included in | ||
| > all copies or substantial portions of the Software. | ||
| > | ||
| > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| > THE SOFTWARE. | ||
| --------------------------------------- | ||
| ## @rollup/pluginutils | ||
@@ -56,2 +85,9 @@ License: MIT | ||
| ## acorn-import-assertions | ||
| License: MIT | ||
| By: Sven Sauleau | ||
| Repository: https://github.com/xtuc/acorn-import-assertions | ||
| --------------------------------------- | ||
| ## acorn-walk | ||
@@ -155,2 +191,19 @@ License: MIT | ||
| ## builtin-modules | ||
| License: MIT | ||
| By: Sindre Sorhus | ||
| Repository: sindresorhus/builtin-modules | ||
| > MIT License | ||
| > | ||
| > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
| > | ||
| > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
| > | ||
| > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
| > | ||
| > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| --------------------------------------- | ||
| ## chokidar | ||
@@ -246,2 +299,19 @@ License: MIT | ||
| ## flru | ||
| License: MIT | ||
| By: Luke Edwards | ||
| Repository: lukeed/flru | ||
| > MIT License | ||
| > | ||
| > Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com) | ||
| > | ||
| > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
| > | ||
| > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
| > | ||
| > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| --------------------------------------- | ||
| ## glob-parent | ||
@@ -270,31 +340,2 @@ License: ISC | ||
| ## hash.js | ||
| License: MIT | ||
| By: Fedor Indutny | ||
| Repository: git@github.com:indutny/hash.js | ||
| --------------------------------------- | ||
| ## inherits | ||
| License: ISC | ||
| Repository: git://github.com/isaacs/inherits | ||
| > The ISC License | ||
| > | ||
| > Copyright (c) Isaac Z. Schlueter | ||
| > | ||
| > Permission to use, copy, modify, and/or distribute this software for any | ||
| > purpose with or without fee is hereby granted, provided that the above | ||
| > copyright notice and this permission notice appear in all copies. | ||
| > | ||
| > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
| > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
| > FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
| > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
| > OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
| > PERFORMANCE OF THIS SOFTWARE. | ||
| --------------------------------------- | ||
| ## is-binary-path | ||
@@ -433,22 +474,2 @@ License: MIT | ||
| ## minimalistic-assert | ||
| License: ISC | ||
| Repository: https://github.com/calvinmetcalf/minimalistic-assert.git | ||
| > Copyright 2015 Calvin Metcalf | ||
| > | ||
| > Permission to use, copy, modify, and/or distribute this software for any purpose | ||
| > with or without fee is hereby granted, provided that the above copyright notice | ||
| > and this permission notice appear in all copies. | ||
| > | ||
| > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
| > REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
| > FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
| > INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| > LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | ||
| > OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
| > PERFORMANCE OF THIS SOFTWARE. | ||
| --------------------------------------- | ||
| ## normalize-path | ||
@@ -490,3 +511,3 @@ License: MIT | ||
| > | ||
| > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | ||
| > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
| > | ||
@@ -554,3 +575,3 @@ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
| > | ||
| > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | ||
| > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
| > | ||
@@ -618,31 +639,2 @@ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
| ## sourcemap-codec | ||
| License: MIT | ||
| By: Rich Harris | ||
| Repository: https://github.com/Rich-Harris/sourcemap-codec | ||
| > The MIT License | ||
| > | ||
| > Copyright (c) 2015 Rich Harris | ||
| > | ||
| > Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| > of this software and associated documentation files (the "Software"), to deal | ||
| > in the Software without restriction, including without limitation the rights | ||
| > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| > copies of the Software, and to permit persons to whom the Software is | ||
| > furnished to do so, subject to the following conditions: | ||
| > | ||
| > The above copyright notice and this permission notice shall be included in | ||
| > all copies or substantial portions of the Software. | ||
| > | ||
| > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| > THE SOFTWARE. | ||
| --------------------------------------- | ||
| ## time-zone | ||
@@ -649,0 +641,0 @@ License: MIT |
+92
-63
| { | ||
| "name": "rollup", | ||
| "version": "2.79.1", | ||
| "version": "3.20.2", | ||
| "description": "Next-generation ES module bundler", | ||
| "main": "dist/rollup.js", | ||
| "module": "dist/es/rollup.js", | ||
| "typings": "dist/rollup.d.ts", | ||
| "types": "dist/rollup.d.ts", | ||
| "bin": { | ||
@@ -12,23 +12,28 @@ "rollup": "dist/bin/rollup" | ||
| "scripts": { | ||
| "build": "shx rm -rf dist && node scripts/update-git-commit.js && rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup", | ||
| "build:cjs": "shx rm -rf dist && rollup --config rollup.config.ts --configPlugin typescript --configTest && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup", | ||
| "build:bootstrap": "node dist/bin/rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup && cp -r dist browser/", | ||
| "ci:lint": "npm run lint:nofix", | ||
| "build": "rollup --config rollup.config.ts --configPlugin typescript", | ||
| "dev": "vitepress dev docs", | ||
| "build:cjs": "rollup --config rollup.config.ts --configPlugin typescript --configTest", | ||
| "build:bootstrap": "node dist/bin/rollup --config rollup.config.ts --configPlugin typescript", | ||
| "build:docs": "vitepress build docs", | ||
| "preview:docs": "vitepress preview docs", | ||
| "ci:lint": "concurrently 'npm:lint:js:nofix' 'npm:lint:markdown:nofix'", | ||
| "ci:test": "npm run build:cjs && npm run build:bootstrap && npm run test:all", | ||
| "ci:test:only": "npm run build:cjs && npm run build:bootstrap && npm run test:only", | ||
| "ci:coverage": "npm run build:cjs && npm run build:bootstrap && nyc --reporter lcovonly mocha", | ||
| "lint": "eslint . --fix --cache && prettier --write \"**/*.md\"", | ||
| "lint:nofix": "eslint . --cache && prettier --check \"**/*.md\"", | ||
| "lint": "concurrently -c red,green 'npm:lint:js' 'npm:lint:markdown'", | ||
| "lint:js": "eslint . --fix --cache", | ||
| "lint:js:nofix": "eslint . --cache", | ||
| "lint:markdown": "prettier --write \"**/*.md\"", | ||
| "lint:markdown:nofix": "prettier --check \"**/*.md\"", | ||
| "perf": "npm run build:cjs && node --expose-gc scripts/perf.js", | ||
| "perf:debug": "node --inspect-brk scripts/perf-debug.js", | ||
| "perf:init": "node scripts/perf-init.js", | ||
| "postpublish": "git push && git push --tags", | ||
| "prepare": "husky install && npm run build", | ||
| "prepublishOnly": "git pull --ff-only && npm ci && npm run lint:nofix && npm run security && npm run build:bootstrap && npm run test:all", | ||
| "security": "npm audit", | ||
| "prepare": "husky install && node scripts/check-release.js || npm run build", | ||
| "prepublishOnly": "node scripts/check-release.js", | ||
| "release": "node scripts/release.js", | ||
| "release:docs": "git fetch --update-head-ok origin master:master && git branch --force documentation-published master && git push origin documentation-published", | ||
| "test": "npm run build && npm run test:all", | ||
| "test:update-snapshots": "node scripts/update-snapshots.js", | ||
| "test:cjs": "npm run build:cjs && npm run test:only", | ||
| "test:quick": "mocha -b test/test.js", | ||
| "test:all": "npm run test:only && npm run test:browser && npm run test:typescript && npm run test:leak && npm run test:package", | ||
| "test:all": "concurrently --kill-others-on-fail -c green,blue,magenta,cyan,red 'npm:test:only' 'npm:test:browser' 'npm:test:typescript' 'npm:test:leak' 'npm:test:package' 'npm:test:options'", | ||
| "test:coverage": "npm run build:cjs && shx rm -rf coverage/* && nyc --reporter html mocha test/test.js", | ||
@@ -38,2 +43,3 @@ "test:coverage:browser": "npm run build && shx rm -rf coverage/* && nyc mocha test/browser/index.js", | ||
| "test:package": "node scripts/test-package.js", | ||
| "test:options": "node scripts/test-options.js", | ||
| "test:only": "mocha test/test.js", | ||
@@ -62,50 +68,69 @@ "test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit", | ||
| "devDependencies": { | ||
| "@rollup/plugin-alias": "^3.1.9", | ||
| "@rollup/plugin-buble": "^0.21.3", | ||
| "@rollup/plugin-commonjs": "^22.0.1", | ||
| "@rollup/plugin-json": "^4.1.0", | ||
| "@rollup/plugin-node-resolve": "^13.3.0", | ||
| "@rollup/plugin-replace": "^4.0.0", | ||
| "@rollup/plugin-typescript": "^8.3.3", | ||
| "@rollup/pluginutils": "^4.2.1", | ||
| "@types/estree": "0.0.52", | ||
| "@types/node": "^10.17.60", | ||
| "@codemirror/commands": "^6.2.1", | ||
| "@codemirror/lang-javascript": "^6.1.4", | ||
| "@codemirror/language": "^6.6.0", | ||
| "@codemirror/search": "^6.2.3", | ||
| "@codemirror/state": "^6.2.0", | ||
| "@codemirror/view": "^6.9.2", | ||
| "@jridgewell/sourcemap-codec": "^1.4.14", | ||
| "@mermaid-js/mermaid-cli": "^10.0.2", | ||
| "@rollup/plugin-alias": "^4.0.3", | ||
| "@rollup/plugin-buble": "^1.0.2", | ||
| "@rollup/plugin-commonjs": "^24.0.1", | ||
| "@rollup/plugin-json": "^6.0.0", | ||
| "@rollup/plugin-node-resolve": "^15.0.1", | ||
| "@rollup/plugin-replace": "^5.0.2", | ||
| "@rollup/plugin-terser": "^0.4.0", | ||
| "@rollup/plugin-typescript": "^11.0.0", | ||
| "@rollup/pluginutils": "^5.0.2", | ||
| "@types/estree": "1.0.0", | ||
| "@types/node": "^14.18.36", | ||
| "@types/signal-exit": "^3.0.1", | ||
| "@types/yargs-parser": "^20.2.2", | ||
| "@typescript-eslint/eslint-plugin": "^5.30.7", | ||
| "@typescript-eslint/parser": "^5.30.7", | ||
| "acorn": "^8.7.1", | ||
| "@types/yargs-parser": "^21.0.0", | ||
| "@typescript-eslint/eslint-plugin": "^5.54.1", | ||
| "@typescript-eslint/parser": "^5.54.1", | ||
| "@vue/eslint-config-prettier": "^7.1.0", | ||
| "@vue/eslint-config-typescript": "^11.0.2", | ||
| "acorn": "^8.8.2", | ||
| "acorn-import-assertions": "^1.8.0", | ||
| "acorn-jsx": "^5.3.2", | ||
| "acorn-walk": "^8.2.0", | ||
| "buble": "^0.20.0", | ||
| "builtin-modules": "^3.3.0", | ||
| "chokidar": "^3.5.3", | ||
| "colorette": "^2.0.19", | ||
| "core-js": "^3.23.5", | ||
| "concurrently": "^7.6.0", | ||
| "core-js": "^3.29.0", | ||
| "date-time": "^4.0.0", | ||
| "es5-shim": "^4.6.7", | ||
| "es6-shim": "^0.35.6", | ||
| "eslint": "^8.20.0", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-import": "^2.26.0", | ||
| "es6-shim": "^0.35.7", | ||
| "eslint": "^8.35.0", | ||
| "eslint-config-prettier": "^8.7.0", | ||
| "eslint-plugin-import": "^2.27.5", | ||
| "eslint-plugin-prettier": "^4.2.1", | ||
| "execa": "^5.1.1", | ||
| "fixturify": "^2.1.1", | ||
| "fs-extra": "^10.1.0", | ||
| "eslint-plugin-unicorn": "^46.0.0", | ||
| "eslint-plugin-vue": "^9.9.0", | ||
| "fixturify": "^3.0.0", | ||
| "flru": "^1.0.2", | ||
| "fs-extra": "^11.1.0", | ||
| "github-api": "^3.4.0", | ||
| "hash.js": "^1.1.7", | ||
| "husky": "^7.0.4", | ||
| "is-reference": "^3.0.0", | ||
| "lint-staged": "^10.5.4", | ||
| "husky": "^8.0.3", | ||
| "inquirer": "^9.1.4", | ||
| "is-reference": "^3.0.1", | ||
| "lint-staged": "^13.1.2", | ||
| "locate-character": "^2.0.5", | ||
| "magic-string": "^0.26.2", | ||
| "mocha": "^9.2.2", | ||
| "magic-string": "^0.30.0", | ||
| "mocha": "^10.2.0", | ||
| "nyc": "^15.1.0", | ||
| "prettier": "^2.7.1", | ||
| "pretty-bytes": "^5.6.0", | ||
| "pretty-ms": "^7.0.1", | ||
| "pinia": "^2.0.33", | ||
| "prettier": "^2.8.4", | ||
| "pretty-bytes": "^6.1.0", | ||
| "pretty-ms": "^8.0.0", | ||
| "requirejs": "^2.3.6", | ||
| "rollup": "^2.77.0", | ||
| "rollup-plugin-license": "^2.8.1", | ||
| "rollup": "^3.18.0", | ||
| "rollup-plugin-license": "^3.0.1", | ||
| "rollup-plugin-string": "^3.0.0", | ||
| "rollup-plugin-terser": "^7.0.2", | ||
| "rollup-plugin-thatworks": "^1.0.4", | ||
| "semver": "^7.3.8", | ||
| "shx": "^0.3.4", | ||
@@ -115,10 +140,14 @@ "signal-exit": "^3.0.7", | ||
| "source-map-support": "^0.5.21", | ||
| "sourcemap-codec": "^1.4.8", | ||
| "systemjs": "^6.12.1", | ||
| "terser": "^5.14.2", | ||
| "tslib": "^2.4.0", | ||
| "typescript": "^4.7.4", | ||
| "systemjs": "^6.14.0", | ||
| "terser": "^5.16.5", | ||
| "tslib": "^2.5.0", | ||
| "typescript": "^4.9.5", | ||
| "vitepress": "^1.0.0-alpha.50", | ||
| "vue": "^3.2.47", | ||
| "weak-napi": "^2.0.2", | ||
| "yargs-parser": "^20.2.9" | ||
| "yargs-parser": "^21.1.1" | ||
| }, | ||
| "overrides": { | ||
| "d3": "7.8.0" | ||
| }, | ||
| "files": [ | ||
@@ -128,7 +157,7 @@ "dist/**/*.js", | ||
| "dist/bin/rollup", | ||
| "dist/es/package.json", | ||
| "dist/rollup.browser.js.map" | ||
| "dist/es/package.json" | ||
| ], | ||
| "engines": { | ||
| "node": ">=10.0.0" | ||
| "node": ">=14.18.0", | ||
| "npm": ">=8.0.0" | ||
| }, | ||
@@ -138,12 +167,12 @@ "exports": { | ||
| "types": "./dist/rollup.d.ts", | ||
| "node": { | ||
| "require": "./dist/rollup.js", | ||
| "import": "./dist/es/rollup.js" | ||
| }, | ||
| "default": "./dist/es/rollup.browser.js" | ||
| "require": "./dist/rollup.js", | ||
| "import": "./dist/es/rollup.js" | ||
| }, | ||
| "./loadConfigFile": "./dist/loadConfigFile.js", | ||
| "./dist/loadConfigFile": "./dist/loadConfigFile.js", | ||
| "./loadConfigFile": { | ||
| "types": "./dist/loadConfigFile.d.ts", | ||
| "require": "./dist/loadConfigFile.js", | ||
| "default": "./dist/loadConfigFile.js" | ||
| }, | ||
| "./dist/*": "./dist/*" | ||
| } | ||
| } |
+5
-5
| <p align="center"> | ||
| <a href="https://rollupjs.org/"><img src="https://rollupjs.org/logo.svg" width="150" /></a> | ||
| <a href="https://rollupjs.org/"><img src="https://rollupjs.org/rollup-logo.svg" width="150" /></a> | ||
| </p> | ||
@@ -38,3 +38,3 @@ | ||
| 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/). | ||
| Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/command-line-interface/) with an optional configuration file or else through its [JavaScript API](https://rollupjs.org/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/introduction/). | ||
@@ -80,3 +80,3 @@ ### Commands | ||
| // import the entire utils object with CommonJS | ||
| var utils = require('utils'); | ||
| var utils = require('node:utils'); | ||
| var query = 'Rollup'; | ||
@@ -91,3 +91,3 @@ // use the ajax method of the utils object | ||
| // import the ajax function with an ES import statement | ||
| import { ajax } from 'utils'; | ||
| import { ajax } from 'node:utils'; | ||
| var query = 'Rollup'; | ||
@@ -124,3 +124,3 @@ // call the ajax function | ||
| <a href="https://opencollective.com/rollup/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/2/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/3/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/4/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/5/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/6/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/7/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/8/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/9/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/9/avatar.svg"></a> | ||
| <a href="https://opencollective.com/rollup/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/2/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/3/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/4/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/5/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/6/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/7/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/8/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/9/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/10/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/10/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/11/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/11/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/12/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/12/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/13/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/13/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/14/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/14/avatar.svg"></a> | ||
@@ -127,0 +127,0 @@ ## License |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| /* | ||
| @license | ||
| Rollup.js v2.79.1 | ||
| Thu, 22 Sep 2022 04:55:29 GMT - commit 69ff4181e701a0fe0026d0ba147f31bc86beffa8 | ||
| https://github.com/rollup/rollup | ||
| Released under the MIT License. | ||
| */ | ||
| 'use strict'; | ||
| const rollup = require('./rollup.js'); | ||
| const commandAliases = { | ||
| c: 'config', | ||
| d: 'dir', | ||
| e: 'external', | ||
| f: 'format', | ||
| g: 'globals', | ||
| h: 'help', | ||
| i: 'input', | ||
| m: 'sourcemap', | ||
| n: 'name', | ||
| o: 'file', | ||
| p: 'plugin', | ||
| v: 'version', | ||
| w: 'watch' | ||
| }; | ||
| function mergeOptions(config, rawCommandOptions = { external: [], globals: undefined }, defaultOnWarnHandler = rollup.defaultOnWarn) { | ||
| const command = getCommandOptions(rawCommandOptions); | ||
| const inputOptions = mergeInputOptions(config, command, defaultOnWarnHandler); | ||
| const warn = inputOptions.onwarn; | ||
| if (command.output) { | ||
| Object.assign(command, command.output); | ||
| } | ||
| const outputOptionsArray = rollup.ensureArray(config.output); | ||
| if (outputOptionsArray.length === 0) | ||
| outputOptionsArray.push({}); | ||
| const outputOptions = outputOptionsArray.map(singleOutputOptions => mergeOutputOptions(singleOutputOptions, command, warn)); | ||
| rollup.warnUnknownOptions(command, Object.keys(inputOptions).concat(Object.keys(outputOptions[0]).filter(option => option !== 'sourcemapPathTransform'), Object.keys(commandAliases), 'config', 'environment', 'plugin', 'silent', 'failAfterWarnings', 'stdin', 'waitForBundleInput', 'configPlugin'), 'CLI flags', warn, /^_$|output$|config/); | ||
| inputOptions.output = outputOptions; | ||
| return inputOptions; | ||
| } | ||
| function getCommandOptions(rawCommandOptions) { | ||
| const external = rawCommandOptions.external && typeof rawCommandOptions.external === 'string' | ||
| ? rawCommandOptions.external.split(',') | ||
| : []; | ||
| return { | ||
| ...rawCommandOptions, | ||
| external, | ||
| globals: typeof rawCommandOptions.globals === 'string' | ||
| ? rawCommandOptions.globals.split(',').reduce((globals, globalDefinition) => { | ||
| const [id, variableName] = globalDefinition.split(':'); | ||
| globals[id] = variableName; | ||
| if (!external.includes(id)) { | ||
| external.push(id); | ||
| } | ||
| return globals; | ||
| }, Object.create(null)) | ||
| : undefined | ||
| }; | ||
| } | ||
| function mergeInputOptions(config, overrides, defaultOnWarnHandler) { | ||
| const getOption = (name) => { var _a; return (_a = overrides[name]) !== null && _a !== void 0 ? _a : config[name]; }; | ||
| const inputOptions = { | ||
| acorn: getOption('acorn'), | ||
| acornInjectPlugins: config.acornInjectPlugins, | ||
| cache: config.cache, | ||
| context: getOption('context'), | ||
| experimentalCacheExpiry: getOption('experimentalCacheExpiry'), | ||
| external: getExternal(config, overrides), | ||
| inlineDynamicImports: getOption('inlineDynamicImports'), | ||
| input: getOption('input') || [], | ||
| makeAbsoluteExternalsRelative: getOption('makeAbsoluteExternalsRelative'), | ||
| manualChunks: getOption('manualChunks'), | ||
| maxParallelFileOps: getOption('maxParallelFileOps'), | ||
| maxParallelFileReads: getOption('maxParallelFileReads'), | ||
| moduleContext: getOption('moduleContext'), | ||
| onwarn: getOnWarn(config, defaultOnWarnHandler), | ||
| perf: getOption('perf'), | ||
| plugins: rollup.ensureArray(config.plugins), | ||
| preserveEntrySignatures: getOption('preserveEntrySignatures'), | ||
| preserveModules: getOption('preserveModules'), | ||
| preserveSymlinks: getOption('preserveSymlinks'), | ||
| shimMissingExports: getOption('shimMissingExports'), | ||
| strictDeprecations: getOption('strictDeprecations'), | ||
| treeshake: getObjectOption(config, overrides, 'treeshake', rollup.objectifyOptionWithPresets(rollup.treeshakePresets, 'treeshake', 'false, true, ')), | ||
| watch: getWatch(config, overrides) | ||
| }; | ||
| rollup.warnUnknownOptions(config, Object.keys(inputOptions), 'input options', inputOptions.onwarn, /^output$/); | ||
| return inputOptions; | ||
| } | ||
| const getExternal = (config, overrides) => { | ||
| const configExternal = config.external; | ||
| return typeof configExternal === 'function' | ||
| ? (source, importer, isResolved) => configExternal(source, importer, isResolved) || overrides.external.includes(source) | ||
| : rollup.ensureArray(configExternal).concat(overrides.external); | ||
| }; | ||
| const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn | ||
| ? warning => config.onwarn(warning, defaultOnWarnHandler) | ||
| : defaultOnWarnHandler; | ||
| const getObjectOption = (config, overrides, name, objectifyValue = rollup.objectifyOption) => { | ||
| const commandOption = normalizeObjectOptionValue(overrides[name], objectifyValue); | ||
| const configOption = normalizeObjectOptionValue(config[name], objectifyValue); | ||
| if (commandOption !== undefined) { | ||
| return commandOption && { ...configOption, ...commandOption }; | ||
| } | ||
| return configOption; | ||
| }; | ||
| const getWatch = (config, overrides) => config.watch !== false && getObjectOption(config, overrides, 'watch'); | ||
| const isWatchEnabled = (optionValue) => { | ||
| if (Array.isArray(optionValue)) { | ||
| return optionValue.reduce((result, value) => (typeof value === 'boolean' ? value : result), false); | ||
| } | ||
| return optionValue === true; | ||
| }; | ||
| const normalizeObjectOptionValue = (optionValue, objectifyValue) => { | ||
| if (!optionValue) { | ||
| return optionValue; | ||
| } | ||
| if (Array.isArray(optionValue)) { | ||
| return optionValue.reduce((result, value) => value && result && { ...result, ...objectifyValue(value) }, {}); | ||
| } | ||
| return objectifyValue(optionValue); | ||
| }; | ||
| function mergeOutputOptions(config, overrides, warn) { | ||
| const getOption = (name) => { var _a; return (_a = overrides[name]) !== null && _a !== void 0 ? _a : config[name]; }; | ||
| const outputOptions = { | ||
| amd: getObjectOption(config, overrides, 'amd'), | ||
| assetFileNames: getOption('assetFileNames'), | ||
| banner: getOption('banner'), | ||
| chunkFileNames: getOption('chunkFileNames'), | ||
| compact: getOption('compact'), | ||
| dir: getOption('dir'), | ||
| dynamicImportFunction: getOption('dynamicImportFunction'), | ||
| entryFileNames: getOption('entryFileNames'), | ||
| esModule: getOption('esModule'), | ||
| exports: getOption('exports'), | ||
| extend: getOption('extend'), | ||
| externalLiveBindings: getOption('externalLiveBindings'), | ||
| file: getOption('file'), | ||
| footer: getOption('footer'), | ||
| format: getOption('format'), | ||
| freeze: getOption('freeze'), | ||
| generatedCode: getObjectOption(config, overrides, 'generatedCode', rollup.objectifyOptionWithPresets(rollup.generatedCodePresets, 'output.generatedCode', '')), | ||
| globals: getOption('globals'), | ||
| hoistTransitiveImports: getOption('hoistTransitiveImports'), | ||
| indent: getOption('indent'), | ||
| inlineDynamicImports: getOption('inlineDynamicImports'), | ||
| interop: getOption('interop'), | ||
| intro: getOption('intro'), | ||
| manualChunks: getOption('manualChunks'), | ||
| minifyInternalExports: getOption('minifyInternalExports'), | ||
| name: getOption('name'), | ||
| namespaceToStringTag: getOption('namespaceToStringTag'), | ||
| noConflict: getOption('noConflict'), | ||
| outro: getOption('outro'), | ||
| paths: getOption('paths'), | ||
| plugins: rollup.ensureArray(config.plugins), | ||
| preferConst: getOption('preferConst'), | ||
| preserveModules: getOption('preserveModules'), | ||
| preserveModulesRoot: getOption('preserveModulesRoot'), | ||
| sanitizeFileName: getOption('sanitizeFileName'), | ||
| sourcemap: getOption('sourcemap'), | ||
| sourcemapBaseUrl: getOption('sourcemapBaseUrl'), | ||
| sourcemapExcludeSources: getOption('sourcemapExcludeSources'), | ||
| sourcemapFile: getOption('sourcemapFile'), | ||
| sourcemapPathTransform: getOption('sourcemapPathTransform'), | ||
| strict: getOption('strict'), | ||
| systemNullSetters: getOption('systemNullSetters'), | ||
| validate: getOption('validate') | ||
| }; | ||
| rollup.warnUnknownOptions(config, Object.keys(outputOptions), 'output options', warn); | ||
| return outputOptions; | ||
| } | ||
| exports.commandAliases = commandAliases; | ||
| exports.isWatchEnabled = isWatchEnabled; | ||
| exports.mergeOptions = mergeOptions; | ||
| //# sourceMappingURL=mergeOptions.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
59701
1.58%0
-100%453
-23.22%6
-33.33%2426949
-63.79%79
33.9%19
-9.52%