This repository was archived by the owner on May 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,15 @@ export interface GeneratorOptions {
334
334
*/
335
335
fetchRetries ?: number ;
336
336
337
+ /**
338
+ * The same as the Node.js `--preserve-symlinks` flag, except it will apply
339
+ * to both the main and the dependencies.
340
+ * See https://nodejs.org/api/cli.html#--preserve-symlinks.
341
+ * This is only supported for file: URLs.
342
+ * Defaults to false, like Node.js.
343
+ */
344
+ preserveSymlinks ?: boolean ;
345
+
337
346
/**
338
347
* Provider configuration options
339
348
*
@@ -446,6 +455,7 @@ export class Generator {
446
455
integrity = false ,
447
456
fetchRetries,
448
457
providerConfig = { } ,
458
+ preserveSymlinks,
449
459
} : GeneratorOptions = { } ) {
450
460
// Initialise the debug logger:
451
461
const { log, logStream } = createLogger ( ) ;
@@ -458,6 +468,8 @@ export class Generator {
458
468
}
459
469
} ) ( ) ;
460
470
}
471
+ if ( typeof preserveSymlinks !== "boolean" )
472
+ preserveSymlinks = typeof process ?. versions ?. node === "string" ;
461
473
462
474
// Initialise the resource fetcher:
463
475
let fetchOpts : Record < string , any > = {
@@ -511,7 +523,7 @@ export class Generator {
511
523
env,
512
524
log,
513
525
fetchOpts,
514
- preserveSymlinks : typeof process ?. versions ?. node === "string" ,
526
+ preserveSymlinks,
515
527
traceCjs : commonJS ,
516
528
traceTs : typeScript ,
517
529
traceSystem : system ,
You can’t perform that action at this time.
0 commit comments