fix(deps): declare @babel/generator and @babel/traverse as dependencies#9873
Merged
MatiPl01 merged 1 commit intoJul 3, 2026
Merged
Conversation
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.
Summary
Fixes #9648. Follow-up to #9511.
The bundled Worklets Babel plugin keeps its Babel imports external (
packages: 'external'inplugin/bundle.js), so the published bundle callsrequire('@babel/generator')andrequire('@babel/traverse')at runtime. Neither package is declared independencies, so package managers with an isolated layout (e.g. pnpm 11 with a global virtual store) fail to load the plugin with:This PR declares both packages as dependencies, the same way #9511 did for
@babel/types. Both ranges resolve to versions already present in the dependency tree, so no new packages are pulled in.Test plan
Used the reproduction from #9648 (pnpm 11,
enableGlobalVirtualStore: true,node repro.jsloadingreact-native-worklets/plugin):react-native-workletspacked frommainwithout this change: fails withCannot find module '@babel/generator'Plugin loaded successfully.