Feature Request: Support changesets for repos with multiple releases per package
See original GitHub issueThe Problem
I have a simple repo which looks like this:
index.js
module.exports = () => {
if (process.env.PLATFORM === 'web') {
console.log('Hi web');
} else if (process.env.PLATFORM === 'ios') {
console.log('Hi Steve');
} else {
console.log('Beep Boop'); // Android
}
}
And I have a build process setup:
(imaging there's a webpack config here)
Important to note in this build process is the output bundle changes depending on the value of PLATFORM
env var.
End goal
Because I have two separate platforms generated from the one codebase, I also want two separate changelogs generated.
For example, I may want:
changelog-ios.md
# beingawesome
## 1.0.0
### Major Changes
- Initial release
changelog-web.md
# beingawesome
## 1.0.0
### Major Changes
- Initial release
… etc.
But now I realise there’s a bug on iOS, so I do a fix:
index.js
- console.log('Hi Steve');
+ console.log('Hi iOS');
So now I want to release only the ios variant (PLATFORM=ios
).
Which means I only want to generate a change to the changelog-ios.md
file:
changelog-ios.md
# beingawesome
+## 1.0.1
+### Patch Changes
+- Fix output for iOS
## 1.0.0
### Major Changes
- Initial release
Alternative
Alternatively, the changelogs may be combined into one:
changelog.md
# beingawesome
## Android 1.0.0
### Major Changes
- Initial release
## iOS 1.0.0
### Major Changes
- Initial release
Then the above change would look like:
# beingawesome
+## iOS 1.0.1
+### Patch Changes
+- Fix output for iOS
## Android 1.0.0
### Major Changes
- Initial release
## iOS 1.0.0
### Major Changes
- Initial release
Proposed solution
?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
changesets/changesets: A way to manage your versioning ...
Changesets has a focus on solving these problems for multi-package repositories, and keeps packages that rely on each other within the multi-package ......
Read more >Adopting Changesets for release and changelog automation
The tools work great and they are very helpful to manage and release multiple packages within the same repository.
Read more >Find and view changesets - Azure Repos | Microsoft Learn
Find a changeset by ID. In Visual Studio Source Control Explorer, press Ctrl+G. The Go to Changeset dialog box appears.
Read more >Contributing | skuba - GitHub Pages
When a pull request with a changeset is merged, our CI workflow will create a new Version Packages PR. The changesets are used...
Read more >Version control concepts and best practices
In distributed version control, each user gets his or her own repository and working copy. ... merge requests help from the user by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for raising this!
There’s a bit of a bigger thing that might require some sparring (assuming you only have one
package.json
, have you bumped it to1.0.1
- what does that mean for next time you release android)as well as the fact that changelogs currently allow you to generate lines but not the whole added block.
The changelog generation is something we want to rethink at some point to get a right mix between ‘I can have exactly my preferred format’ and 'this is easy to set up and I don’t have to think about it.
If we move a bit slow and you need this, I’d recommend writing a custom
version
command that would look something like:Yep, that.