Switch to independent (per-package) versioning#190
Draft
leoromanovsky wants to merge 1 commit intomainfrom
Draft
Switch to independent (per-package) versioning#190leoromanovsky wants to merge 1 commit intomainfrom
leoromanovsky wants to merge 1 commit intomainfrom
Conversation
Each package now has its own version and release lifecycle instead of all
packages sharing a single version from lerna.json. This avoids empty
version bumps for node-server when only browser changes ship.
Tag convention: core-v{ver}, browser-v{ver}, node-server-v{ver}
Collaborator
|
@leoromanovsky This is going to complicate our release notes and changelog. It's a lot easier to grok if everything operates under the same version. IMO, a noop isn't that big of a deal. |
Collaborator
Author
Just exploring it's not ready for review yet; personally don't think it's too big of a deal for nodejs and browser to be released even if one doesn't have any changes for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The monorepo currently uses Lerna fixed versioning — all 3 packages share one version and are always released together. This causes empty version bumps for
node-server(consumed bydd-trace-js) when only browser changes ship, creating noise for downstream consumers.This PR switches to independent versioning so each package has its own version and release lifecycle.
Changes
Lerna is now configured in
"independent"mode, with each package'spackage.jsonas its own version source of truth. All scripts that previously read a single version fromlerna.jsonhave been updated to read from the relevantpackage.jsoninstead — the build system resolves the version by walking up from the package being built, the peer-dependency updater maps each internal dep to its actual version, and the CI validation script now checks that internal dependency versions are consistent across packages rather than enforcing a single global version.The release workflow uses per-package git tags (
core-v{version},browser-v{version},node-server-v{version}). When a GitHub Release is created with one of these tags, the workflow parses the tag to determine which package to publish and validates the version against that package'spackage.json. If the package depends on@datadog/flagging-coreand that version isn't on npm yet, core is published first automatically. Changelog generation now produces per-package headers (e.g.## @datadog/openfeature-browser v1.2.0) and filters commits to the affected package.From a developer perspective,
yarn releasenow prompts for a version bump per changed package instead of applying one version to everything. Release branches and GitHub Releases are scoped to individual packages (e.g.release/browser-v1.2.0), and you create a separate GitHub Release for each package tag that needs publishing. Everything else —yarn build,yarn test,yarn format:check— works exactly the same.Decisions
core-v{version},browser-v{version},node-server-v{version}— clear prefix-based conventiongetLastReleaseTagName()matches both old## v1.2.3and new## @datadog/package-name v1.2.3formatsTest plan
yarn buildsucceeds (all 3 packages)yarn testpasses (368 tests: 25 core + 106 browser + 237 node-server)yarn format:checkpassesyarn lintpassesbash scripts/versions-validate.shpasses with packages at same version