MCPcopy
hub / github.com/rollup/rollup / isFileNameOutsideOutputDirectory

Function isFileNameOutsideOutputDirectory

src/Bundle.ts:368–378  ·  view source on GitHub ↗
(fileName: string)

Source from the content-addressed store, hash-verified

366}
367
368function isFileNameOutsideOutputDirectory(fileName: string): boolean {
369 // Use join() to normalize ".." segments, then replace backslashes so the
370 // string checks below work identically on Windows and POSIX.
371 const normalized = join(fileName).replaceAll('\\', '/');
372 return (
373 normalized === '..' ||
374 normalized.startsWith('../') ||
375 normalized === '.' ||
376 isAbsolute(normalized)
377 );
378}
379
380function validateOutputBundleFileNames(bundle: OutputBundleWithPlaceholders): void {
381 for (const [bundleKey, entry] of Object.entries(bundle)) {

Callers 1

Calls 2

joinFunction · 0.90
isAbsoluteFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…