Commit Graph

1736 Commits

Author SHA1 Message Date
Eli White 42b7e6fcdf Remove $FixMe flow suppression
Reviewed By: sahrens, kassens

Differential Revision: D6426829

fbshipit-source-id: b10e33117cf4adf6bb39fc95a9ffa1e268e7c835
2017-11-30 04:03:29 -08:00
Rafael Oleza 750e62bcdf Remove transformAndExtractDependencies() method in worker
Reviewed By: mjesun, davidaurelio

Differential Revision: D6433590

fbshipit-source-id: ef3c31d73a831fabe2a6f1be6051b0cb5c7e6c55
2017-11-30 04:03:29 -08:00
Jean Lauliac 86aba17329 metro: clean up Module option, remove some from state
Reviewed By: davidaurelio

Differential Revision: D6435957

fbshipit-source-id: eaed8f5c1d4d18d6ff0bde34892f059a01fe1a65
2017-11-30 04:03:29 -08:00
Christoph Nakazawa 575142d0c2 Add script to automatically deploy the website
Reviewed By: rafeca

Differential Revision: D6435717

fbshipit-source-id: dbbf4fed745ac460becc03ca2c4f4ae3a0249314
2017-11-30 04:03:29 -08:00
Jean Lauliac ec4a0ce527 packager-worker-for-buck: resolve at bundling time using js_library resolution information
Reviewed By: davidaurelio

Differential Revision: D6414372

fbshipit-source-id: 7bb0404e51a6130dfc89adb9476ad829020e76f0
2017-11-30 04:03:29 -08:00
Christoph Nakazawa 66b381a5c7 Export Config/defaults on Metro's main module
Reviewed By: arcanis

Differential Revision: D6435529

fbshipit-source-id: a9549dc5900025fcc798ccb92b49e96c982c2e1e
2017-11-30 04:03:29 -08:00
cpojer 0f7ad193c7 Rename metro-bundler to metro
Reviewed By: davidaurelio

Differential Revision: D6413420

fbshipit-source-id: f13184b8157de2c3aeaa7f2647becc175f62cdbb
2017-11-30 11:56:25 +00:00
Maël Nison 9249ebcea7 Adds a (deprecated) --reset-cache option
Reviewed By: BYK

Differential Revision: D6424553

fbshipit-source-id: f84064f86a985ab19794ea3d94410dceac77a95b
2017-11-29 00:45:23 -08:00
Burak Yigit Kaya cf9ef1b30f Make `assetTransforms` option available to the new metro CLI
Reviewed By: arcanis

Differential Revision: D6424404

fbshipit-source-id: 30c56128b914d86491fce6276775d75e7b497146
2017-11-29 00:45:23 -08:00
Peter van der Zee 37995e2196 Add a bundle type to logger output and type
Reviewed By: rafeca

Differential Revision: D6405599

fbshipit-source-id: 2f3da971d55fae28fbd94ed9f60d3bc2be176d6a
2017-11-28 04:55:00 -08:00
Rafael Oleza b0de96c74a Small refactor in module resolution
Reviewed By: jeanlauliac

Differential Revision: D6417509

fbshipit-source-id: 9c6abb8ceebb7048c775c9c9d21cd881f7e56c1f
2017-11-28 04:35:55 -08:00
Maël Nison 5cc0939454 Automatically watches the metro configuration file
Reviewed By: BYK

Differential Revision: D6408358

fbshipit-source-id: d167534c9c51c3c079148d982ef4ab44c8be0d75
2017-11-28 04:35:55 -08:00
Miguel Jimenez Esun b282031517 Make tests compatible with the latest Jest version
Reviewed By: cpojer

Differential Revision: D6419868

fbshipit-source-id: f01a3f4d54ca1aa3539d92363a51f70247642463
2017-11-28 03:34:45 -08:00
Rafael Oleza ac2aa718c0 Bump metro-bundler@0.22.1
Reviewed By: mjesun

Differential Revision: D6415105

fbshipit-source-id: 51687fd20fc5958a3b18d704ffa100400d208057
2017-11-27 11:29:54 -08:00
Rafael Oleza d46e4ecb6a Keep the dependencyMaps consistent between runs
Reviewed By: mjesun

Differential Revision: D6413998

fbshipit-source-id: fd0ff9a82dcca23603977456b51213216c370f8d
2017-11-27 08:52:03 -08:00
Maël Nison 167bda72b0 Fixes various issues on the Metro CLI
Reviewed By: rafeca

Differential Revision: D6407718

fbshipit-source-id: 871dd77fad4fcf8f6b0fa628bacc0dfb6cb51484
2017-11-27 04:36:12 -08:00
Burak Yigit Kaya 319220d870 Do not return a promise from transformers unless we have to
Reviewed By: mjesun

Differential Revision: D6405568

fbshipit-source-id: 09463442aecdb844e18498c3b3ce169d2915fe77
2017-11-27 02:32:39 -08:00
Rafael Oleza 091f8560f2 Make inlineRequires boolean when passed to the transformer
Reviewed By: mjesun

Differential Revision: D6408081

fbshipit-source-id: 812c8e3983677f4133ef3080525859a4a70418b7
2017-11-26 11:20:57 -08:00
Rafael Oleza 2d03a34bbc Remove isJSON() method from Module
Reviewed By: cpojer

Differential Revision: D6408739

fbshipit-source-id: 3f1b76ca54937fbc433d4e7a804a9703a3a2ccb7
2017-11-24 13:06:22 -08:00
Rafael Oleza 75047399d8 Simplify transform options + pass minify to the transformer
Reviewed By: mjesun

Differential Revision: D6406614

fbshipit-source-id: 722e8e209c7b7c922139f0777b9b3bd2a77bf735
2017-11-24 13:06:22 -08:00
Christoph Nakazawa 06466e4f6e Remove some of the whitespace from the progess output
Reviewed By: rafeca

Differential Revision: D6408458

fbshipit-source-id: 2e6c50baedbd53ce4271edc337fada3b628d9c63
2017-11-24 11:56:57 -08:00
Alexey 95c1eda902 Straightforward deploy approach
Summary:
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->

**Summary**

As rafeca mentioned on Discord channel, `deploy` script fails. This PR is composed with intention to fix this error.

**Test plan**

- Try to deploy a new version using CircleCI config from this PR
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->
Closes https://github.com/facebook/metro-bundler/pull/94

Reviewed By: mjesun

Differential Revision: D6405189

Pulled By: rafeca

fbshipit-source-id: 9adca768044515784474aa6f71ca6f733db5b07e
2017-11-24 07:35:55 -08:00
Christoph Nakazawa b6a4185158 Move README text to documentation
Reviewed By: mjesun

Differential Revision: D6407519

fbshipit-source-id: 0c497b7a294861b6b92ac4ebc3aa64c632a3436f
2017-11-24 03:08:08 -08:00
Rafael Oleza b08ce130fd Move wrapModule logic for scripts, modules and JSON files to the transformer
Reviewed By: davidaurelio

Differential Revision: D6389116

fbshipit-source-id: fa43bd54669849c22b6b9d155ab07676b2455ef7
2017-11-23 15:40:03 -08:00
Rafael Oleza b193fc3436 BREAKING: metro transformers should only output AST
Reviewed By: jeanlauliac

Differential Revision: D6396416

fbshipit-source-id: e4c6f0c0feb1ac638dc13dd3eb400f1bc72b5d44
2017-11-23 15:40:03 -08:00
Jean Lauliac f434d43f54 metro-bundler: RAM bundles cannot contain scripts masquerading as modules
Reviewed By: davidaurelio

Differential Revision: D6405614

fbshipit-source-id: 6c21fd30d6246f50c34e9f23a193452737a3b67b
2017-11-23 12:10:21 -08:00
Peter van der Zee ccd8eae0b0 Fix terminal string chunker to ignore non-printable color seqs
Reviewed By: rafeca

Differential Revision: D6405127

fbshipit-source-id: 94fd12a04db43a790af34fdee36be9d7f8ecf59d
2017-11-23 10:11:54 -08:00
Burak Yigit Kaya b7ba5c7ee1 Support async transformers
Reviewed By: rafeca, mjesun

Differential Revision: D6405491

fbshipit-source-id: 7110135e9f75ab43c03710abfa8e582577662ab3
2017-11-23 09:56:44 -08:00
Peter van der Zee a766a4a499 Update http progress output in cli; add platform, shorten rest
Reviewed By: rafeca, davidaurelio

Differential Revision: D6395717

fbshipit-source-id: 0fed7f29539bb59bc300d88b09a99be13bbb42ba
2017-11-23 08:27:13 -08:00
Rafael Oleza 6557272f8c Avoid losing deltas when unexpected errors happen on the DeltaTransformer
Reviewed By: jeanlauliac

Differential Revision: D6402261

fbshipit-source-id: 6a1a18c1bd7d4f7cecd5a5e9114f6eb493d40b4d
2017-11-23 08:27:13 -08:00
Rafael Oleza 70dadc63f9 Update Readme + change default transform
Reviewed By: cpojer

Differential Revision: D6401596

fbshipit-source-id: 8928abb825933edd84c508a4f04f50c748725722
2017-11-23 03:06:48 -08:00
Burak Yigit Kaya 7b5ae96479 Add option to bypass AssetRegistry and sending assets to transforms
Reviewed By: rafeca

Differential Revision: D6385816

fbshipit-source-id: b94fb125bee0576cfb25170aa86a253c10a3d862
2017-11-23 02:38:19 -08:00
Rafael Oleza 5f58ae0e84 Metro reads AST from transformers if available
Reviewed By: BYK

Differential Revision: D6396330

fbshipit-source-id: 10539a1cce81b090a781df7d75515d52ece9ef9c
2017-11-22 13:36:20 -08:00
Rafael Oleza c9e0589171 Allow HMR client accept wrapped modules from metro
Reviewed By: davidaurelio

Differential Revision: D6385273

fbshipit-source-id: 15109332aceb4c0523c668a54b1bf40d8e8fba80
2017-11-22 11:37:20 -08:00
Christoph Nakazawa ef9b4b0f0f Metro Website scaffold
Reviewed By: jeanlauliac

Differential Revision: D6396202

fbshipit-source-id: 9bfa3f88fdd747732566a95ded204f8f5206b350
2017-11-22 09:21:33 -08:00
Jean Lauliac 52a76cb5af packager-worker-for-buck: refactor and fix source map output
Reviewed By: davidaurelio

Differential Revision: D6385199

fbshipit-source-id: f104f7b000dde131b57b671d14d4ec4e0d30d7a2
2017-11-22 05:08:49 -08:00
Peter van der Zee efceeacd77 Move Option types from Server to shared/types.flow
Reviewed By: davidaurelio

Differential Revision: D6384292

fbshipit-source-id: 58cba889f549cbd7a8c82856d5283048f4f2a8c5
2017-11-22 03:57:33 -08:00
Flarnie Marchan 1017f8ab7e Add CODE_OF_CONDUCT.md
Summary:
**what is the change?:**
Adding a document linking to the Facebook Open Source Code of Conduct,
for visibility and to meet Github community standards.

**why make this change?:**
Facebook Open Source provides a Code of Conduct statement for all
projects to follow.

Metro already links to this Code of Conduct in the CONTRIBUTING, which is
great!

Exposing the COC via a separate markdown file is a standard being
promoted by Github via the Community Profile in order to meet their Open
Source Guide's recommended community standards.

As you can see, adding this file will complete [Metro's Community Profile](https://github.com/facebook/metro-bundler/community)
checklist and increase the visibility of our COC.

**test plan:**
Viewing it on my branch -
![screen shot 2017-11-20 at 5 10 01 pm](https://user-images.githubusercontent.com/1114467/33049599-c36b316e-ce15-11e7-9041-0fa228a74ce4.png)

**issue:**
internal task t23481323
Closes https://github.com/facebook/metro-bundler/pull/93

Reviewed By: cpojer

Differential Revision: D6395546

Pulled By: flarnie

fbshipit-source-id: dacc85abed53cec3e6200daa8fe139cd6c53b7a0
2017-11-22 02:58:16 -08:00
Rafael Oleza 4f3c4ca238 Remove @format and trailing commas from mapCoverage
Reviewed By: cpojer

Differential Revision: D6388338

fbshipit-source-id: ef33f530397e8ca3de8625b33333df2d57d228d3
2017-11-22 02:40:53 -08:00
Rafael Oleza d4b7cb5d08 Bump metro to v0.21.1
Reviewed By: mjesun

Differential Revision: D6385524

fbshipit-source-id: 189f03466f8e84a9ac3acfd1aa0faf4f39d394f2
2017-11-21 10:28:18 -08:00
Jean Lauliac 507fbd7d7e packager-worker-for-buck: store resolutions at library level
Reviewed By: davidaurelio

Differential Revision: D6359267

fbshipit-source-id: 795d451c6ff32c07842e9e067778136180a9988e
2017-11-21 07:08:28 -08:00
Rafael Oleza 6ec09775ef Upgrade uglify-es to 3.1.9
Reviewed By: davidaurelio

Differential Revision: D6309485

fbshipit-source-id: 17d8b66a2a676a9a556509e28a48ee703fc6da89
2017-11-21 06:44:11 -08:00
Rafael Oleza 085dd97fa0 Change getModuleId() signature to directly accept a path
Reviewed By: mjesun

Differential Revision: D6373180

fbshipit-source-id: d6b49431adf85e7587cf0fe858d9dc9b9afeee06
2017-11-21 05:45:44 -08:00
Rafael Oleza e58b7f1d73 Do not calculate inverseDependencies when processing a standard delta bundle
Reviewed By: mjesun

Differential Revision: D6373006

fbshipit-source-id: 86863595b1e5f0417e898f19f21ed83147b46db3
2017-11-21 05:45:44 -08:00
Jean Lauliac b77f177f92 metro-bundler: add additional tip for resolution errors
Summary: Rebase of a PR, closes https://github.com/facebook/metro-bundler/pull/39/files

Reviewed By: cpojer

Differential Revision: D6372967

fbshipit-source-id: 84c77b7e445269638616abde56b728ea6d3e475c
2017-11-21 02:23:09 -08:00
Maël Nison c2c99c4c1b Fixes for the Metro cli
Reviewed By: BYK

Differential Revision: D6348698

fbshipit-source-id: 3a00d9af7e03c5d636e2a51ce95842ca7d45b6e1
2017-11-20 10:47:46 -08:00
Rafael Oleza eb1ddfdcd9 Fix initializing packager logging
Reviewed By: cpojer

Differential Revision: D6359527

fbshipit-source-id: 0741955ca0efd6d5735637407e1bc140f04c3bbf
2017-11-18 17:10:51 -08:00
Christoph Nakazawa 6d756334a8 Fix CI
Reviewed By: rafeca

Differential Revision: D6368078

fbshipit-source-id: 04232ac3762ce4c9581c694a60c1372b2f495af0
2017-11-18 10:45:32 -08:00
Christoph Nakazawa 2c6aa5c5d8 Remove unused vars
Reviewed By: davidaurelio

Differential Revision: D6362298

fbshipit-source-id: 8a79663e4f83d7b15919f2a1a8dd9416900f3203
2017-11-18 01:10:15 -08:00
Christoph Nakazawa 5fdef3bdb2 Update Flow and Lerna for the Metro repo
Summary: I'm working on getting CI to pass. As a first step, I'll upgrade the lerna setup to use Yarn's workspaces (when yarn is run from the Metro root) as well as upgrading Flow to the same version we use in xplat. I also copied over the Jest type definitions. This should fix all type errors for a start.

Reviewed By: davidaurelio

Differential Revision: D6361276

fbshipit-source-id: 4e8661b7d5fe4e3f6dd1e6923891bd2d23c9b4db
2017-11-18 01:10:15 -08:00