-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow Haste modules with separators, and require Haste packages to…
… have standard valid package names Summary: Currently, with `allowHaste`, an input `moduleName` of `foo/bar/baz` will call `resolveHasteModule` with `foo/bar/baz` and `resolveHastePackage` with each of `foo/bar/baz`, `foo/bar` and `foo` until a match is found. This is quite inefficient at the top of the resolver algorithm, especially for deeply nested paths. We can tidy up a bit here by narrowing the definition of a Haste module name and a Haste package name. - A Haste module name must not contain path separators - A Haste package name must be a valid (npm) package name, i.e. `'simple'` or `'scoped/package'`. ``` - **[Breaking]**: Disallow Haste modules with separators and Haste packages with invalid package names. ``` Reviewed By: huntie Differential Revision: D64323177 fbshipit-source-id: 0f3e0342beb13499fc91f086b26aff339f96e877
- Loading branch information
1 parent
c1c80c7
commit 4e9cc4b
Showing
2 changed files
with
108 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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