Skip to content
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

fix(plugin-commands-publishing): should pack main file or bin files defined in publishConfig #7538

Merged
merged 3 commits into from
Jan 20, 2024

Conversation

await-ovo
Copy link
Member

fix #4195

Following @popeindustries's suggestion, we can create publishManifest before pack tarball, and then use the packageJsonCache option in npm-packlist to avoid loading pacakge.json from the local filesystem, which should ensure that the final list of files in packed tarball is the one that needs to be published.

…efined in publishConfig

docs: update changeset
@zkochan zkochan merged commit e363af8 into pnpm:main Jan 20, 2024
12 of 13 checks passed
zkochan pushed a commit that referenced this pull request Jan 20, 2024
@snicol21
Copy link

I believe this appears to have broken our build

I've been using clean-package in conjunction with pnpm for my builds.

our pnpm pack used to generate a structure that looked like this:

.
└── package/
└── dist/
└── ...

but since this patch went in 13 hrs ago it started including a single index.ts file within the published package

.
└── package/
├── dist/
│ └── ...
└── src/
└── index.ts

which is now breaking all consumers of our packages.

@await-ovo
Copy link
Member Author

@snicol21 Hi, can you provide a repository that reproduces the above problem?

@snicol21
Copy link

@snicol21 Hi, can you provide a repository that reproduces the above problem?

Thanks @await-ovo , here's a quick repo I put together and was able to recreate the issue. I added some details to the README.md

https://github.com/snicol21/my-ts-pnpm

@await-ovo
Copy link
Member Author

@snicol21 Hi, can you provide a repository that reproduces the above problem?

Thanks @await-ovo , here's a quick repo I put together and was able to recreate the issue. I added some details to the README.md

https://github.com/snicol21/my-ts-pnpm

Thanks for the detailed steps to reproduce the problem, I think I know what the problem is, I'll send a pr to fix this later ~

@snicol21
Copy link

@snicol21 Hi, can you provide a repository that reproduces the above problem?

Thanks @await-ovo , here's a quick repo I put together and was able to recreate the issue. I added some details to the README.md

https://github.com/snicol21/my-ts-pnpm

Thanks for the detailed steps to reproduce the problem, I think I know what the problem is, I'll send a pr to fix this later ~

Awesome! Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Original main file included in published package when using publishConfig.main
3 participants