Skip to content

Commit 0e262ed

Browse files
committed
[package.json.ts] Print the npm pack command.
1 parent 7c7f809 commit 0e262ed

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

bin/package.json.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,17 @@ await using _ = {
433433
[Symbol.asyncDispose]: () => tempDir.rm_rf(),
434434
};
435435
const extractionDir = await tempDir.join("extracted").mkdir();
436+
// TODO: is there a 100% reliable way to test against paths that *will* be packed?
437+
// Note that this has to take into account `.gitignore`, `.npmignore`, and `"files"` — with globs and excludes.
438+
// For now, we print the command to make it clear that some heavy lifting is going on (and that it's not our fault that it's slow).
436439
const data: { filename: string }[] = await new PrintableShellCommand("npm", [
437440
"pack",
438441
"--json",
439442
"--ignore-scripts",
440443
["--pack-destination", tempDir],
441-
]).json();
444+
])
445+
.print()
446+
.json();
442447
const tgzPath = tempDir.join(data[0].filename);
443448
await new PrintableShellCommand("tar", [
444449
["-C", extractionDir],

0 commit comments

Comments
 (0)