rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

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

Open vighnesh153 opened this issue 2 years ago • 3 comments

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

vighnesh153 avatar Jun 04 '23 10:06 vighnesh153

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

ljharb avatar Jun 04 '23 16:06 ljharb

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.

wraithgar avatar Jun 05 '23 14:06 wraithgar

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

ruyadorno avatar Jun 05 '23 15:06 ruyadorno