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

Closed
wants to merge 2 commits into 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 force-pushed the fix/monorepo-versioning branch from f9a1017 to 0ebd99a Compare November 2, 2024 02:30
@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
@nobkd
Copy link
Collaborator Author

nobkd commented Dec 15, 2024

closing for now, i might reopen later. I really think, this should be done, because currently all packages have latest as version, and if a older version of nuekit is used and the latest version of e.g. nuemark the api between them might differ. so I think having a version constraint makes sense. But there are probably also cons to this approach here

@nobkd nobkd closed this Dec 15, 2024
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