Skip to content

chore: use workspace protocol, reconsider peerDeps#2426

Merged
andrii-bodnar merged 4 commits intonextfrom
use-workspace-protocol
Jan 30, 2026
Merged

chore: use workspace protocol, reconsider peerDeps#2426
andrii-bodnar merged 4 commits intonextfrom
use-workspace-protocol

Conversation

@timofei-iatsenko
Copy link
Collaborator

@timofei-iatsenko timofei-iatsenko commented Jan 29, 2026

Description

  • use workspace protocol to link packages in the monorepo. It's more conviniet to work, since version is not changing after every release and not produce diffs and merge conflicts. Also that ensures versions are synchronized. I tested and modern lerna understand workspace protocol without problems.
  • I moved @lingui/babel-plugin-lingui-macro to the direct deps of the core and react packages. I considered all pros and cons, and decided that it has more pros to just install and forget. (that was added as optional peer because user might use swc plugin and don't need this babel, but it seems that drawbacks of bumping peerDependencies on every release is bigger than installation size of the package).
  • i removed @babel/runtime from direct dependencies of many packages - this was a leftover from previous build pipeline.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Examples update

Fixes # (issue)

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
js-lingui Ready Ready Preview Jan 29, 2026 1:47pm

Request Review

@github-actions
Copy link

size-limit report 📦

Path Size
packages/core/dist/index.mjs 1.77 KB (0%)
packages/detect-locale/dist/index.mjs 618 B (0%)
packages/react/dist/index.mjs 1.21 KB (0%)

@andrii-bodnar andrii-bodnar added this to the v6 milestone Jan 29, 2026
@andrii-bodnar
Copy link
Contributor

Looks good to me. I had to look into how it will be handled during the release process. I'm just leaving this information here.

Since Lerna 6+, when you run lerna publish, Lerna delegates to Yarn (because of "npmClient": "yarn" in the lerna.json), and Yarn handles the workspace: protocol transformation according to its documented behavior:

Your package.json Published package.json
"workspace:*" "=5.9.0"
"workspace:^" "^5.9.0"
"workspace:~" "~5.9.0"

https://yarnpkg.com/features/workspaces#cross-references

Using workspace:* will give:

"@lingui/conf": "=5.9.0"

Which is the same as the 5.9.0 value.

@andrii-bodnar andrii-bodnar merged commit 8b26bf7 into next Jan 30, 2026
8 checks passed
@andrii-bodnar andrii-bodnar deleted the use-workspace-protocol branch January 30, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants