facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.25k stars 626 forks source link

FileSystem: Replace getRealPath with lookup - allow for extended information #1215

Closed robhogan closed 9 months ago

robhogan commented 9 months ago

Summary: Implement FileSystem.lookup(), replacing FileSystem.getRealPath(), both internal APIs.

This is motivated by incremental resolution - in particular, we'll need to return more information from TreeFS in the context of resolution for both existence (which symlinks have been traversed that would invalidate a resolution if deleted) and non-existence (the first non-existent real path, and the symlinks traversed to get there), so we switch to an extensible object for both cases vs the current ?string.

Changelog: Internal

Reviewed By: huntie

Differential Revision: D52390401

facebook-github-bot commented 9 months ago

This pull request was exported from Phabricator. Differential Revision: D52390401

facebook-github-bot commented 9 months ago

This pull request has been merged in facebook/metro@c6672cc62106858e824a30b52d6eaa740b2e8d70.