-
Notifications
You must be signed in to change notification settings - Fork 7
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
UIAPPS-104 Link UI Extensions packages #97
UIAPPS-104 Link UI Extensions packages #97
Conversation
We want all `@datadog/ui-extensions-` packages to have the same version. This is explained in more detail in the `RELEASE.md` file. The long and short is that it should be easier on App Developers if they don't have to manage different sets of versions, and rather can just install one version for everything. We add a script that checks that all the `@datadog/ui-extensions-*` packages have a changeset if any of them do. This script works in tandem with the change to `.changeset/config.json` where we link all `@datadog/ui-extensions-*` packages together. It's a bit unfortunate that we have to roll a script for this, but it's not the end of the world. If changesets gets this behavior, we can move over to using that instead of this two-pronged approach. Now, we can start adding packages.
We don't want to force a major bump unnecessarily. For our use case, we don't want the packages to bump a major version. We should ask upstream what the situation is and if there's a way to get the behavior we want.
* Checks that if any `@datadog/ui-extensions-*` package is getting a release, | ||
* all `@datadog/ui-extensions-*` packages are getting a release. | ||
* | ||
* While `changesets` does have support for "linked" packages: | ||
* https://github.com/changesets/changesets/blob/main/docs/linked-packages.md, | ||
* it's not exactly what we want. | ||
* The way "linked" packages work, | ||
* we can still leave out packages that we want to be on the same version. | ||
* | ||
* We do still want "linked" packages in our `.changeset/config.json`, | ||
* since it means we'll always get everything on the same version. | ||
* To that end, | ||
* this check doesn't need to actually look at specific version numbers. | ||
* We just have to catch packages that might be missed. | ||
* | ||
* The behavior we want is actually what's being proposed as "fixed" packages: | ||
* https://github.com/changesets/changesets/pull/690. | ||
* Until that feature is released, | ||
* we have this check to make sure we release packages in lock-step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow thank you for enforcing this in code and documenting so well. I tend to opt for manual enforcement of such things, which inevitably ends up not working
thanks for the review! |
@joneshf-dd I've noticed that you are interested in the fixed mode that is being implemented for Changesets. I'm wondering if you have looked into the PR and if it matches your expectations or if maybe you have imagined the feature to work differently? |
Hey, thanks for reaching out! I think based on the description, and the linked conversations, it'll likely do what we want. But I haven't run any of that code yet, so I can't say with certainty. E.g. We found that the behavior of peer dependency version bumps didn't quite work out how we wanted and had to work around that. Even if there are things that don't work quite the way we want, if it lets us get rid of our ~60 lines of reactionary code in favor of a single line of proactive config, it'll be a win in my book. No matter the case, I'm excited to try out the fixed mode. Can't wait for it to land! |
Motivation
react
package #94, it turned out there was a lot of work just to make the packages link together properly. We pull that out so it's separated.Changes
@datadog/ui-extensions-
gets locked together with the same version. This took some extra work to makechangesets
still work the way we want. Hopefully if Add support forfixed
packages changesets/changesets#690 merges, it'll mean we can remove a lot of this behavior.There's also a patch that we had to do to the
@changesets/assemble-release-plan
package that we should ask about.Testing
Releases
Choose one:
If you're only updating examples/documentation, this is likely what you want.
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via: