-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: display packed files list in pnpm pack
#8707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For pnpm versions <9.13, pnpm pack outputs a single line with the name of the tarball. On pnpm versions >=9.13, pnpm pack lists all the packed files, and the last line is the tarball. pnpm/pnpm#8707
For pnpm versions <9.13, pnpm pack outputs a single line with the name of the tarball. On pnpm versions >=9.13, pnpm pack lists all the packed files, and the last line is the tarball. pnpm/pnpm#8707
This ended up breaking CI for us, since we were relying on the stdout from ResolutionIn case anyone else is getting failures because they were relying on the import { execa } from 'execa';
// ...
// Pack and install Preflight globally
- const { stdout: pnpmPackTarballPath } = await execa`pnpm pack`;
+ const pnpmPackTarballPath = (await execa`pnpm pack`).stdout
+ .split('\n')
+ .find((line) => line.match(/^upleveled-preflight-.*\.tgz$/));
+
+ if (!pnpmPackTarballPath) {
+ throw new Error('Failed to find the tarball path in `pnpm pack` output');
+ } |
Sorry for that. It actually broke some of my integrations as well. We should add a JSON output option. |
@zkochan ok thanks, created an issue to track |
Refer PR: #8765 |
close #8676
It's useful to display packed files since
pnpm pack
only shows tarball filename nowBefore
After