Permalink
Commits on Jan 18, 2019
  1. .gitignore updates

    jrwats authored and facebook-github-bot committed Jan 18, 2019
    Reviewed By: kayhadrin
    
    Differential Revision: D13716633
    
    fbshipit-source-id: 23f4075a7c0370af23a352dd3773cc8364fed289
Commits on Jan 17, 2019
  1. [i18n][js][OSS] Removing dead util folder

    jrwats committed Jan 17, 2019
    Summary: All files used here have moved to fb-babel-plugins-utils
    
    Test Plan: grep -R 'util/'
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Tags:
  2. Convert from `util` to `fb-babel-plugin-utils` where applicable

    jrwats authored and facebook-github-bot committed Jan 17, 2019
    Reviewed By: kayhadrin
    
    Differential Revision: D13648245
    
    fbshipit-source-id: 041e10cf585551dfc4cbaff95f775701e43431cc
  3. Prepare transforms for npm

    jrwats authored and facebook-github-bot committed Jan 17, 2019
    Summary: Prepare our repo for [yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) to get ready for publishing to npm
    
    Reviewed By: kayhadrin
    
    Differential Revision: D13638117
    
    fbshipit-source-id: 53622f18261b3ed30e94a36c26e81afaf27fe1ac
  4. Prepare fb-babel-plugin-utils for publishing to npm

    jrwats authored and facebook-github-bot committed Jan 16, 2019
    Reviewed By: kayhadrin
    
    Differential Revision: D13614311
    
    fbshipit-source-id: 933894a9ca231d0561ab532cfb525c0418017b7e
Commits on Jan 16, 2019
  1. Minor documentation improvements

    jrwats authored and facebook-github-bot committed Jan 16, 2019
    Reviewed By: kayhadrin
    
    Differential Revision: D13629524
    
    fbshipit-source-id: 1829f16c9fb95e0021ca94ebf43d41286bec4fae
  2. Use FbtConstants module to detect fbt in js file

    kayhadrin authored and facebook-github-bot committed Jan 16, 2019
    Summary: Also removed unused code.
    
    Reviewed By: jrwats
    
    Differential Revision: D13668440
    
    fbshipit-source-id: a2218bb15c6229b1c9c1a761e7acaa9bdee173b9
Commits on Jan 15, 2019
  1. Deploy Flow v0.90 to www

    samwgoldman authored and facebook-github-bot committed Jan 15, 2019
    Reviewed By: panagosg7
    
    Differential Revision: D13642346
    
    fbshipit-source-id: 2655177ab27846e52ecba1af03595e0cf14ee6fc
Commits on Jan 11, 2019
  1. Use JSON syntax in docs & Fix typo in manifest.js (#39)

    ifndefdeadmau5 authored and facebook-github-bot committed Jan 11, 2019
    Summary:
    1. As for codeblock in `translating.md`, I think we should use json format as demonstration in `demo-app` uses filename 'translation_input.json`(Also added some missing commas).
    
    2. Just small typo in `manifest.js`
    Pull Request resolved: #39
    
    Differential Revision: D13635756
    
    fbshipit-source-id: c7f2f2fddc48eb3220f3d7631c59e4b890967877
  2. Use `shelljs` for Windows interoperability

    jrwats authored and facebook-github-bot committed Jan 11, 2019
    Summary:
    We can't run the `manfiest.js` util in Windows as is, since it relies on `find` and `grep` utilities.  So bring in the `shelljs` package to perform this.
    
    We should consider revisiting this in the future should this solution be too slow.  As it is, this should be a performance hit compared to `find | grep` as we're essentially performing `fs.readFileSync(...)` over and over.
    
    Reviewed By: w1106c
    
    Differential Revision: D13625762
    
    fbshipit-source-id: 30bec8dd80b7a1ed3e3353dfed719ee505eedb7f
Commits on Jan 10, 2019
  1. Add variated AR translations to demo app

    jrwats authored and facebook-github-bot committed Jan 10, 2019
    Summary:
    We received correctly variated translations in for ar_AR for the `"{number} photos"` string.  Add them. I also noticed we had rooky mistake in our event handler for the number state change.  `(0 || 1 === 1)` (>ლ).  Fix it.
    
    Also included in this diff:
    * I'm removing `translatedFbts.json` as that should be created via the `yarn translate-fbts` step.  We should make it clear there are "build steps" to get this app to function.
    * Fixing the "English (US)" display name for RTL layout (needed an LTR bidi marker)
    
    Reviewed By: kayhadrin
    
    Differential Revision: D13597535
    
    fbshipit-source-id: 4c98b5b71dc0dc8c4df6f5561921a1ee809fa287
  2. Grammar and punctuation fixes (#36)

    ethanmnrd authored and facebook-github-bot committed Jan 10, 2019
    Summary:
    In the docs files, there were quite a few missing points of punctuation. I took the liberty to add necessary punctuation as well as a missing "the" in one file.
    Pull Request resolved: #36
    
    Differential Revision: D13622881
    
    fbshipit-source-id: 80cd30da63cda3fa16ab594c5968122762c270e1
Commits on Jan 9, 2019
  1. fixed typo in utilities

    jonchretien authored and facebook-github-bot committed Jan 9, 2019
    Summary: Pull Request resolved: #33
    
    Differential Revision: D13612801
    
    fbshipit-source-id: b2adf4bebce247a46b40deeac3dc69af5e045d58
  2. Move to jest-docblock

    jrwats authored and facebook-github-bot committed Jan 9, 2019
    Summary: Let's get off of as many custom utiliteis as we can in preparation for publishing to npm
    
    Reviewed By: w1106c
    
    Differential Revision: D13608886
    
    fbshipit-source-id: 7811770d27fa076255f22731bdb1344925cea196
  3. Fix doNotExtract option

    jrwats authored and facebook-github-bot committed Jan 9, 2019
    Summary: `doNotExtract` was implemented incorrectly and broke transpilation rather than preventing only collection
    
    Reviewed By: kayhadrin
    
    Differential Revision: D13602702
    
    fbshipit-source-id: 7d23a968955915e3a19a565f75d4efab7bb67794
Commits on Jan 8, 2019
  1. Provide link to `collectFbt.js` and fix typo

    jrwats authored and facebook-github-bot committed Jan 8, 2019
    Reviewed By: w1106c
    
    Differential Revision: D13600692
    
    fbshipit-source-id: 5aaf925d8b030ac7241f6d7f5f0dd27feaa55808
Commits on Jan 7, 2019
  1. Update webpack-dev-server due to vulnerability

    jrwats authored and facebook-github-bot committed Jan 7, 2019
    Summary: [webpack-dev-server versions under 3.1.11 aren't safe](https://nvd.nist.gov/vuln/detail/CVE-2018-14732)
    
    Reviewed By: yns88
    
    Differential Revision: D13590246
    
    fbshipit-source-id: 2d92aece75193feb376b61fd24dbadb876aa70d4
  2. Move off slack to discord

    jrwats authored and facebook-github-bot committed Jan 7, 2019
    Summary: All our OSS projects use discord, let's stick with that for consistency.
    
    Reviewed By: kayhadrin
    
    Differential Revision: D13588676
    
    fbshipit-source-id: ce12bcd382f547165a95362464117d07d3670652
  3. Call out "JavaScript" in our documentation

    jrwats authored and facebook-github-bot committed Jan 7, 2019
    Reviewed By: kayhadrin
    
    Differential Revision: D13590067
    
    fbshipit-source-id: a57c04b3cc9231d9de97f32c424e947699601989
Commits on Jan 5, 2019
  1. Fix footer docs links on webpage (fixes #28) (#29)

    aralroca authored and facebook-github-bot committed Jan 5, 2019
    Summary:
    On footer all the links are using the docUrl method that is adding the language on the url:
    
    /fbt/docs/en/api_intro
    /fbt/docs/en/getting_started
    However, these links are not correct. Getting an 404 error.
    
    Although maybe in the future will be support for many languages, I think is better to change this invalid links for the valid links right now.
    Pull Request resolved: #29
    
    Differential Revision: D13587298
    
    fbshipit-source-id: 1cce44e8689c7ebc5e69643abae8029018fcd3c7
  2. Revert D13517092

    jrwats authored and facebook-github-bot committed Jan 5, 2019
    Summary:
    Backed out changeset ce1ba547937766c32bba6ead561b79fbb3ebf1ef.
    
    @public: We have a suspicion this fix slowed down our builds.  Testing that hypothesis with a revert.
    
    Reviewed By: pvdz
    
    Differential Revision: D13583597
    
    fbshipit-source-id: cb3cdaa176f65cd8913f7bab092957c4d2b675b5
Commits on Jan 4, 2019
  1. Detect fbs code in JS source code

    kayhadrin authored and facebook-github-bot committed Jan 4, 2019
    Summary:
    I noticed that when `fbs()` is used alone without any `fbt()` in the JS source code, the babel transform didn't run unexpectedly.
    
    It turns out that there's some code in the general "babel transform" script that will only run the fbt babel transform if any "fbt/Fbt" module name appears in the source code.
    
    So I've updated it to also detect `fbs`.
    
    Update makehaste conf:
    
    ```
    ./scripts/static_resources/no_more_sev_ones_please.pl
    ```
    
    Reviewed By: jrwats
    
    Differential Revision: D13557719
    
    fbshipit-source-id: 6bb8492bcf0682649d160dc489f98730c3faa724
  2. Update utilties.md (#27)

    jiyeonseo authored and facebook-github-bot committed Jan 4, 2019
    Summary:
    fix link and typo
    Pull Request resolved: #27
    
    Differential Revision: D13580739
    
    fbshipit-source-id: a8b6f6c273f68473c9de9747135710dfe5b7c608
  3. Fix typo in code examples

    vincentfretin authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #26
    
    Differential Revision: D13580672
    
    fbshipit-source-id: dd043297eecaece6af2944a6d4d96e95d8293a88
  4. Update utilties.md

    david-cho-lerat-HL2 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #22
    
    Differential Revision: D13580571
    
    fbshipit-source-id: 8bd740b80e2545ada60bbf2b60a204f1e9bdb8b3
  5. Update autoparam.md

    david-cho-lerat-HL2 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #21
    
    Differential Revision: D13580561
    
    fbshipit-source-id: 3ff13984a1baf9ce4bcfdefab9a72a376cbae361
  6. Update collection.md

    david-cho-lerat-HL2 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #23
    
    Differential Revision: D13580579
    
    fbshipit-source-id: 8da2fcc98b5bdeb783dc3921b684faa0f35f0a76
  7. Update implicit_params.md

    david-cho-lerat-HL2 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #19
    
    Differential Revision: D13580552
    
    fbshipit-source-id: 5128c2a1d2f433c43025567eac09ca0f4c05347b
  8. Update plurals.md

    david-cho-lerat-HL2 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #20
    
    Differential Revision: D13580555
    
    fbshipit-source-id: b31a8b24eb7ff56f09ddb7f0ec1d3762691849b1
  9. Update api_intro.md

    david-cho-lerat-HL2 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #18
    
    Differential Revision: D13580546
    
    fbshipit-source-id: 90bed25a10d13d0c44298bbf98d277fb103aed20
  10. Update collection.md

    david-cho-lerat-HL2 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #17
    
    Differential Revision: D13580506
    
    fbshipit-source-id: b19b81be18980b501879c032f35ad1dd581a2d77
  11. Fix typo in api_intro.md

    maciek134 authored and facebook-github-bot committed Jan 4, 2019
    Summary: Pull Request resolved: #25
    
    Differential Revision: D13580509
    
    fbshipit-source-id: 3c31aee94ab0afb334ea4d5e92ecbc842852ded4
  12. Fixed: Typo in docs/getting_started.md (#16)

    RobinCsl authored and facebook-github-bot committed Jan 4, 2019
    Summary:
    `depencies` should read `dependencies`
    Pull Request resolved: #16
    
    Differential Revision: D13580500
    
    fbshipit-source-id: f5977edcbbafaa0c82c98b39126ccff94391d103
  13. Fix commands in README.md (#12)

    petetnt authored and facebook-github-bot committed Jan 4, 2019
    Summary:
    This PR fixes/improves some of the install commands in the README.md, as for example `yarn start;` interprets the command as `start;` instead of `start` at least on Windows, same with the `cd` command.
    
    Thanks! 👍
    Pull Request resolved: #12
    
    Differential Revision: D13577213
    
    fbshipit-source-id: 4f77c748ba8473f150da9d762c23fb91a2f53340
  14. Avoiding using a symbolic link for node_modules (#14)

    kayhadrin authored and facebook-github-bot committed Jan 4, 2019
    Summary:
    This will avoid yarn to be confused on Windows.
    
    Tested on Cygwin and the test web page loaded normally:
    
    ```
    davidhsc@DAVIDHSC-Y12 ~/dev/source/facebookincubator/fbt
    $ yarn install
    yarn install v1.12.3
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    [3/4] Linking dependencies...
    [4/4] Building fresh packages...
    Done in 52.70s.
    
    davidhsc@DAVIDHSC-Y12 ~/dev/source/facebookincubator/fbt
    $ cd demo-app/
    
    davidhsc@DAVIDHSC-Y12 ~/dev/source/facebookincubator/fbt/demo-app
    $ yarn install
    yarn install v1.12.3
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    info fsevents@1.2.4: The platform "win32" is incompatible with this module.
    info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
    [3/4] Linking dependencies...
    [4/4] Building fresh packages...
    Done in 85.08s.
    
    davidhsc@DAVIDHSC-Y12 ~/dev/source/facebookincubator/fbt/demo-app
    $ yarn manifest
    yarn run v1.12.3
    $ babel-node ../transform/babel-plugin-fbt/bin/manifest --src src
    Done in 2.25s.
    
    davidhsc@DAVIDHSC-Y12 ~/dev/source/facebookincubator/fbt/demo-app
    $ yarn collect-fbts
    yarn run v1.12.3
    $ babel-node ../transform/babel-plugin-fbt/bin/collectFBT --json-input < .src_manifest.json > source_strings.json
    Done in 1.65s.
    
    davidhsc@DAVIDHSC-Y12 ~/dev/source/facebookincubator/fbt/demo-app
    $ yarn translate-fbts
    yarn run v1.12.3
    $ babel-node ../transform/babel-plugin-fbt/bin/translate.js --jenkins < ./translation_input.json > src/translatedFbts.json
    Done in 1.34s.
    
    davidhsc@DAVIDHSC-Y12 ~/dev/source/facebookincubator/fbt/demo-app
    $ yarn start
    yarn run v1.12.3
    $ babel-node ../node_modules/webpack-dev-server/bin/webpack-dev-server --open
    i 「wds」: Project is running at http://localhost:8080/
    i 「wds」: webpack output is served from /
    i 「wds」: Content not from webpack is served from C:\Users\davidhsc\dev\source\facebookincubator\fbt\demo-app\src
    i 「wdm」: wait until bundle finished: /
    [BABEL] Note: The code generator has deoptimised the styling of C:\Users\davidhsc\dev\source\facebookincubator\fbt\node_modules\react-dom\cjs\react-dom.development.js as it exceeds the max of 500KB.
    i 「wdm」: Hash: 4ce112e75c7bad18dfba
    Version: webpack 4.28.1
    Time: 8391ms
    Built at: 01/03/2019 6:05:09 PM
         Asset       Size  Chunks             Chunk Names
    index.html  288 bytes          [emitted]
       main.js   1.28 MiB    main  [emitted]  main
    Entrypoint main = main.js
    [0] multi ../node_modules/webpack-dev-server/client?http://localhost:8080 ./src/root.js 40 bytes {main} [built]
    [../node_modules/loglevel/lib/loglevel.js] 6.84 KiB {main} [built]
    [../node_modules/normalize.css/normalize.css] 1.01 KiB {main} [built]
    [../node_modules/react-dom/index.js] 1.32 KiB {main} [built]
    [../node_modules/react/index.js] 189 bytes {main} [built]
    [../node_modules/strip-ansi/index.js] 162 bytes {main} [built]
    [../node_modules/url/url.js] 22.2 KiB {main} [built]
    [../node_modules/webpack-dev-server/client/index.js?http://localhost:8080] ../node_modules/webpack-dev-server/client?http://localhost:8080 7.79 KiB {main} [built]
    [../node_modules/webpack-dev-server/client/overlay.js] 3.58 KiB {main} [built]
    [../node_modules/webpack-dev-server/client/socket.js] 1.05 KiB {main} [built]
    [../node_modules/webpack/hot sync ^\.\/log$] ../node_modules/webpack/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
    [../node_modules/webpack/hot/emitter.js] 75 bytes {main} [built]
    [./src/css/root.css] 1.07 KiB {main} [built]
    [./src/example/Example.react.js] 14.1 KiB {main} [built]
    [./src/root.js] 414 bytes {main} [built]
        + 113 hidden modules
    Child html-webpack-plugin for "index.html":
         1 asset
        Entrypoint undefined = index.html
        [../node_modules/html-webpack-plugin/lib/loader.js!./src/root.html] 453 bytes {0} [built]
        [../node_modules/lodash/lodash.js] 527 KiB {0} [built]
        [../node_modules/webpack/buildin/global.js] 475 bytes {0} [built]
        [../node_modules/webpack/buildin/module.js] 546 bytes {0} [built]
    i 「wdm」: Compiled successfully.
    ```
    Pull Request resolved: #14
    
    Reviewed By: jrwats
    
    Differential Revision: D13578885
    
    Pulled By: jrwats
    
    fbshipit-source-id: 2bc8dfa4985b87139735c44f3ba0feaf1197b032