-
Notifications
You must be signed in to change notification settings - Fork 116
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(#504): npm publish fails / npm publish <folder> publishes from cwd folder #531
base: master
Are you sure you want to change the base?
Conversation
…ublishes from cwd folder
Anyone ? please |
This is a great solution! I just ran and tested it and even tried your suggested patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once the conflict and test report is resolved this looks like a winner.
I've tested this in 2 monorepos using lerna and this solves my problems with pkgRoot not being honoured.
['publish', basePath, '--userconfig', npmrc, '--tag', distTag, '--registry', registry], | ||
{cwd, env, preferLocal: true} | ||
['publish', '--userconfig', npmrc, '--tag', distTag, '--registry', registry], | ||
{cwd: basePath, env, preferLocal: true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd like to point out that when we specify tarballDir it doesn't suffer the same problem and it's because it uses exactly this solution in the prepare.js file see: https://github.com/semantic-release/npm/blob/master/lib/prepare.js#L14-L22
any progress here? I have the same issue and would like to get rid of this patch |
@gr2m Is there any chance to merge this? |
Reporting live from August 28, 2024 |
I put this fix into my own |
could someone help me the use case where this is necessary vs setting |
to move this forward, we would need the conflicts resolved and make sure that this scenario is covered by a test |
@travi in my case I am passing the I need to confirm whether I had issues with |
i understand that folks tend to do this, but i've never understood why. can you help me grasp the why of that decision? i bundle into either a i'm open to fixing |
Yeah there are several reasons. Back when I started doing it support for export maps wasn't very widespread, and I wanted The alternative to this is to build Aside from that, I figured I might as well strip dev-only fields from the |
those are helpful. thanks for taking the time to explain 👍🏼 |
Fixes #504