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

Exp: on attw #2450

Closed
wants to merge 1 commit into from
Closed

Exp: on attw #2450

wants to merge 1 commit into from

Conversation

RobinTail
Copy link
Owner

@RobinTail RobinTail commented Feb 26, 2025

The weird postbuild command was introduced in #2374 in response attw failure to work together with npm publish -w (within workspace), see 1b55654

@RobinTail
Copy link
Owner Author

RobinTail commented Feb 26, 2025

I believe running npm pack (which is what attw --pack doing) is not possible in the context of running npm publish as prepublishOnly / build / postbuild sequence of hooks

@RobinTail
Copy link
Owner Author

Yep. This hook fails for example when running npm publish --dry-run

"prepublishOnly": "npm pack && ls -la *.tgz"

because npm pack does not really produce the packed file

@RobinTail
Copy link
Owner Author

so postbuild with attw --pack is ok for build, but the sequence within prepublishOnly should be different

@RobinTail
Copy link
Owner Author

publish does not save the tarball locally

https://docs.npmjs.com/cli/v9/using-npm/scripts#npm-publish

@RobinTail RobinTail closed this Feb 26, 2025
@RobinTail
Copy link
Owner Author

RobinTail commented Feb 26, 2025

I will have to switch either to #2427 or #2428 to use attw --pack in a workspace directly

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

Successfully merging this pull request may close these issues.

1 participant