fix(babel-plugin-lingui-macro): restore @babel/types as a runtime dependency - #2634
Open
andrii-bodnar wants to merge 1 commit into
Open
fix(babel-plugin-lingui-macro): restore @babel/types as a runtime dependency#2634andrii-bodnar wants to merge 1 commit into
@babel/types as a runtime dependency#2634andrii-bodnar wants to merge 1 commit into
Conversation
…ependency `@babel/types` is imported as a runtime value in ~140 places across the plugin sources (`t.identifier`, `t.stringLiteral`, `t.isStringLiteral`, …) and survives into the build as `import * as t from '@babel/types'` in `dist/shared/*.mjs`. #2623 moved it from `dependencies` to an *optional* `peerDependency`, so package managers neither install it nor warn. Resolution then only succeeded when `@babel/types` happened to be hoisted into the consumer tree; under strict or nested resolution it failed with `ERR_MODULE_NOT_FOUND`. Move it back into `dependencies` and drop the redundant devDependency entry. `@babel/core` stays an optional peer since it is type-only at runtime, so Babel 8 support from #2623 is unaffected. Fixes #2628 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
size-limit report 📦
|
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.
@babel/typesis imported as a runtime value in ~140 places across the plugin sources (t.identifier,t.stringLiteral,t.isStringLiteral, …) and survives into the build asimport * as t from '@babel/types'indist/shared/*.mjs.#2623 moved it from
dependenciesto an optionalpeerDependency, so package managers neither install it nor warn. Resolution then only succeeded when@babel/typeshappened to be hoisted into the consumer tree; under strict or nested resolution it failed withERR_MODULE_NOT_FOUND.Move it back into
dependenciesand drop the redundant devDependency entry.@babel/corestays an optional peer since it is type-only at runtime, so Babel 8 support from #2623 is unaffected.Fixes #2628
Description
Types of changes
Checklist