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

feat: use "workspace:" protocol for easier publish #395

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

nobkd
Copy link
Collaborator

@nobkd nobkd commented Nov 2, 2024

Follow up to #261

Pro:

  • Automatically replaces workspace:* version with the actual package version from registry (!) (at least it seemed so in my test, soo... publish order matters) on bun pm pack / bun publish (docs)
  • no more manual latest replace for *-version

Con:

  • Needs patch before install for local npm development setup. See setup-npm.js.

Disclaimer: I've never used bun publish and only tested bun pm pack on nuekit package and looked inside the packed package.json where the version got replaced just fine

@nobkd nobkd marked this pull request as ready for review November 2, 2024 02:32
@nobkd nobkd changed the title feat: use "workspace:" protocol, for easier publish feat: use "workspace:" protocol for easier publish Nov 2, 2024
@tipiirai
Copy link
Contributor

tipiirai commented Nov 6, 2024

So what are the steps when publishing a new version to NPM? Is there a revert script to go back to the default package.json format?

@nobkd
Copy link
Collaborator Author

nobkd commented Nov 6, 2024

  1. Should afaik work the same as with npm but using the bun command instead.
  2. See setup-npm.js

To 1.: I'm not sure, if there might arise issues regarding a fixed version (instead of a version range, I need to check, if that's possible) through replacement on bun publish, but if we always release all libraries, that depend on another one from our workspace, there should be no issue.

I might edit this comment tommorrow again, and clarify my text some more, since I'm currently a bit low on time :(

@nobkd nobkd marked this pull request as draft November 7, 2024 01:00
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.

2 participants