Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Micha Reiser 93377ff508 Remove "use strict" directive from ES Modules
Summary:
ES Modules implicitly enable strict mode. Adding the "use strict" directive is, therefore, not required.

This diff removes all "use strict" directives from ES modules.

Changelog:

[Internal]

Reviewed By: motiz88

Differential Revision: D26172715

fbshipit-source-id: 57957bcbb672c4c3e62b1db633cf425c1c9d6430
2021-02-02 11:12:56 -08:00
Ramanpreet Nara b70152cdef Fix NativeLinking split
Summary:
In D24324247 (56c363e39a), I split NativeLinking into NativeLinkingManager and NativeIntentAndroid. There was this line in NativeLinking.js, that I didn't migrate correctly:

```
export default ((Platform.OS === 'android'
  ? TurboModuleRegistry.getEnforcing<Spec>('IntentAndroid')
  : TurboModuleRegistry.getEnforcing<Spec>('LinkingManager')): Spec);
```

I separated this conditional statement into two others:
```
export default TurboModuleRegistry.getEnforcing<Spec>('IntentAndroid');
export default TurboModuleRegistry.getEnforcing<Spec>('LinkingManager');
```

The problem here is that now on iOS, we're hard requiring IntentAndroid, and on Android, we're hard requiring LinkingManager. Understandably, this started throwing errors in our e2e infra. This diff fixes this problem by:
1. Changing the relevant `getEnforcing` calls into `get` calls.
2. Wrapping all usages of NativeIntentAndroid, and NativeLinkingManager, which are already guarded by `Platform.OS` checks, by a nullthrows. This should satisfy flow. **Note:** NativeIntentAndroid is only used on Android, where it must be available. Similarly, NativeLinkingManager is only used on iOS, where it must be available.

Changelog: [Internal]

build-break
overriding_review_checks_triggers_an_audit_and_retroactive_review

Oncall Short Name: fbandroid_sheriff

Differential Revision: D24338558

fbshipit-source-id: b0d22cba77e67837834269deaa317dc73d2457dc
2020-10-15 11:49:19 -07:00
Ramanpreet Nara 56c363e39a Split NativeLinking into NativeIntentManager and NativeLinkingManager
Summary:
The iOS and Android NativeModules are very different. It's better to split the two interfaces, than to have one merged interface.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24324247

fbshipit-source-id: 097273829ffc719eff006ed2dde55f0dd6bd7d95
2020-10-15 08:49:28 -07:00