Repository navigation
Conversation
*Recreating #1708 / [D104415558](https://www.internalfb.com/diff/D104415558) (@motiz88) for GH first without a diff attachment* D102004228 added `[metro-project]`/`[metro-watchFolders]` virtual URL pathname resolution to `_getEntryPointAbsolutePath`, but this method doesn't take URL pathnames - it takes actual filesystem paths (ultimately from Metro's API / CLI). The fix removes virtual prefix resolution from `_getEntryPointAbsolutePath`, making it a plain `path.resolve(serverRootDir, entryFile)` call, consistent with `buildGraph` which already treats the entry file as a plain disk path. Changelog: * **[Fix]:** Remove erroneous `[metro-project]` and `[metro-watchFolders]` resolution from API and CLI Test plan: See [D104415558](https://www.internalfb.com/diff/D104415558)
Contributor
There was a problem hiding this comment.
Copilot review overview
馃煝 Approval recommended
The focused implementation matches existing graph resolution behavior and is covered by an appropriate integration test.
Review effort: Balanced
Findings: None
What changed in this PR
Removes URL-prefix interpretation from API/CLI entry paths so literal filesystem directories resolve correctly.
Changes:
- Resolves entry files directly against Metro鈥檚 server root.
- Enables the regression test for a literal
[metro-project]directory.
| File | Description |
|---|---|
packages/鈥媘etro/鈥媠rc/鈥婼erver.js |
Treats entry points strictly as filesystem paths. |
packages/鈥媘etro/鈥媠rc/鈥媔ntegration_tests/鈥媉_tests__/鈥媌uild-test.js |
Activates regression coverage for literal prefix-like directories. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
huntie
approved these changes
Oct 6, 2026
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.
Recreating #1708 / D104415558 (@motiz88) for GH first without a diff attachment
Closes: #1708
D102004228 added
[metro-project]/[metro-watchFolders]virtual URL pathname resolution to_getEntryPointAbsolutePath, but this method doesn't take URL pathnames - it takes actual filesystem paths (ultimately from Metro's API / CLI).The fix removes virtual prefix resolution from
_getEntryPointAbsolutePath, making it a plainpath.resolve(serverRootDir, entryFile)call, consistent withbuildGraphwhich already treats the entry file as a plain disk path.Changelog:
[metro-project]and[metro-watchFolders]resolution from API and CLITest plan:
See D104415558