Skip to content

Commit d5e9e55

Browse files
rubennortefacebook-github-bot
authored andcommitted
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 #18995 Reviewed By: mjesun Differential Revision: D7729509 Pulled By: rubennorte fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
1 parent 4a80210 commit d5e9e55

File tree

543 files changed

+97
-541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

543 files changed

+97
-541
lines changed

.flowconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ flow-github/
3636
emoji=true
3737

3838
module.system=haste
39+
module.system.haste.use_name_reducers=true
40+
# keep the following in sync with server/haste/hasteImpl.js
41+
# get basename
42+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
43+
# strip .js or .js.flow suffix
44+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
45+
# strip .ios suffix
46+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
47+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
48+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
49+
module.system.haste.paths.blacklist=.*/__tests__/.*
50+
module.system.haste.paths.blacklist=.*/__mocks__/.*
51+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
52+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/Libraries/.*
53+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/RNTester/.*
54+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/IntegrationTests/.*
55+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
3956

4057
munge_underscores=true
4158

IntegrationTests/AccessibilityManagerTest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @flow
8-
* @providesModule AccessibilityManagerTest
98
*/
109
'use strict';
1110

IntegrationTests/AppEventsTest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @providesModule AppEventsTest
87
* @flow
98
*/
109
'use strict';

IntegrationTests/AsyncStorageTest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @flow
8-
* @providesModule AsyncStorageTest
98
*/
109
'use strict';
1110

IntegrationTests/ImageCachePolicyTest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @flow
8-
* @providesModule ImageCachePolicyTest
98
*/
109
'use strict';
1110

IntegrationTests/ImageSnapshotTest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @flow
8-
* @providesModule ImageSnapshotTest
98
*/
109
'use strict';
1110

IntegrationTests/IntegrationTestHarnessTest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @flow
8-
* @providesModule IntegrationTestHarnessTest
98
*/
109
'use strict';
1110

IntegrationTests/IntegrationTestsApp.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @flow
8-
* @providesModule IntegrationTestsApp
98
*/
109
'use strict';
1110

IntegrationTests/LayoutEventsTest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @providesModule LayoutEventsTest
87
* @flow
98
*/
109
'use strict';

IntegrationTests/LoggingTestModule.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @providesModule LoggingTestModule
87
*/
98
'use strict';
109

0 commit comments

Comments
 (0)