Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
Summary:
Argument was no longer used and is causing lint errors.
Dropping it simplifies the debounce function as well.
Reviewed By: davidaurelio
Differential Revision: D6999567
fbshipit-source-id: 8856ed40feb0fa23155c9d18e20c43550aac876b
Summary: Continue cleaning up the resolution algo. By removing the class completely as well as the `TModule` type, and providing options via the `context`, we'll be able to identify clearly the inputs of the resolution algorithm, and reuse it eventually for Jest. This changeset extract one more function in this fashion. Next steps: extract the rest of the stateful code into functions, or into `ResolutionRequest`.
Reviewed By: davidaurelio
Differential Revision: D6937569
fbshipit-source-id: bab0bcd280be32a11f23174b0591dd0cc7dee7ab
Summary:
**Summary**
The cache dir name now starts with `metro-bundler-cache-` but the message still refers to `react-`.
This just wasted a bit of my time before I realized and that's not the first time this happens either.
Also I don't have `$TMPDIR` defined on vanilla ubuntu, I think using that instead of `/tmp` creates more confusion than helps.
**Test plan**
Just a change in a string constant.
I signed the CLA.
Closes https://github.com/facebook/metro/pull/131
Differential Revision: D6923347
Pulled By: rafeca
fbshipit-source-id: 4e816e5d0c75b0d2ee5ddf4d92d2d7397011d4e4
Summary: For React's new fragment syntax (`<>Foo</>`) to work, we need to upgrade from Babylon 6.
Reviewed By: dwwoelfel
Differential Revision: D6888282
fbshipit-source-id: 5212cc9439a2f79febc72e0f9eef1a7f6b700266
Summary:
I think the default value for the `--source-map` option is true, although it's not defined that way explicitly. Regardless, when it's explicitly set to `false` I would expect Metro to at least listen to that. Currently that's not the case. This diff attempts to improve that situation.
Note that it's still not perfect since there are more places where sourcemaps are still being touched when this flag is `false`. It turns out adding a proper flag for this leads to a lot of cascading type problems and so I ended up with this fix instead.
Reviewed By: rafeca
Differential Revision: D6884423
fbshipit-source-id: 7fe10045d9d9f73c7841588627ba41b14c2e412b
Summary: Don't bother to work on the source map if it won't be used anyways
Reviewed By: rafeca
Differential Revision: D6884244
fbshipit-source-id: ac014bf982e33c669a1e79f16dd06149e758a797
Summary:
This function was working on a source map object inline and then returning the same reference.
For clarity it's better if it either clones the whole thing (that would be a waste) or not return the reference at all. Also renamed the function (but not the file) for clarity.
Dropped the unused check and updated callsites instead.
Reviewed By: mjesun
Differential Revision: D6884241
fbshipit-source-id: 33aa7a1ad7096510903bbb74dd6b9c675b81aff5
Summary: Don't bother to work on the source map if it won't be used anyways
Reviewed By: mjesun
Differential Revision: D6884247
fbshipit-source-id: 811409313e7ac1a7255ddd0eed665ed92020241e
Summary: Don't bother to work on the source map if it won't be used anyways
Reviewed By: mjesun
Differential Revision: D6884243
fbshipit-source-id: 483664ad32a72a8e6e3de3e0cc224b3a6ea67d46
Summary: This prevents unnecessary JSON.stringify/JSON.parse when the operation is noop anyways.
Reviewed By: mjesun
Differential Revision: D6884246
fbshipit-source-id: 3370caac1e01cb79f86af95f0dd06285150c5d95