-
Notifications
You must be signed in to change notification settings - Fork 604
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
[rush] publishing prereleases breaks inter-repo dependencies #1135
Comments
For posterity, here's @octogonz response from gitter:
|
I understand how the |
My guess would be that the
Some other options were introduced while evolving from the old approach to the new one. Also, we started using As a result, although it does get the job done, publishing is currently the most confusing aspect of Rush. We really want to make it better. Last fall we opened issue #904 and then went off and had a couple meetings where we came up with a plan to simplify the design, while also making it more flexible, and incorporating various community requests. I've been planning to drive the implementation myself this summer. First I need to wrap up the API Extractor 7 release and write up the TSDoc spec, but otherwise this would be my next priority as far as OSS projects. It affects me personally because I get questions about it all the time, and I wish I could give better answers heheh. Anyway, in the meantime, if people have reasonable-looking PRs that make the current |
Thanks for the background @octogonz. I should have a PR with the |
Great to know that this project is heading towards the latter design. |
With the |
I forgot to mention that! From a security standpoint, it's very important to isolate CI jobs that have access to sensitive service credentials. Also, jobs that commit/publish/deploy may need to run on a completely different VM pool. |
Update: doing some final testing to make sure the full publish workflow runs as expected, but code changes are made and working. |
Hey all, thanks for your work on rush! We just changed over from Lerna recently and it's been a great productivity booster. When we switched over, our prerelease publishing process broke and it took me a while to figure out why. I've documented what's going on below.
Expected Behavior
When I publish packages using the
--prerelease
CLI flag, a package (e.g.packageA
) with a changelog entry should be version bumped, given the--prerelease
suffix specified, and published to the registry. Any of its dependencies (e.g.packageB
) in the repo that do not have changelog entries should not be version bumped and published, and the references to those dependencies should not be changed inpackageA
.Observed Behavior
packageA
gets incremented and published correctly. But its dependency onpackageB
has been incremented to a "prerelease" version that rush didn't publish to the registry. This can be seen by viewing the output fromnpm info
for the packages.packageA
after a normal releaseNote how it's at
v2.0.0
and its dependencypackageB
is atv2.0.0
as well.packageA
after a subsequent prereleaseNote how it's at
v2.0.1-test
and its dependencypackageB
is listed atv2.0.0-test
. So the-test
suffix was applied to thepackageB
dependency entry inpackageA
's package.json file even though it wasn't involved in the publish. We can see thatpackageB
was not updated at all by viewing it'snpm info
output:Steps to Reproduce
Go to the repro repo I set up, clone it, and follow the instructions. Let me know if something doesn't work.
Proposed Solution
Either refactor the prerelease code to not add the prerelease suffix to packages that aren't being published, or publish all a changed package's dependencies alongside it with the prerelease suffix applied. I'm sure there are other ways to accomplish this. These were the two that seemed the most straightforward.
Environment
The text was updated successfully, but these errors were encountered: