👷 Use workspace:* protocol for internal monorepo dependencies - #5016
👷 Use workspace:* protocol for internal monorepo dependencies#5016BenoitZugmeyer wants to merge 1 commit into
Conversation
Bundles Sizes Evolution
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: e8ca3cb | Docs | View more details | Give us feedback! |
Internal @DataDog dependencies were pinned to the exact release version in every package.json, requiring all of them to be updated on each release and causing merge conflicts on release branches. Switch to Yarn's workspace:* protocol, which resolves to the local package version at install time and is rewritten to the concrete version when publishing to npm.
cf9d0e8 to
e8ca3cb
Compare
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Motivation
Internal
@datadogdependencies were hardcoded to the exact release version (e.g.7.11.0,0.0.12) in everypackage.json. This requires updating all of them on each release and causes avoidable merge conflicts on release branches.Changes
@datadog/*dependencies inpackages/*/package.json(dependencies, devDependencies, and peerDependencies) from hardcoded versions to Yarn'sworkspace:*protocol.checkBrowserSdkPackageJsonFilesCI check to assert internal dependencies useworkspace:*instead of matching a concrete version, and removed the now-unneededindependentVersionsmap (js-core is now also referenced viaworkspace:*).yarn.lock(registry resolutions replaced by pure workspace references).workspace:*resolves to the local package version at install time and is rewritten to the concrete version when publishing to npm (yarn workspaces foreach ... npm publishinpublish-npm.ts), so published artifacts are unaffected.Test instructions
yarn installand confirm it resolves cleanly from workspaces.yarn typecheck.yarn pack --dry-runon a package (e.g.packages/browser-rum) that the packedpackage.jsonshows concrete versions, notworkspace:*.Checklist