Repository navigation
Conversation
… React Native libraries Detection can now, when asked, detect a declared package that imports react-native without declaring it (#763). Each package's walk is cached on disk until its installed package.json changes; nothing passes the option yet.
… point A package with no root export counts when it has a ./react-native subpath, or one carrying a react-native condition, that the project imports. Its other subpaths, such as ./react, are ignored.
…nd nested names, and Yarn's patch: protocol
This branch has not been deployed
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
Ecosystem detection can, when asked, detect a declared package that imports
react-nativewithout declaring it, and caches each package's runtime-imports walk on disk. Nothing passes the option yet, so behaviour is unchanged.Why
A React Native library with no
react-nativedependency or peer is invisible to manifest detection (#763). Its runtime graph carries the signal, but walking every declared package costs hundreds of milliseconds per config evaluation, too much to pay on every start.Changes
src/native/runtime-imports-cache.ts: one entry per installed package, keyed by its directory and valid while itspackage.jsonname, version, size and mtime are unchanged. Packages outside node_modules and patched packages (patch-package, pnpm and bunpatchedDependencies) are never cached. Stored innode_modules/.cache/vitest-nativeand written atomically.detectEcosystemPackagestakesundeclaredReactNative: { cacheFile }../react-nativesubpath, or one carrying areact-nativecondition, that the project imports. Other subpaths such as./reactare ignored.Notes
Part of #763.