microsoft / microsoft/beachball
Package being published as stable version instead of prerelease
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 815
- Forks
- 93
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 12
Description
I keep running into a bug where one of my packages gets published as a stable version, instead of the intended prerelease version. I wasn't able to reduce the problem entirely yet, but due to limited bandwidth I figured I would at least log what I have thus far.
Given two change files that both want to bump a prerelease version:
- https://github.com/microsoft/graphitation/blob/17694def96c9bfc43b4a39c57ac30a5d0a510edd/change/%40graphitation-apollo-react-relay-duct-tape-8977b470-e2cd-4530-b056-a4d1c7b8f3c4.json
- https://github.com/microsoft/graphitation/blob/17694def96c9bfc43b4a39c57ac30a5d0a510edd/change/relay-compiler-language-graphitation-d4a68aba-a191-43fa-961f-b1cd49a07927.json
…where 1 has a dependency on 2, this line ends up using the dependentChangeType of the change file (which is patch rather than prerelease) and then uses that instead of the original prerelease change type of 1.
One thing that's unclear to me Is wether dependentChangeType in the change file(s) is supposed to be patch when type is prerelease?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/bump/updateRelatedChangeType.ts, especially the handling referenced at lines 44 and 75-78, and compare it with the two linked change files. Reproduce the dependency case where both changes request a prerelease, then establish and test the expected handling of dependentChangeType so the published version matches the intended prerelease behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100