Comparing version
/* | ||
@license | ||
Rollup.js v3.9.1 | ||
Mon, 02 Jan 2023 13:46:34 GMT - commit c6c884433e748cde70f3f4299dd48b81af97ec14 | ||
Rollup.js v3.23.0 | ||
Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975 | ||
@@ -10,3 +10,3 @@ 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'; | ||
@@ -18,3 +18,2 @@ import 'path'; | ||
import 'node:fs/promises'; | ||
import 'node:events'; | ||
import 'tty'; |
/* | ||
@license | ||
Rollup.js v3.9.1 | ||
Mon, 02 Jan 2023 13:46:34 GMT - commit c6c884433e748cde70f3f4299dd48b81af97ec14 | ||
Rollup.js v3.23.0 | ||
Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975 | ||
@@ -20,7 +20,6 @@ https://github.com/rollup/rollup | ||
const loadConfigFile_js = require('./shared/loadConfigFile.js'); | ||
require('tty'); | ||
require('path'); | ||
require('node:perf_hooks'); | ||
require('node:crypto'); | ||
require('node:events'); | ||
require('tty'); | ||
@@ -27,0 +26,0 @@ |
@@ -55,4 +55,5 @@ export const VERSION: string; | ||
sources: string[]; | ||
sourcesContent?: string[]; | ||
sourcesContent?: (string | null)[]; | ||
version: number; | ||
x_google_ignoreList?: number[]; | ||
} | ||
@@ -66,4 +67,5 @@ | ||
sources: string[]; | ||
sourcesContent?: string[]; | ||
sourcesContent?: (string | null)[]; | ||
version: number; | ||
x_google_ignoreList?: number[]; | ||
} | ||
@@ -84,3 +86,3 @@ | ||
sources: string[]; | ||
sourcesContent: string[]; | ||
sourcesContent: (string | null)[]; | ||
version: number; | ||
@@ -139,2 +141,3 @@ toString(): string; | ||
name?: string; | ||
needsCodeReference?: boolean; | ||
source?: string | Uint8Array; | ||
@@ -154,4 +157,12 @@ type: 'asset'; | ||
export type EmittedFile = EmittedAsset | EmittedChunk; | ||
export interface EmittedPrebuiltChunk { | ||
code: string; | ||
exports?: string[]; | ||
fileName: string; | ||
map?: SourceMap; | ||
type: 'prebuilt-chunk'; | ||
} | ||
export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk; | ||
export type EmitFile = (emittedFile: EmittedFile) => string; | ||
@@ -224,2 +235,3 @@ | ||
id: string; | ||
resolvedBy: string; | ||
} | ||
@@ -234,2 +246,3 @@ | ||
id: string; | ||
resolvedBy?: string; | ||
} | ||
@@ -239,2 +252,4 @@ | ||
export type ResolveIdResultWithoutNullValue = string | false | PartialResolvedId; | ||
export type ResolveIdHook = ( | ||
@@ -258,3 +273,3 @@ this: PluginContext, | ||
} | ||
) => boolean; | ||
) => boolean | NullValue; | ||
@@ -515,2 +530,6 @@ export type IsExternal = ( | ||
) => string; | ||
export type SourcemapIgnoreListOption = ( | ||
relativeSourcePath: string, | ||
sourcemapPath: string | ||
) => boolean; | ||
@@ -521,6 +540,7 @@ export type InputPluginOption = MaybePromise<Plugin | NullValue | false | InputPluginOption[]>; | ||
acorn?: Record<string, unknown>; | ||
acornInjectPlugins?: (() => unknown)[] | (() => unknown); | ||
cache?: false | RollupCache; | ||
acornInjectPlugins?: ((...arguments_: any[]) => unknown)[] | ((...arguments_: any[]) => unknown); | ||
cache?: boolean | RollupCache; | ||
context?: string; | ||
experimentalCacheExpiry?: number; | ||
experimentalLogSideEffects?: boolean; | ||
external?: ExternalOption; | ||
@@ -560,2 +580,3 @@ /** @deprecated Use the "inlineDynamicImports" output option instead. */ | ||
experimentalCacheExpiry: number; | ||
experimentalLogSideEffects: boolean; | ||
external: IsExternal; | ||
@@ -658,2 +679,4 @@ /** @deprecated Use the "inlineDynamicImports" output option instead. */ | ||
esModule?: boolean | 'if-default-prop'; | ||
/** @deprecated This option is no longer needed and ignored. */ | ||
experimentalDeepDynamicChunkOptimization?: boolean; | ||
experimentalMinChunkSize?: number; | ||
@@ -694,2 +717,3 @@ exports?: 'default' | 'named' | 'none' | 'auto'; | ||
sourcemapFile?: string; | ||
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption; | ||
sourcemapPathTransform?: SourcemapPathTransformOption; | ||
@@ -713,2 +737,4 @@ strict?: boolean; | ||
esModule: boolean | 'if-default-prop'; | ||
/** @deprecated This option is no longer needed and ignored. */ | ||
experimentalDeepDynamicChunkOptimization: boolean; | ||
experimentalMinChunkSize: number; | ||
@@ -748,2 +774,3 @@ exports: 'default' | 'named' | 'none' | 'auto'; | ||
sourcemapFile: string | undefined; | ||
sourcemapIgnoreList: SourcemapIgnoreListOption; | ||
sourcemapPathTransform: SourcemapPathTransformOption | undefined; | ||
@@ -773,2 +800,3 @@ strict: boolean; | ||
fileName: string; | ||
needsCodeReference: boolean; | ||
} | ||
@@ -775,0 +803,0 @@ |
/* | ||
@license | ||
Rollup.js v3.9.1 | ||
Mon, 02 Jan 2023 13:46:34 GMT - commit c6c884433e748cde70f3f4299dd48b81af97ec14 | ||
Rollup.js v3.23.0 | ||
Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975 | ||
@@ -15,10 +15,11 @@ https://github.com/rollup/rollup | ||
const rollup = require('./shared/rollup.js'); | ||
const watchProxy = require('./shared/watch-proxy.js'); | ||
require('node:process'); | ||
require('tty'); | ||
require('node:path'); | ||
require('path'); | ||
require('node:process'); | ||
require('node:perf_hooks'); | ||
require('node:crypto'); | ||
require('node:fs/promises'); | ||
require('node:events'); | ||
require('tty'); | ||
require('./shared/fsevents-importer.js'); | ||
@@ -30,3 +31,3 @@ | ||
exports.rollup = rollup.rollup; | ||
exports.watch = rollup.watch; | ||
exports.watch = watchProxy.watch; | ||
//# sourceMappingURL=rollup.js.map |
/* | ||
@license | ||
Rollup.js v3.9.1 | ||
Mon, 02 Jan 2023 13:46:34 GMT - commit c6c884433e748cde70f3f4299dd48b81af97ec14 | ||
Rollup.js v3.23.0 | ||
Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975 | ||
@@ -92,3 +92,3 @@ https://github.com/rollup/rollup | ||
title('Use of eval is strongly discouraged'); | ||
info('https://rollupjs.org/guide/en/#avoiding-eval'); | ||
info(rollup.getRollupUrl(rollup.URL_AVOIDING_EVAL)); | ||
showTruncatedWarnings(warnings); | ||
@@ -98,3 +98,3 @@ }, | ||
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) { | ||
@@ -108,3 +108,3 @@ rollup.stderr(rollup.bold(rollup.relativeId(warning.id))); | ||
title(`Missing global variable ${warnings.length > 1 ? 'names' : 'name'}`); | ||
info('https://rollupjs.org/guide/en/#outputglobals'); | ||
info(rollup.getRollupUrl(rollup.URL_OUTPUT_GLOBALS)); | ||
rollup.stderr(`Use "output.globals" to specify browser global variable names corresponding to external modules:`); | ||
@@ -117,3 +117,3 @@ for (const warning of warnings) { | ||
title('Mixing named and default exports'); | ||
info(`https://rollupjs.org/guide/en/#outputexports`); | ||
info(rollup.getRollupUrl(rollup.URL_OUTPUT_EXPORTS)); | ||
rollup.stderr(rollup.bold('The following entry modules are using named and default exports together:')); | ||
@@ -162,3 +162,3 @@ warnings.sort((a, b) => (a.id < b.id ? -1 : 1)); | ||
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))]; | ||
@@ -169,3 +169,3 @@ rollup.stderr(`Plugins that transform code (such as ${rollup.printQuotedStringList(plugins)}) should generate accompanying sourcemaps.`); | ||
title('"this" has been rewritten to "undefined"'); | ||
info('https://rollupjs.org/guide/en/#error-this-is-undefined'); | ||
info(rollup.getRollupUrl(rollup.URL_THIS_IS_UNDEFINED)); | ||
showTruncatedWarnings(warnings); | ||
@@ -175,3 +175,3 @@ }, | ||
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(); | ||
@@ -397,3 +397,3 @@ for (const warning of warnings) { | ||
async function loadConfigFile(fileName, commandOptions = {}) { | ||
const loadConfigFile = async (fileName, commandOptions = {}) => { | ||
const configs = await getConfigList(getDefaultFromCjs(await getConfigFileExport(fileName, commandOptions)), commandOptions); | ||
@@ -414,3 +414,3 @@ const warnings = batchWarnings(); | ||
} | ||
} | ||
}; | ||
async function getConfigFileExport(fileName, commandOptions) { | ||
@@ -417,0 +417,0 @@ if (commandOptions.configPlugin || commandOptions.bundleConfigAsCjs) { |
/* | ||
@license | ||
Rollup.js v3.9.1 | ||
Mon, 02 Jan 2023 13:46:34 GMT - commit c6c884433e748cde70f3f4299dd48b81af97ec14 | ||
Rollup.js v3.23.0 | ||
Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975 | ||
@@ -19,6 +19,5 @@ https://github.com/rollup/rollup | ||
const rollup = require('./rollup.js'); | ||
const require$$0 = require('assert'); | ||
const require$$0$1 = require('events'); | ||
const loadConfigFile_js = require('./loadConfigFile.js'); | ||
const node_child_process = require('node:child_process'); | ||
const watchProxy = require('./watch-proxy.js'); | ||
require('fs'); | ||
@@ -29,7 +28,8 @@ require('util'); | ||
require('os'); | ||
require('./fsevents-importer.js'); | ||
require('events'); | ||
require('node:path'); | ||
require('tty'); | ||
require('node:perf_hooks'); | ||
require('node:crypto'); | ||
require('node:events'); | ||
require('tty'); | ||
require('node:url'); | ||
@@ -75,76 +75,40 @@ | ||
var signalExitExports = {}; | ||
var signalExit = { | ||
get exports(){ return signalExitExports; }, | ||
set exports(v){ signalExitExports = v; }, | ||
}; | ||
var signalsExports = {}; | ||
var signals$1 = { | ||
get exports(){ return signalsExports; }, | ||
set exports(v){ signalsExports = v; }, | ||
}; | ||
var hasRequiredSignals; | ||
function requireSignals () { | ||
if (hasRequiredSignals) return signalsExports; | ||
hasRequiredSignals = 1; | ||
(function (module) { | ||
// This is not the set of all possible signals. | ||
// | ||
// It IS, however, the set of all signals that trigger | ||
// an exit on either Linux or BSD systems. Linux is a | ||
// superset of the signal names supported on BSD, and | ||
// the unknown signals just fail to register, so we can | ||
// catch that easily enough. | ||
// | ||
// Don't bother with SIGKILL. It's uncatchable, which | ||
// means that we can't fire any callbacks anyway. | ||
// | ||
// If a user does happen to register a handler on a non- | ||
// fatal signal like SIGWINCH or something, and then | ||
// exit, it'll end up firing `process.emit('exit')`, so | ||
// the handler will be fired anyway. | ||
// | ||
// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised | ||
// artificially, inherently leave the process in a | ||
// state from which it is not safe to try and enter JS | ||
// listeners. | ||
module.exports = [ | ||
'SIGABRT', | ||
'SIGALRM', | ||
'SIGHUP', | ||
'SIGINT', | ||
'SIGTERM' | ||
]; | ||
if (process.platform !== 'win32') { | ||
module.exports.push( | ||
'SIGVTALRM', | ||
'SIGXCPU', | ||
'SIGXFSZ', | ||
'SIGUSR2', | ||
'SIGTRAP', | ||
'SIGSYS', | ||
'SIGQUIT', | ||
'SIGIOT' | ||
// should detect profiler and enable/disable accordingly. | ||
// see #21 | ||
// 'SIGPROF' | ||
); | ||
} | ||
if (process.platform === 'linux') { | ||
module.exports.push( | ||
'SIGIO', | ||
'SIGPOLL', | ||
'SIGPWR', | ||
'SIGSTKFLT', | ||
'SIGUNUSED' | ||
); | ||
} | ||
} (signals$1)); | ||
return signalsExports; | ||
/** | ||
* This is not the set of all possible signals. | ||
* | ||
* It IS, however, the set of all signals that trigger | ||
* an exit on either Linux or BSD systems. Linux is a | ||
* superset of the signal names supported on BSD, and | ||
* the unknown signals just fail to register, so we can | ||
* catch that easily enough. | ||
* | ||
* Windows signals are a different set, since there are | ||
* signals that terminate Windows processes, but don't | ||
* terminate (or don't even exist) on Posix systems. | ||
* | ||
* Don't bother with SIGKILL. It's uncatchable, which | ||
* means that we can't fire any callbacks anyway. | ||
* | ||
* If a user does happen to register a handler on a non- | ||
* fatal signal like SIGWINCH or something, and then | ||
* exit, it'll end up firing `process.emit('exit')`, so | ||
* the handler will be fired anyway. | ||
* | ||
* SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised | ||
* artificially, inherently leave the process in a | ||
* state from which it is not safe to try and enter JS | ||
* listeners. | ||
*/ | ||
const signals = []; | ||
signals.push('SIGHUP', 'SIGINT', 'SIGTERM'); | ||
if (process.platform !== 'win32') { | ||
signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT' | ||
// should detect profiler and enable/disable accordingly. | ||
// see #21 | ||
// 'SIGPROF' | ||
); | ||
} | ||
if (process.platform === 'linux') { | ||
signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT'); | ||
} | ||
@@ -155,6 +119,3 @@ // Note: since nyc uses this module to output coverage, any lines | ||
// grab a reference to node's real process object right away | ||
var process$1 = rollup.commonjsGlobal.process; | ||
const processOk = function (process) { | ||
return process && | ||
const processOk = (process) => !!process && | ||
typeof process === 'object' && | ||
@@ -167,189 +128,255 @@ typeof process.removeListener === 'function' && | ||
typeof process.pid === 'number' && | ||
typeof process.on === 'function' | ||
}; | ||
// some kind of non-node environment, just no-op | ||
/* istanbul ignore if */ | ||
if (!processOk(process$1)) { | ||
signalExit.exports = function () { | ||
return function () {} | ||
}; | ||
} else { | ||
var assert = require$$0; | ||
var signals = requireSignals(); | ||
var isWin = /^win/i.test(process$1.platform); | ||
var EE = require$$0$1; | ||
/* istanbul ignore if */ | ||
if (typeof EE !== 'function') { | ||
EE = EE.EventEmitter; | ||
} | ||
var emitter; | ||
if (process$1.__signal_exit_emitter__) { | ||
emitter = process$1.__signal_exit_emitter__; | ||
} else { | ||
emitter = process$1.__signal_exit_emitter__ = new EE(); | ||
emitter.count = 0; | ||
emitter.emitted = {}; | ||
} | ||
// Because this emitter is a global, we have to check to see if a | ||
// previous version of this library failed to enable infinite listeners. | ||
// I know what you're about to say. But literally everything about | ||
// signal-exit is a compromise with evil. Get used to it. | ||
if (!emitter.infinite) { | ||
emitter.setMaxListeners(Infinity); | ||
emitter.infinite = true; | ||
} | ||
signalExit.exports = function (cb, opts) { | ||
/* istanbul ignore if */ | ||
if (!processOk(rollup.commonjsGlobal.process)) { | ||
return function () {} | ||
typeof process.on === 'function'; | ||
const kExitEmitter = Symbol.for('signal-exit emitter'); | ||
const global = globalThis; | ||
const ObjectDefineProperty = Object.defineProperty.bind(Object); | ||
// teeny tiny ee | ||
class Emitter { | ||
emitted = { | ||
afterExit: false, | ||
exit: false, | ||
}; | ||
listeners = { | ||
afterExit: [], | ||
exit: [], | ||
}; | ||
count = 0; | ||
id = Math.random(); | ||
constructor() { | ||
if (global[kExitEmitter]) { | ||
return global[kExitEmitter]; | ||
} | ||
ObjectDefineProperty(global, kExitEmitter, { | ||
value: this, | ||
writable: false, | ||
enumerable: false, | ||
configurable: false, | ||
}); | ||
} | ||
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler'); | ||
if (loaded === false) { | ||
load(); | ||
on(ev, fn) { | ||
this.listeners[ev].push(fn); | ||
} | ||
var ev = 'exit'; | ||
if (opts && opts.alwaysLast) { | ||
ev = 'afterexit'; | ||
removeListener(ev, fn) { | ||
const list = this.listeners[ev]; | ||
const i = list.indexOf(fn); | ||
/* c8 ignore start */ | ||
if (i === -1) { | ||
return; | ||
} | ||
/* c8 ignore stop */ | ||
if (i === 0 && list.length === 1) { | ||
list.length = 0; | ||
} | ||
else { | ||
list.splice(i, 1); | ||
} | ||
} | ||
var remove = function () { | ||
emitter.removeListener(ev, cb); | ||
if (emitter.listeners('exit').length === 0 && | ||
emitter.listeners('afterexit').length === 0) { | ||
unload(); | ||
} | ||
emit(ev, code, signal) { | ||
if (this.emitted[ev]) { | ||
return; | ||
} | ||
this.emitted[ev] = true; | ||
for (const fn of this.listeners[ev]) { | ||
fn(code, signal); | ||
} | ||
} | ||
} | ||
class SignalExitBase { | ||
} | ||
const signalExitWrap = (handler) => { | ||
return { | ||
onExit(cb, opts) { | ||
return handler.onExit(cb, opts); | ||
}, | ||
load() { | ||
return handler.load(); | ||
}, | ||
unload() { | ||
return handler.unload(); | ||
}, | ||
}; | ||
emitter.on(ev, cb); | ||
return remove | ||
}; | ||
var unload = function unload () { | ||
if (!loaded || !processOk(rollup.commonjsGlobal.process)) { | ||
return | ||
}; | ||
class SignalExitFallback extends SignalExitBase { | ||
onExit() { | ||
return () => { }; | ||
} | ||
loaded = false; | ||
signals.forEach(function (sig) { | ||
try { | ||
process$1.removeListener(sig, sigListeners[sig]); | ||
} catch (er) {} | ||
}); | ||
process$1.emit = originalProcessEmit; | ||
process$1.reallyExit = originalProcessReallyExit; | ||
emitter.count -= 1; | ||
}; | ||
signalExitExports.unload = unload; | ||
var emit = function emit (event, code, signal) { | ||
/* istanbul ignore if */ | ||
if (emitter.emitted[event]) { | ||
return | ||
load() { } | ||
unload() { } | ||
} | ||
class SignalExit extends SignalExitBase { | ||
// "SIGHUP" throws an `ENOSYS` error on Windows, | ||
// so use a supported signal instead | ||
/* c8 ignore start */ | ||
#hupSig = process$1.platform === 'win32' ? 'SIGINT' : 'SIGHUP'; | ||
/* c8 ignore stop */ | ||
#emitter = new Emitter(); | ||
#process; | ||
#originalProcessEmit; | ||
#originalProcessReallyExit; | ||
#sigListeners = {}; | ||
#loaded = false; | ||
constructor(process) { | ||
super(); | ||
this.#process = process; | ||
// { <signal>: <listener fn>, ... } | ||
this.#sigListeners = {}; | ||
for (const sig of signals) { | ||
this.#sigListeners[sig] = () => { | ||
// If there are no other listeners, an exit is coming! | ||
// Simplest way: remove us and then re-send the signal. | ||
// We know that this will kill the process, so we can | ||
// safely emit now. | ||
const listeners = this.#process.listeners(sig); | ||
let { count } = this.#emitter; | ||
// This is a workaround for the fact that signal-exit v3 and signal | ||
// exit v4 are not aware of each other, and each will attempt to let | ||
// the other handle it, so neither of them do. To correct this, we | ||
// detect if we're the only handler *except* for previous versions | ||
// of signal-exit. | ||
/* c8 ignore start */ | ||
//@ts-ignore | ||
if (typeof process.__signal_exit_emitter__ === 'object') | ||
count++; | ||
/* c8 ignore stop */ | ||
if (listeners.length === count) { | ||
this.unload(); | ||
this.#emitter.emit('exit', null, sig); | ||
this.#emitter.emit('afterExit', null, sig); | ||
/* c8 ignore start */ | ||
process.kill(process.pid, sig === 'SIGHUP' ? this.#hupSig : sig); | ||
/* c8 ignore stop */ | ||
} | ||
}; | ||
} | ||
this.#originalProcessReallyExit = process.reallyExit; | ||
this.#originalProcessEmit = process.emit; | ||
} | ||
emitter.emitted[event] = true; | ||
emitter.emit(event, code, signal); | ||
}; | ||
// { <signal>: <listener fn>, ... } | ||
var sigListeners = {}; | ||
signals.forEach(function (sig) { | ||
sigListeners[sig] = function listener () { | ||
/* istanbul ignore if */ | ||
if (!processOk(rollup.commonjsGlobal.process)) { | ||
return | ||
} | ||
// If there are no other listeners, an exit is coming! | ||
// Simplest way: remove us and then re-send the signal. | ||
// We know that this will kill the process, so we can | ||
// safely emit now. | ||
var listeners = process$1.listeners(sig); | ||
if (listeners.length === emitter.count) { | ||
unload(); | ||
emit('exit', null, sig); | ||
/* istanbul ignore next */ | ||
emit('afterexit', null, sig); | ||
/* istanbul ignore next */ | ||
if (isWin && sig === 'SIGHUP') { | ||
// "SIGHUP" throws an `ENOSYS` error on Windows, | ||
// so use a supported signal instead | ||
sig = 'SIGINT'; | ||
onExit(cb, opts) { | ||
/* c8 ignore start */ | ||
if (!processOk(this.#process)) { | ||
return () => { }; | ||
} | ||
/* istanbul ignore next */ | ||
process$1.kill(process$1.pid, sig); | ||
} | ||
}; | ||
}); | ||
signalExitExports.signals = function () { | ||
return signals | ||
}; | ||
var loaded = false; | ||
var load = function load () { | ||
if (loaded || !processOk(rollup.commonjsGlobal.process)) { | ||
return | ||
/* c8 ignore stop */ | ||
if (this.#loaded === false) { | ||
this.load(); | ||
} | ||
const ev = opts?.alwaysLast ? 'afterExit' : 'exit'; | ||
this.#emitter.on(ev, cb); | ||
return () => { | ||
this.#emitter.removeListener(ev, cb); | ||
if (this.#emitter.listeners['exit'].length === 0 && | ||
this.#emitter.listeners['afterExit'].length === 0) { | ||
this.unload(); | ||
} | ||
}; | ||
} | ||
loaded = true; | ||
// This is the number of onSignalExit's that are in play. | ||
// It's important so that we can count the correct number of | ||
// listeners on signals, and don't wait for the other one to | ||
// handle it instead of us. | ||
emitter.count += 1; | ||
signals = signals.filter(function (sig) { | ||
try { | ||
process$1.on(sig, sigListeners[sig]); | ||
return true | ||
} catch (er) { | ||
return false | ||
} | ||
}); | ||
process$1.emit = processEmit; | ||
process$1.reallyExit = processReallyExit; | ||
}; | ||
signalExitExports.load = load; | ||
var originalProcessReallyExit = process$1.reallyExit; | ||
var processReallyExit = function processReallyExit (code) { | ||
/* istanbul ignore if */ | ||
if (!processOk(rollup.commonjsGlobal.process)) { | ||
return | ||
load() { | ||
if (this.#loaded) { | ||
return; | ||
} | ||
this.#loaded = true; | ||
// This is the number of onSignalExit's that are in play. | ||
// It's important so that we can count the correct number of | ||
// listeners on signals, and don't wait for the other one to | ||
// handle it instead of us. | ||
this.#emitter.count += 1; | ||
for (const sig of signals) { | ||
try { | ||
const fn = this.#sigListeners[sig]; | ||
if (fn) | ||
this.#process.on(sig, fn); | ||
} | ||
catch (_) { } | ||
} | ||
this.#process.emit = (ev, ...a) => { | ||
return this.#processEmit(ev, ...a); | ||
}; | ||
this.#process.reallyExit = (code) => { | ||
return this.#processReallyExit(code); | ||
}; | ||
} | ||
process$1.exitCode = code || /* istanbul ignore next */ 0; | ||
emit('exit', process$1.exitCode, null); | ||
/* istanbul ignore next */ | ||
emit('afterexit', process$1.exitCode, null); | ||
/* istanbul ignore next */ | ||
originalProcessReallyExit.call(process$1, process$1.exitCode); | ||
}; | ||
var originalProcessEmit = process$1.emit; | ||
var processEmit = function processEmit (ev, arg) { | ||
if (ev === 'exit' && processOk(rollup.commonjsGlobal.process)) { | ||
/* istanbul ignore else */ | ||
if (arg !== undefined) { | ||
process$1.exitCode = arg; | ||
} | ||
var ret = originalProcessEmit.apply(this, arguments); | ||
/* istanbul ignore next */ | ||
emit('exit', process$1.exitCode, null); | ||
/* istanbul ignore next */ | ||
emit('afterexit', process$1.exitCode, null); | ||
/* istanbul ignore next */ | ||
return ret | ||
} else { | ||
return originalProcessEmit.apply(this, arguments) | ||
unload() { | ||
if (!this.#loaded) { | ||
return; | ||
} | ||
this.#loaded = false; | ||
signals.forEach(sig => { | ||
const listener = this.#sigListeners[sig]; | ||
/* c8 ignore start */ | ||
if (!listener) { | ||
throw new Error('Listener not defined for signal: ' + sig); | ||
} | ||
/* c8 ignore stop */ | ||
try { | ||
this.#process.removeListener(sig, listener); | ||
/* c8 ignore start */ | ||
} | ||
catch (_) { } | ||
/* c8 ignore stop */ | ||
}); | ||
this.#process.emit = this.#originalProcessEmit; | ||
this.#process.reallyExit = this.#originalProcessReallyExit; | ||
this.#emitter.count -= 1; | ||
} | ||
}; | ||
#processReallyExit(code) { | ||
/* c8 ignore start */ | ||
if (!processOk(this.#process)) { | ||
return 0; | ||
} | ||
this.#process.exitCode = code || 0; | ||
/* c8 ignore stop */ | ||
this.#emitter.emit('exit', this.#process.exitCode, null); | ||
this.#emitter.emit('afterExit', this.#process.exitCode, null); | ||
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); | ||
} | ||
#processEmit(ev, ...args) { | ||
const og = this.#originalProcessEmit; | ||
if (ev === 'exit' && processOk(this.#process)) { | ||
if (typeof args[0] === 'number') { | ||
this.#process.exitCode = args[0]; | ||
/* c8 ignore start */ | ||
} | ||
/* c8 ignore start */ | ||
const ret = og.call(this.#process, ev, ...args); | ||
/* c8 ignore start */ | ||
this.#emitter.emit('exit', this.#process.exitCode, null); | ||
this.#emitter.emit('afterExit', this.#process.exitCode, null); | ||
/* c8 ignore stop */ | ||
return ret; | ||
} | ||
else { | ||
return og.call(this.#process, ev, ...args); | ||
} | ||
} | ||
} | ||
const process$1 = globalThis.process; | ||
// wrap so that we call the method on the actual handler, without | ||
// exporting it directly. | ||
const { | ||
/** | ||
* Called when the process is exiting, whether via signal, explicit | ||
* exit, or running out of stuff to do. | ||
* | ||
* If the global process object is not suitable for instrumentation, | ||
* then this will be a no-op. | ||
* | ||
* Returns a function that may be used to unload signal-exit. | ||
*/ | ||
onExit, | ||
/** | ||
* Load the listeners. Likely you never need to call this, unless | ||
* doing a rather deep integration with signal-exit functionality. | ||
* Mostly exposed for the benefit of testing. | ||
* | ||
* @internal | ||
*/ | ||
load, | ||
/** | ||
* Unload the listeners. Likely you never need to call this, unless | ||
* doing a rather deep integration with signal-exit functionality. | ||
* Mostly exposed for the benefit of testing. | ||
* | ||
* @internal | ||
*/ | ||
unload, } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback()); | ||
@@ -412,4 +439,4 @@ const CLEAR_SCREEN = '\u001Bc'; | ||
const runWatchHook = createWatchHooks(command); | ||
signalExitExports(close); | ||
process$2.on('uncaughtException', close); | ||
onExit(close); | ||
process$2.on('uncaughtException', closeWithError); | ||
if (!process$2.stdin.isTTY) { | ||
@@ -458,3 +485,3 @@ process$2.stdin.on('end', close); | ||
async function start(configs, warnings) { | ||
watcher = rollup.watch(configs); | ||
watcher = watchProxy.watch(configs); | ||
watcher.on('event', event => { | ||
@@ -514,3 +541,3 @@ switch (event.code) { | ||
async function close(code) { | ||
process$2.removeListener('uncaughtException', close); | ||
process$2.removeListener('uncaughtException', closeWithError); | ||
// removing a non-existent listener is a no-op | ||
@@ -522,10 +549,13 @@ process$2.stdin.removeListener('end', close); | ||
configWatcher.close(); | ||
if (code) { | ||
// eslint-disable-next-line unicorn/no-process-exit | ||
process$2.exit(code); | ||
} | ||
process$2.exit(code || 0); | ||
} | ||
// return a promise that never resolves to keep the process running | ||
return new Promise(() => { }); | ||
} | ||
function closeWithError(error) { | ||
error.name = `Uncaught ${error.name}`; | ||
rollup.handleError(error); | ||
} | ||
exports.watch = watch; | ||
//# sourceMappingURL=watch-cli.js.map |
/* | ||
@license | ||
Rollup.js v3.9.1 | ||
Mon, 02 Jan 2023 13:46:34 GMT - commit c6c884433e748cde70f3f4299dd48b81af97ec14 | ||
Rollup.js v3.23.0 | ||
Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975 | ||
@@ -19,2 +19,3 @@ https://github.com/rollup/rollup | ||
const index = require('./index.js'); | ||
require('tty'); | ||
require('path'); | ||
@@ -24,4 +25,2 @@ require('node:perf_hooks'); | ||
require('node:fs/promises'); | ||
require('node:events'); | ||
require('tty'); | ||
require('fs'); | ||
@@ -31,2 +30,3 @@ require('util'); | ||
require('os'); | ||
require('./fsevents-importer.js'); | ||
require('events'); | ||
@@ -33,0 +33,0 @@ |
@@ -614,3 +614,3 @@ # Rollup core license | ||
> | ||
> Copyright (c) 2015, Contributors | ||
> Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors | ||
> | ||
@@ -632,31 +632,2 @@ > Permission to use, copy, modify, and/or distribute this software | ||
## 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 | ||
@@ -663,0 +634,0 @@ License: MIT |
101
package.json
{ | ||
"name": "rollup", | ||
"version": "3.9.1", | ||
"version": "3.23.0", | ||
"description": "Next-generation ES module bundler", | ||
@@ -13,4 +13,7 @@ "main": "dist/rollup.js", | ||
"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'", | ||
@@ -30,3 +33,5 @@ "ci:test": "npm run build:cjs && npm run build:bootstrap && npm run test:all", | ||
"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", | ||
@@ -63,18 +68,29 @@ "test:quick": "mocha -b test/test.js", | ||
"devDependencies": { | ||
"@rollup/plugin-alias": "^4.0.2", | ||
"@rollup/plugin-buble": "^1.0.1", | ||
"@rollup/plugin-commonjs": "^24.0.0", | ||
"@codemirror/commands": "^6.2.4", | ||
"@codemirror/lang-javascript": "^6.1.8", | ||
"@codemirror/language": "^6.6.0", | ||
"@codemirror/search": "^6.4.0", | ||
"@codemirror/state": "^6.2.0", | ||
"@codemirror/view": "^6.11.3", | ||
"@jridgewell/sourcemap-codec": "^1.4.15", | ||
"@mermaid-js/mermaid-cli": "^10.1.0", | ||
"@rollup/plugin-alias": "^5.0.0", | ||
"@rollup/plugin-buble": "^1.0.2", | ||
"@rollup/plugin-commonjs": "^25.0.0", | ||
"@rollup/plugin-json": "^6.0.0", | ||
"@rollup/plugin-node-resolve": "^15.0.1", | ||
"@rollup/plugin-node-resolve": "^15.0.2", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"@rollup/plugin-typescript": "^10.0.1", | ||
"@rollup/pluginutils": "^5.0.0", | ||
"@types/estree": "1.0.0", | ||
"@types/node": "^14.18.36", | ||
"@types/signal-exit": "^3.0.1", | ||
"@rollup/plugin-terser": "^0.4.3", | ||
"@rollup/plugin-typescript": "^11.1.1", | ||
"@rollup/pluginutils": "^5.0.2", | ||
"@types/estree": "1.0.1", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "~14.18.47", | ||
"@types/yargs-parser": "^21.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.47.1", | ||
"@typescript-eslint/parser": "^5.47.1", | ||
"acorn": "^8.8.1", | ||
"acorn-import-assertions": "^1.8.0", | ||
"@typescript-eslint/eslint-plugin": "^5.59.6", | ||
"@typescript-eslint/parser": "^5.59.6", | ||
"@vue/eslint-config-prettier": "^7.1.0", | ||
"@vue/eslint-config-typescript": "^11.0.3", | ||
"acorn": "^8.8.2", | ||
"acorn-import-assertions": "^1.9.0", | ||
"acorn-jsx": "^5.3.2", | ||
@@ -85,44 +101,47 @@ "acorn-walk": "^8.2.0", | ||
"chokidar": "^3.5.3", | ||
"colorette": "^2.0.19", | ||
"concurrently": "^7.6.0", | ||
"core-js": "^3.27.1", | ||
"colorette": "^2.0.20", | ||
"concurrently": "^8.0.1", | ||
"core-js": "^3.30.2", | ||
"date-time": "^4.0.0", | ||
"es5-shim": "^4.6.7", | ||
"es6-shim": "^0.35.7", | ||
"eslint": "^8.31.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"es6-shim": "^0.35.8", | ||
"eslint": "^8.40.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-unicorn": "^45.0.2", | ||
"eslint-plugin-unicorn": "^47.0.0", | ||
"eslint-plugin-vue": "^9.13.0", | ||
"fixturify": "^3.0.0", | ||
"flru": "^1.0.2", | ||
"fs-extra": "^11.1.0", | ||
"fs-extra": "^11.1.1", | ||
"github-api": "^3.4.0", | ||
"hash.js": "^1.1.7", | ||
"husky": "^8.0.2", | ||
"inquirer": "^9.1.4", | ||
"is-reference": "^3.0.0", | ||
"lint-staged": "^13.1.0", | ||
"husky": "^8.0.3", | ||
"inquirer": "^9.2.3", | ||
"is-reference": "^3.0.1", | ||
"lint-staged": "^13.2.2", | ||
"locate-character": "^2.0.5", | ||
"magic-string": "^0.27.0", | ||
"magic-string": "^0.30.0", | ||
"mocha": "^10.2.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.8.1", | ||
"pretty-bytes": "^6.0.0", | ||
"pinia": "^2.1.1", | ||
"prettier": "^2.8.8", | ||
"pretty-bytes": "^6.1.0", | ||
"pretty-ms": "^8.0.0", | ||
"requirejs": "^2.3.6", | ||
"rollup": "^2.79.1", | ||
"rollup": "^3.22.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", | ||
"semver": "^7.5.1", | ||
"shx": "^0.3.4", | ||
"signal-exit": "^3.0.7", | ||
"signal-exit": "^4.0.2", | ||
"source-map": "^0.7.4", | ||
"source-map-support": "^0.5.21", | ||
"sourcemap-codec": "^1.4.8", | ||
"systemjs": "^6.13.0", | ||
"terser": "^5.16.1", | ||
"tslib": "^2.4.1", | ||
"typescript": "^4.9.4", | ||
"systemjs": "^6.14.1", | ||
"terser": "^5.17.4", | ||
"tslib": "^2.5.0", | ||
"typescript": "^5.0.4", | ||
"vitepress": "^1.0.0-alpha.75", | ||
"vue": "^3.3.2", | ||
"weak-napi": "^2.0.2", | ||
@@ -147,5 +166,9 @@ "yargs-parser": "^21.1.1" | ||
}, | ||
"./loadConfigFile": "./dist/loadConfigFile.js", | ||
"./loadConfigFile": { | ||
"types": "./dist/loadConfigFile.d.ts", | ||
"require": "./dist/loadConfigFile.js", | ||
"default": "./dist/loadConfigFile.js" | ||
}, | ||
"./dist/*": "./dist/*" | ||
} | ||
} |
<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/). | ||
@@ -41,0 +41,0 @@ ### Commands |
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
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
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
2451174
4.13%19
18.75%60273
3.6%79
21.54%