Feature/internal resolve#4315
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Not sure about the above errors, but I don't think they're related to this PR. Locally, all tests pass when I |
… just default_resolver.
|
Fixed one problem that wasn't locally checked. ( |
|
Note that there is a new file - |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
| @@ -0,0 +1,47 @@ | |||
| import type {Path} from 'types/Config'; | |||
There was a problem hiding this comment.
Can you add the copyright header just like in other files?
Also, since it's adapted from resolve, an extra annotation is necessary:
/**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* Adapted from: https://github.com/substack/node-resolve
*
* @flow
*/
…default_resolver.js.
|
One more fix, this time to remove unused optional fields that flow(?) was complaining about. Generally speaking, it would be nice if (a) CI didn't fail so frequently for unrelated problems, and (b) it was possible / obvious how to run all checks locally. |
|
Thanks for the initial PR, this is great! In a follow-up, do you mind changing all the single-expression if-statements to wrap them with curly-braces? That's the code style we use in this repo :) |
|
Also, could we add support for the "browser" field in a follow-up and remove "browser-resolve"? I would love it if we could drop that dependency :) |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Removes dependency on
resolvepackage and pulls all necessary code intodefault_resolver.js, with minor cleanup and added type definitions.This is a preparatory step for improving the performance of
resolve(#2925).Test plan
Passes all existing tests of the legacy
resolve.sync()behavior.