npm / rfcs

Public change requests/proposals & ideation
Other
726 stars 238 forks source link

[RFC] Transactional publish in `npm-publish workspace` command #696

Open vighnesh153 opened 1 year ago

vighnesh153 commented 1 year ago

When running npm publish --workspace packages --transactional in a monorepo, it should run in a transaction so that if publishing of any (or multiple) package fails, it automatically rollback the other published packages.

References

None

ljharb commented 1 year ago

This seems like a good enhancement on top of #92, which remains very critically needed.

wraithgar commented 1 year ago

This has been brought up many times in the past and is essentially a registry feature not a cli feature. There is currently no way to "roll back" an already published package. That version is out and can not be used again.

ruyadorno commented 1 year ago

well, I'd argue that the cli component proposed here is blocked by registry improvements such as #92 pointed by @ljharb above, that could potentially unlock a transactional-like publishing experience for workspaces once all packages are in a staging area