Skip to content

Commit

Permalink
Remove @providesModule from all modules
Browse files Browse the repository at this point in the history
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 #18995

Reviewed By: mjesun

Differential Revision: D7729509

Pulled By: rubennorte

fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
  • Loading branch information
rubennorte authored and facebook-github-bot committed Apr 25, 2018
1 parent 4a80210 commit d5e9e55
Show file tree
Hide file tree
Showing 543 changed files with 97 additions and 541 deletions.
17 changes: 17 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ flow-github/
emoji=true

module.system=haste
module.system.haste.use_name_reducers=true
# keep the following in sync with server/haste/hasteImpl.js
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/Libraries/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/RNTester/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/IntegrationTests/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*

munge_underscores=true

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/AccessibilityManagerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule AccessibilityManagerTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/AppEventsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AppEventsTest
* @flow
*/
'use strict';
Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/AsyncStorageTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule AsyncStorageTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/ImageCachePolicyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule ImageCachePolicyTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/ImageSnapshotTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule ImageSnapshotTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/IntegrationTestHarnessTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule IntegrationTestHarnessTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/IntegrationTestsApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule IntegrationTestsApp
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/LayoutEventsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule LayoutEventsTest
* @flow
*/
'use strict';
Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/LoggingTestModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule LoggingTestModule
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/PromiseTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule PromiseTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/PropertiesUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @providesModule PropertiesUpdateTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/RCTRootViewIntegrationTestApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule RCTRootViewIntegrationTestApp
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/ReactContentSizeUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @providesModule ReactContentSizeUpdateTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/SimpleSnapshotTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule SimpleSnapshotTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/SizeFlexibilityUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @providesModule SizeFlexibilityUpdateTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/SyncMethodTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule SyncMethodTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/TimersTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule TimersTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/WebSocketTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule WebSocketTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/WebViewTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule WebViewTest
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion IntegrationTests/websocket_integration_test_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule websocket_integration_test_server
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion Libraries/ART/ARTSerializablePath.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule ARTSerializablePath
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion Libraries/ART/ReactNativeART.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule ReactNativeART
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion Libraries/ActionSheetIOS/ActionSheetIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule ActionSheetIOS
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Alert/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule Alert
* @flow
*/
'use strict';
Expand Down
1 change: 0 additions & 1 deletion Libraries/Alert/AlertIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AlertIOS
* @flow
* @jsdoc
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Alert/RCTAlertManager.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule RCTAlertManager
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion Libraries/Alert/RCTAlertManager.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule RCTAlertManager
* @flow
*/
'use strict';
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/release/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @providesModule gulpfile
*/

'use strict';
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/Animated.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule Animated
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/AnimatedEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedEvent
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/AnimatedImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedImplementation
* @flow
* @format
* @preventMunge
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/AnimatedWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule AnimatedWeb
*/
'use strict';

Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/Easing.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule Easing
* @flow
*/
'use strict';
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/NativeAnimatedHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule NativeAnimatedHelper
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/SpringConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule SpringConfig
* @flow
*/

Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/animations/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule Animation
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/animations/DecayAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule DecayAnimation
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/animations/SpringAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule SpringAnimation
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/animations/TimingAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule TimingAnimation
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/bezier.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* https://github.com/gre/bezier-easing
*
* @copyright 2014-2015 Gaëtan Renaudeau. MIT License.
* @providesModule bezier
* @noflow
*/
'use strict';
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/createAnimatedComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule createAnimatedComponent
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/nodes/AnimatedAddition.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedAddition
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/nodes/AnimatedDiffClamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedDiffClamp
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/nodes/AnimatedDivision.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedDivision
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/nodes/AnimatedInterpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedInterpolation
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/nodes/AnimatedModulo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedModulo
* @flow
* @format
*/
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/nodes/AnimatedMultiplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule AnimatedMultiplication
* @flow
* @format
*/
Expand Down
Loading

0 comments on commit d5e9e55

Please sign in to comment.