Commit Graph

280 Commits

Author SHA1 Message Date
David Aurelio aef3d8128f Add `js_file` rule
Reviewed By: matryoshcow

Differential Revision: D3900455

fbshipit-source-id: 61384ade035db978ef3ca258e4c0109bcb450692
2016-10-05 09:28:50 -07:00
Ovidiu Viorel Iepure 6130650d93 Replacing node-haste with jest-haste-map
Summary: Modified `node-haste` implementation to use the much faster `jest-haste-map` under the hood. The underlying `fastfs` now gets passed the entire file list from the `jest-haste-map` rather than crawl the filesystem.

Reviewed By: cpojer

Differential Revision: D3724387

fbshipit-source-id: 447d58ea0edf283662ec23d1e2deee992cf8d240
2016-10-03 05:28:56 -07:00
Tim Yung 0e2591e90b RN: Fix `flow-bin` Dependency
Reviewed By: jeffmo

Differential Revision: D3957804

fbshipit-source-id: a05026d36e5d3eff45dbc982250d3ff887cbb581
2016-10-02 20:58:42 -07:00
Tim Yung feced42fea RN: Upgrade ESLint Packages
Reviewed By: vjeux

Differential Revision: D3946990

fbshipit-source-id: f1be05ee7efed63e54c133d790b193b61e40ea36
2016-10-01 17:58:31 -07:00
Jeff Morrison 1a9853da37 fbobjc
Reviewed By: gabelevi

Differential Revision: D3949455

fbshipit-source-id: 1cbce4a85fe5b8798496752863bbca64b078aa9c
2016-10-01 11:16:21 -07:00
David Aurelio 7a02b400be Update `source-map` to v0.5.6
Summary: The newer versions of `source-map` fixed some bugs related to decoding mappings.

Reviewed By: bestander

Differential Revision: D3923727

fbshipit-source-id: cc1c87bbadeb128316965823d81ef5ca46a6845c
2016-09-26 09:13:33 -07:00
zxcpoiu f839627605 update base64-js version. follow up #6961
Summary:
**Motivation**
This is originally a follow up of PR #6327 by dewe and jeremyong
And mkonicek indicated this should split into a separate PR.

Now philikon takes over #6327 as #6961

**Test Plan:**
According to #6961 and #6889
Load WebSocketExample in UIExplorer app and start websocket test server script and test sending binary data on both iOS and Android
Closes https://github.com/facebook/react-native/pull/6937

Reviewed By: javache

Differential Revision: D3669596

Pulled By: mkonicek

fbshipit-source-id: 342e29eb34de882bcbd9f297aab71dd6bb236748
2016-09-20 05:43:36 -07:00
Cristian Carlesso 7b2080e118 Removing automatically reset modules between test run
Reviewed By: bestander

Differential Revision: D3886125

fbshipit-source-id: c8f47c3466add1e2c89649a1c6f47b01f0d7a89e
2016-09-19 12:43:55 -07:00
James Ide 0162be8fc3 Change React version to 15.3.1 (no more RC)
Summary:
React 15.3.1 has been published; stop using the RC.
Closes https://github.com/facebook/react-native/pull/9783

Reviewed By: bestander

Differential Revision: D3876515

Pulled By: mkonicek

fbshipit-source-id: 2ad990b55359e445dad9119b7434930c0cc72eda
2016-09-16 06:13:35 -07:00
Kevin Lacker 857bae4ea3 Replace the deprecated esprima-fb parser with flow-parser, on the RN website
Summary:
(I changed a ton from when I previously submitted this PR so please take another look if you already did.)

PROBLEM: the no-longer-maintained `esprima-fb` parser does not support class properties, leading our website docgen to die if we use class properties, which we're gonna do real soon now
SOLUTION: use `flow-parser` instead, which the flow team is maintaining including all the fancy-pants ES? stuff that FB uses internally.

This removes the `esprima-fb` parser from jsdocs and replaces it with `flow-parser`. It's almost the same, I checked by diffing all the parser json output and it only had a few irrelevant differences. I had to add a file of constants so that we could remove esprima-fb altogether, too.

This also adds a couple unit tests, so that we can test that jsDocs works programmatically. They don't run if you run the regular RN tests, you have to run `npm test` from the `/website/` subdirectory.
Closes https://github.com/facebook/react-native/pull/9890

Differential Revision: D3865629

Pulled By: bestander

fbshipit-source-id: 8f561b78ca4a02f3f7b45e55904ec2fa911e3bb6
2016-09-14 14:28:44 -07:00
David Aurelio 24736d1188 module graph
Summary:
This piece of code can assemble all transitive dependencies of a set of entry modules. It is supposed to replace `ResolutionRequest.getOrderedDependencies`.

It has the following advantages:
- has minimal API surface to other components of the system (uses two functions, exposes one function)
- allows to separate concerns into loading + transforming files, resolving dependencies, gathering all modules belonging to a bundle (this code), and bundling
- allows to specify multiple entry points
- allows to use any kind of dependency ID as entry point (haste IDs, node module IDs, relative paths, absolute paths – depends on the resolver)
- allows to skip files, which allows callers to incrementally update previously retrieved collections of modules

Reviewed By: cpojer

Differential Revision: D3627346

fbshipit-source-id: 84b7aa693ca6e89ba3c1ab2af9a004e2e0aaed3d
2016-09-14 10:28:34 -07:00
kentaromiura 8689b0f21c Adding jest and jest babel preset to the react-native init command
Summary:
Adding jest and its presets to the react-native init command

**Test plan (required)**
run react-native init foo (using `npm link` to use the local `react-native` version)
inside foo there are now a .babelrc file and the package.json is set up as described by
https://facebook.github.io/jest/docs/tutorial-react-native.html#setup
Closes https://github.com/facebook/react-native/pull/9719

Differential Revision: D3843037

Pulled By: bestander

fbshipit-source-id: 004e27ebd3f257a202ed43f378d6fe6cc23ced52
2016-09-09 17:43:42 -07:00
Gabe Levi 85a6f011b6 Deploy v0.32.0
Reviewed By: jeffmo

Differential Revision: D3821852

fbshipit-source-id: 01fd16707cba860a830d682a2af2bdd542605abf
2016-09-06 13:43:47 -07:00
Christoph Pojer d7fdc448d5 Update to Jest 15
Reviewed By: kassens

Differential Revision: D3805404

fbshipit-source-id: 0aa60cf1be889b306b41876f7b09f4f7f933fcf1
2016-09-02 05:58:34 -07:00
Pieter De Baets 3aee63e6a2 Reverted commit D3780708
Reviewed By: jsaluja

Differential Revision: D3780708

fbshipit-source-id: 6c3ff6b77bce1d6b05fc35c98fd8ac3fc7d7f7bd
2016-08-29 22:29:02 -07:00
Prashanth Sampath Kumar 0fe49c5b6c Adding react-native-camera
Reviewed By: jsaluja

Differential Revision: D3780708

fbshipit-source-id: d5e614fad82925940adce762eaf4ffbd38b1cd5b
2016-08-29 16:29:29 -07:00
Jeff Morrison 5a5c56c8a9 fbsource deploy
Reviewed By: gabelevi, bestander

Differential Revision: D3753032

fbshipit-source-id: 47aadb8a54f47c40f0133966df588d42cdbe0d80
2016-08-23 10:28:53 -07:00
Paul O'Shannessy 7655e537ed Upgrade to React v15.3.1-rc.2
Reviewed By: spicyj, sebmarkbage

Differential Revision: D3720586

fbshipit-source-id: c739762a2c263b7dd0c321311e4c173e9dcacfcf
2016-08-16 11:28:32 -07:00
Adam Miskiewicz 757ab0b936 Add `--config` option to CLI to allow passing a path to an `rn-cli.config.js`
Summary:
Currently we just try to resolve a rn-cli.config.js file by walking up the tree from node_modules/react-native. In non-standard uses of RN, when your copy of RN may not live within node_modules, it's impossible to use rn-cli.config.js. This PR adds a "config" flag to the cli that let's you pass in a path to rn-cli.config.js.

cc ide
Closes https://github.com/facebook/react-native/pull/7883

Differential Revision: D3382823

Pulled By: bestander

fbshipit-source-id: b946f3bb355050fc2fe99273d0e99e441dbed111
2016-08-12 11:58:33 -07:00
Tim Yung 1a37527606 JS1: Bump `sane` Dependency Version
Reviewed By: jingc

Differential Revision: D3700427

fbshipit-source-id: caa444d0be352a28e18339c1e35037a6b9ee622c
2016-08-10 17:28:33 -07:00
Pieter De Baets 910d0e1d8b Have React only as a peer dependency
Reviewed By: davidaurelio

Differential Revision: D3683793

fbshipit-source-id: 6ffb8c24e81cfb33b11b9f99d440220287161fb6
2016-08-09 03:58:36 -07:00
Pieter De Baets cb59264e73 Specify React dependency correctly
fbshipit-source-id: c25ad1b942e75d9a631134fc277306931c7bc859
2016-08-08 04:28:32 -07:00
Pieter De Baets 631b1beeb6 Unbreak upgrade to React 15.3.0
fbshipit-source-id: 0373b4dd11895f3b1c76a904a0a59b70aaa845f9
2016-08-08 03:58:29 -07:00
James Ide 02b71cb7b5 Use React 15.3.0 instead of 15.3.0-rc.2
Summary:
React 15.3.0 was officially released. We especially should try not depend on RCs in RN releases and npm doesn't handle RC versions well.
Closes https://github.com/facebook/react-native/pull/9279

Differential Revision: D3683587

fbshipit-source-id: fc4f8a030769232b7697434a419e1e07e482e308
2016-08-08 02:28:30 -07:00
Konstantin Raev 1f603ffca9 Fixed version of jest to 14.1.0
Reviewed By: cpojer

Differential Revision: D3655343

fbshipit-source-id: 5987b0e3f247c68f9d6b70de39992da4dc0df4ed
2016-08-03 05:28:29 -07:00
Gabe Levi e34dd4f938 Deploy v0.30.0
Reviewed By: avikchaudhuri

Differential Revision: D3654213

fbshipit-source-id: b03879345ad9beae73a055c1b2e7211d074a08f0
2016-08-02 20:58:28 -07:00
Mike Grabowski e8b508144f Merge `rnpm cli` into react-native
Summary:
This is an initial step of rewriting the CLI interface to use `rnpm` one (commander, plugins etc.).

It's scope is to move all existing commands to use rnpm CLI interface, so that we get plugins, flags and our existing ecosystem working out of the box.

<s>This is still WIP and some of the commands are left commented out.</s>

For the `config` of `rnpm` (functions get info about project and dependency), <s>I am thinking we can merge them with</s> we decided to merge it with [`default.config.js`](e57683e420/local-cli/default.config.js (L33)), so they are available on the `new Config()` [instance](e57683e420/local-cli/cliEntry.js (L59)) (which means we don't have to change anything and current plugins, like runIOS and runAndroid can just start using it [w/o depending on any extra argument](https://github.com/grabbou/react-native/blob/e57683e420210749a5a6b802b4e
Closes https://github.com/facebook/react-native/pull/7899

Differential Revision: D3613193

Pulled By: bestander

fbshipit-source-id: 09a072f3b21e5239dfcd8da88a205bd28dc5d037
2016-07-30 09:13:46 -07:00
David Aurelio 667aaa4621 Bring back node-haste to fbsource
Summary:
Since jest stopped using node-haste a while ago, we are the only client left.
This brings back node-haste back to fbsource to allow us to iterate faster.

Reviewed By: bestander

Differential Revision: D3641341

fbshipit-source-id: a859f8834765723a3515e2cf265581b9dd83997c
2016-07-29 11:15:02 -07:00
Christoph Pojer 75ecaf4190 Update to 14.0
Reviewed By: kassens

Differential Revision: D3627753

fbshipit-source-id: 35b8246c8cb61e60908d8c233a6e72063bf67096
2016-07-27 22:13:26 -07:00
Paul O’Shannessy 5db5ee9f55 Upgrade to React v15.3.0-rc.2
Summary:
There were several fixes to how calls to propType checkers. This is to
account for the new deprecation warning - React.PropTypes will not be
part of production builds in the future.

Note: There is still a warning about an invalid argument to `React.PropTypes.oneOf` (React is running that validation sooner now). Specifically [both of these](b1e49832ef/Libraries/Components/Touchable/TouchableWithoutFeedback.js (L44-L45)) because `View.AccessibilityTraits` is actually undefined in tests (didn't look into why you conditionally set that).

**Test plan (required)**

`npm test` & fixed all warnings due to proptype secret
Closes https://github.com/facebook/react-native/pull/8758

Reviewed By: zpao

Differential Revision: D3564288

Pulled By: bestander

fbshipit-source-id: 1ff1f90907f41855e364048aa730ccd239c522b4
2016-07-21 09:13:29 -07:00
Bart den Hollander 25ed41cc94 update yeoman-generator to 0.21 because of RegExp DoS issue
Summary:
Installing react-native gives a warning because of outdated version of yeoman-generator. The warning is ```npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue```.
This MR will update the yeoman-generator version to 0.21.0 to resolve this warning.
Closes https://github.com/facebook/react-native/pull/8859

Reviewed By: matryoshcow

Differential Revision: D3580087

Pulled By: bestander

fbshipit-source-id: 4daddd804679ab8e95e59cf0d0005f87d2f48e1c
2016-07-19 04:37:01 -07:00
Konstantin Raev 7aeaf7d941 Updated React to 15.2.1
Reviewed By: zpao

Differential Revision: D3569832

fbshipit-source-id: 2a2aea8c68fb15e2772d30ddce03bad73fd0a259
2016-07-15 14:43:31 -07:00
Konstantin Raev 6eb318d87d update flow to v0.29.0
Reviewed By: davidaurelio

Differential Revision: D3569889

fbshipit-source-id: b2330456db2cde8296b2dc8d05bcb4db9638db6e
2016-07-15 10:58:31 -07:00
Konstantin Raev eb7442ba09 Opt in to use fetch from node_modules
Reviewed By: davidaurelio

Differential Revision: D3555235

fbshipit-source-id: 801b28278d0f424e86852d588d4348966751255e
2016-07-14 04:58:42 -07:00
Mark Oswald 91ff6868a5 Use HTTP range requests (responses) to serve mp4 from assets
Summary:
This PR solves a problem when video assets are used from third-party React Native components (e.g. [react-native-video](https://github.com/brentvatne/react-native-video). The video will not work while the assets are served from the react native packager because the used video component (iOS) relies on HTTP range requests.

I added a small fix that allows ranged requests (e.g. mp4) to be served in ranges.

To test this:

1. make new react native project
1. add [react-native-video](https://github.com/brentvatne/react-native-video) to xcode project
1. add video component to your project
```
import Video from 'react-native-video';
var resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
/* ... /*
render() {
    let source = resolveAssetSource(require('./someVideoFile.mp4')) || {};
    return <Video /*....*/ source={source} />;
}
```

That should not work (if video is smaller than a few megabytes, open app a few times). Then add my fix, that should do the trick.
Closes https://github.com/facebook/react-native/pull/8219

Reviewed By: davidaurelio

Differential Revision: D3542485

Pulled By: frantic

fbshipit-source-id: e4f2e4d3aaafa8445e965259bf04ad107dba8a4f
2016-07-13 03:58:22 -07:00
tychota c4fc504094 Fix the yeoman-environment version
Summary:
This closes #8610.
The release of 1.6.2 of yeoman-environment break react-native (since there is no lib folder)
Yeoman will be removed from RN as #8197 anyway.

Thanks cpsubrian, RobTS

**Test plan (required)**

I installed the 1.2.7 version and copied it in react-native nodes_modules.
Then I ran react-native upgrade

<img width="1337" alt="screen shot 2016-07-06 at 21 09 33" src="https://cloud.githubusercontent.com/assets/13785185/16631160/075fc422-43be-11e6-8625-92f03075b007.png">
Closes https://github.com/facebook/react-native/pull/8614

Differential Revision: D3524043

fbshipit-source-id: 1def4854ca0fd881b8a935f37c86eb373dfd97c5
2016-07-06 13:13:27 -07:00
Jeff Morrison 7795918eb4 Unrevert D3518381
Reviewed By: gabelevi

Differential Revision: D3522895

fbshipit-source-id: 52f28c7f3142566a07d8bc845be882aeda098809
2016-07-06 12:58:41 -07:00
Ian Childs 0fde81c816 Reverted commit D3518381
Reviewed By: gabelevi

Differential Revision: D3518381

fbshipit-source-id: 645c25191d5e7cff7689bd4dc583c478eba46496
2016-07-06 09:43:37 -07:00
Jeff Morrison a8e6a236cc fbobjc -> Flow v0.28
Reviewed By: gabelevi

Differential Revision: D3518381

fbshipit-source-id: 2dd5f89177aaefbd098ba1fd3c193da111ff14c7
2016-07-06 08:58:42 -07:00
David Aurelio 0d58314fa6 Update eslint
Reviewed By: bestander

Differential Revision: D3517152

fbshipit-source-id: 785b273cf197f313ddba769377c2a9f672c4b10b
2016-07-05 10:58:50 -07:00
David Aurelio bd60d828c5 Remove `node_modules/react` from the list of discoverable haste modules
Summary: This removes `node_modules/react` from the list of directories that are used for haste module resolutions. Modules required from React are now imported with `require('react/lib/…')`.

Reviewed By: astreet

Differential Revision: D3509863

fbshipit-source-id: 32cd34e2b8496f0a6676dbe6bb1eacc18124c01e
2016-07-05 06:44:33 -07:00
Christoph Pojer 65eee61f24 Update to 13.1
Reviewed By: kentaromiura

Differential Revision: D3516030

fbshipit-source-id: 739003d8c1984207312b650e424397a419c5eb6a
2016-07-05 01:13:51 -07:00
Ben Alpert 1a0c69f4b7 Update to React 15.2.0 final
Summary: This should have literally no changes from the RC that affect RN -- just a version bump.

Reviewed By: vjeux

Differential Revision: D3511116

fbshipit-source-id: 5bb3a330c0d2e78a2f3dfbb0e948c99607d2e66e
2016-07-01 14:28:21 -07:00
Christoph Pojer 52d5450ced Update Jest and add Jest-REPL/Jest-Runtime
Reviewed By: elynde

Differential Revision: D3496544

fbshipit-source-id: a19ae23bff88e99ef15ecc800378899c79cdee18
2016-06-29 19:58:31 -07:00
Sam Pepose 8b803c6143 Updated babylon/babel-* packages to latest version
Reviewed By: yungsters

Differential Revision: D3493809

fbshipit-source-id: aa2a8c804d6e2aae8afc9af8c1a577be28e998b8
2016-06-28 15:28:24 -07:00
Peter deHaan 550fed5ce8 Update ws dependency
Summary:
Fixes #7643
Closes https://github.com/facebook/react-native/pull/7644

Reviewed By: javache

Differential Revision: D3450187

Pulled By: davidaurelio

fbshipit-source-id: 59ffa1d6a198cc50e08973eee3a71653965b8467
2016-06-22 10:43:24 -07:00
Tim Yung 2c57f6e38f RN: Enable Flow Object Type Lint Rule
Reviewed By: voideanvalue

Differential Revision: D3460466

fbshipit-source-id: 9f5ca9a8a22827ab13b1b93044390bf6a95908af
2016-06-20 18:13:32 -07:00
Ben Alpert 92d6632d7a Update React to 15.2.0-rc.1
Summary:
Notable changes (excluding DOM-only things):

- Improved warning messages for propTypes and key warnings
- Production error codes
- Improved performance in DEV mode
- More accurate data in ReactPerf instrumentation
- Experimental JSON test renderer
- Minor bug fixes

Full changelog: fef495942a...c66f40f749.

Reviewed By: AaaChiuuu

Differential Revision: D3442002

fbshipit-source-id: 940fc65ba5d0b742417bbe2fcbd36eb9dc7443e1
2016-06-16 14:44:18 -07:00
Jeff Morrison df46891dfe v0.27.0: fbsource
Reviewed By: gabelevi

Differential Revision: D3421744

fbshipit-source-id: d72275fa70687a188c6175dbd193ab8d79d9051e
2016-06-13 14:28:25 -07:00
Konstantin Raev 592d5fb8f3 Changed version of React dependency to ~
Summary:
React has some internal code related only to React Native.
Some times React needs to update them which will result in a breaking change for React Native but it would not be a breaking change for React public API, so no major version bump will happen.
It means that a non breaking API bump may result in a break for React Native.
That is why React Native should not depend on a ^ of React version.

However React is a peer dependency to React Native and we want to give some flexibility to users to update React independently, so we don't fix the version strict and use ~ to allow patches.

This will be fixed once we extract RN specific code from React into an independent dependency.

Reviewed By: avaly

Differential Revision: D3398202

fbshipit-source-id: cca520f4b80c9ed5ae6fb1444f3d0bf7ffb9c9dd
2016-06-07 04:43:30 -07:00