Commit Graph

22 Commits

Author SHA1 Message Date
Eli White d01ab66b47 Prettier React Native Libraries
Reviewed By: sahrens

Differential Revision: D7961488

fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
2018-05-10 19:10:38 -07:00
Eli White 8f5ebe5952 Convert react-native-github/Libraries to let/const
Reviewed By: sahrens

Differential Revision: D7956042

fbshipit-source-id: 221851aa311f3cdd6326497352b366048db0a1bb
2018-05-10 16:16:35 -07:00
Rubén Norte d5e9e55fa3 Remove @providesModule from all modules
Summary:
This PR removes the need for having the `providesModule` tags in all the modules in the repository.

It configures Flow, Jest and Metro to get the module names from the filenames (`Libraries/Animated/src/nodes/AnimatedInterpolation.js` => `AnimatedInterpolation`)

* Checked the Flow configuration by running flow on the project root (no errors):

```
yarn flow
```

* Checked the Jest configuration by running the tests with a clean cache:

```
yarn jest --clearCache && yarn test
```

* Checked the Metro configuration by starting the server with a clean cache and requesting some bundles:

```
yarn run start --reset-cache
curl 'localhost:8081/IntegrationTests/AccessibilityManagerTest.bundle?platform=android'
curl 'localhost:8081/Libraries/Alert/Alert.bundle?platform=ios'
```

[INTERNAL] [FEATURE] [All] - Removed providesModule from all modules and configured tools.
Closes https://github.com/facebook/react-native/pull/18995

Reviewed By: mjesun

Differential Revision: D7729509

Pulled By: rubennorte

fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
2018-04-25 07:37:10 -07:00
Mats Byrkeland edb6ca72fd Fix ESLint warnings using 'yarn lint --fix'
Summary:
Hi! I would like to contribute to React Native, and I am just starting out. I forked the repo and found that it has quite a lot of ESLint warnings – many of which were automatically fixable. This PR is simply the result of running `yarn lint --fix` from the root folder.

Most changes are removing trailing spaces from comments.

Haven't really done any manual testing, since I haven't done any code changes manually. `yarn test` runs fine, `yarn flow` runs fine, `yarn prettier` is satisfied.

N/A

[INTERNAL][MINOR][] - Fix ESLint warnings
Closes https://github.com/facebook/react-native/pull/18047

Differential Revision: D7054948

Pulled By: hramos

fbshipit-source-id: d53e692698d1687de5821c3fb5cdb76a5e03b71e
2018-02-22 07:23:17 -08:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
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
2018-02-16 18:31:53 -08:00
Héctor Ramos 79e24ede40 Migrate additional docs to the new format
Summary:
[DOCS]
Closes https://github.com/facebook/react-native/pull/16874

Differential Revision: D6375515

Pulled By: hramos

fbshipit-source-id: 64359b45a37c7b478919121573ca04dbb1ce6609
2017-11-20 13:16:12 -08:00
Aaron Chiu f6bd8a38ec correctly order ASyncStorage
Reviewed By: sahrens

Differential Revision: D4585569

fbshipit-source-id: e0bebddea8a5810386e193eb6435f24ba3a5cbb0
2017-02-21 15:18:40 -08:00
Aaron Chiu 1fa95ed390 inline a bunch of NativeModule requires
Reviewed By: shergin

Differential Revision: D4578180

fbshipit-source-id: 3764ffd32eb7e4698e928740bc72bbad02876894
2017-02-17 16:49:38 -08:00
zongjingyao eba356fb13 result in RCTAsyncStorage.multiGet could be null.
Summary:
App will crash if result is null.
Closes https://github.com/facebook/react-native/pull/10338

Differential Revision: D4335305

Pulled By: lacker

fbshipit-source-id: 4910bfd7c56525a2ef1b252b56b8debd21fa2bae
2016-12-15 22:43:30 -08:00
David Aurelio 94666f16c7 Auto-fix lint errors
Reviewed By: bestander

Differential Revision: D3683952

fbshipit-source-id: 9484d0b0e86859e8edaca0da1aa13a667f200905
2016-08-09 06:43:46 -07:00
Ariel Elkin f2d83a2552 update AsyncStorage.js documentation
Summary:
Otherwise it could be perceived as safe for storing sensitive data.

See
https://medium.com/ntoscano/react-native-persistent-user-login-6a48ff380ab8#.2pxlht5ti
Closes https://github.com/facebook/react-native/pull/8809

Differential Revision: D3570130

Pulled By: vjeux

fbshipit-source-id: ee3e8f7fc882a67e9991838467fad75c86d26a52
2016-07-15 09:13:51 -07:00
Christine Abernathy b664e6e734 Update AsyncStorage doc
Summary:
Relates to #8203 for AsyncStorage API update.

- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.

I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.

**Test plan (required)**

Wrote a small sample app to test the snippet added to the intro section.

Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html

![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)

Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396

Differential Revision: D3481783

Pulled By: JoelMarcey

fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
2016-06-24 08:43:36 -07:00
taelimoh 4879f88a75 change undeclared variable to intended value
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7770

Differential Revision: D3352007

fbshipit-source-id: eedb964d245445b61fed79245380f0803473c455
2016-05-26 01:43:30 -07:00
Kushal Dave c62cd44fdf Update AsyncStorage.js
Summary:Updating docs to discuss both iOS and Android and to make more sense standing alone on the web site.
Closes https://github.com/facebook/react-native/pull/6592

Differential Revision: D3161831

fb-gh-sync-id: 984621702fbf408445a04b771d3fc5f76a65af64
fbshipit-source-id: 984621702fbf408445a04b771d3fc5f76a65af64
2016-04-10 18:02:20 -07:00
Chris Geirman afffcde15c add examples that demonstrate how to use mergeItem, multiMerge, multi…
Summary:Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

it wasn't clear how to use various methods such as mergeItem, multiMerge, etc, so after figuring it out I thought it would be useful to provide clear examples for others.

Example: When "Adding a function to do X", explain why it is necessary to have a way to do X.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

See the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

…Set, multiGet, and multiRemove
Closes https://github.com/facebook/react-native/pull/6423

Differential Revision: D3048502

Pulled By: vjeux

fb-gh-sync-id: dfe13c6a88fa9d3e7646b5ecaa5f594bfaba8271
shipit-source-id: dfe13c6a88fa9d3e7646b5ecaa5f594bfaba8271
2016-03-14 17:38:22 -07:00
Mark Vayngrib 52755fdde2 multiGet breaking test and fix
Summary:
the flush + optimized multiGet result in an obscure bug that results when two multiGet requests with overlapping key sets get issued. The result array for both requests ends up bigger than the key array (because it has duplicates)
Closes https://github.com/facebook/react-native/pull/5514

Reviewed By: svcscm

Differential Revision: D2908264

Pulled By: nicklockwood

fb-gh-sync-id: 60be1bce4acfc47083e4ae28bb8b63f9dfa56039
2016-02-05 16:45:46 -08:00
Milen Dzhumerov a64ee7d8c5 Batch AsyncStorage.multiGet calls
Reviewed By: javache

Differential Revision: D2636553

fb-gh-sync-id: d6351b67c615d8c01c11c10e32321a9764c54c67
2015-12-03 09:10:29 -08:00
Gabe Levi 892dd5b86a Fix errors uncovered by v0.19.0
Reviewed By: mroch

Differential Revision: D2706663

fb-gh-sync-id: 017c91bab849bf18767cacd2ebe32d1a1b10c715
2015-12-01 20:11:26 -08:00
Milen Dzhumerov 638fd11c5c Revert 3770f061c832 for further investigation
Reviewed By: idevelop

Differential Revision: D2695659

fb-gh-sync-id: b1ba529c648681faef5d4f07273722764722fbe1
2015-11-25 05:24:28 -08:00
Milen Dzhumerov fc5a8678d3 Implement efficient DiskCache.clear()
Summary: public

Ability to efficiently remove all keys with a particular prefix

Reviewed By: tadeuzagallo

Differential Revision: D2658741

fb-gh-sync-id: 3770f061c83288efe645162ae84a9fd9194d2fd6
2015-11-25 03:23:36 -08:00
Spencer Ahrens a2d58203b8 Fix AsyncStorage error multiplexing
Reviewed By: nicklockwood

Differential Revision: D2590231

fb-gh-sync-id: 399a783a474367855d526e0b2604d0f862594102
2015-10-28 12:03:26 -07:00
Nick Lockwood b9e4f0ddd6 Merged the JS implementations of AsyncStorage, as there seem to be no significant differences.
Reviewed By: sahrens

Differential Revision: D2585257

fb-gh-sync-id: a1c930a675f40b4cd1b3ebe4dffb316747376522
2015-10-27 10:03:03 -07:00