docstring_tokens
stringlengths 18
16.9k
| code_tokens
stringlengths 75
1.81M
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|
keep keep add keep keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesEmbeddedAppLoader.h>
<mask> #import <EXUpdates/EXUpdatesUtils.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> NSString * const EXUpdatesEmbeddedManifestName = @"app";
<mask> NSString * const EXUpdatesEmbeddedManifestType = @"manifest";
<mask> NSString * const EXUpdatesEmbeddedBundleFilename = @"app";
<mask> NSString * const EXUpdatesEmbeddedBundleFileType = @"bundle";
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add @import EXManifests;
</s> add @import EXManifests;
</s> remove @import EXManifests;
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @import EXManifests;
@import EXUpdates; </s> add @import EXUpdates; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/AppLoader/EXUpdatesEmbeddedAppLoader.m
|
keep keep add keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesAppController.h>
<mask>
<mask> @import EASClient;
<mask>
<mask> #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
<mask> #import <EXUpdates/EXUpdates-Swift.h>
<mask> #else
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
@import EXManifests;
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
@import EXManifests;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/AppLoader/EXUpdatesFileDownloader.m
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> *
<mask> * Updates returned from this method should not be used to launch.
<mask> */
<mask> - (nullable NSArray<EXUpdatesUpdate *> *)allUpdatesWithConfig:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
<mask> - (nullable NSArray<EXUpdatesUpdate *> *)allUpdatesWithStatus:(EXUpdatesUpdateStatus)status config:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
<mask> - (nullable NSArray<NSUUID *> *)allUpdateIdsWithStatus:(EXUpdatesUpdateStatus)status error:(NSError ** _Nullable)error;
<mask> - (nullable NSArray<EXUpdatesUpdate *> *)launchableUpdatesWithConfig:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
<mask> - (nullable EXUpdatesUpdate *)updateWithId:(NSUUID *)updateId config:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
<mask> - (nullable NSArray<EXUpdatesAsset *> *)allAssetsWithError:(NSError ** _Nullable)error;
<mask> - (nullable NSArray<EXUpdatesAsset *> *)assetsWithUpdateId:(NSUUID *)updateId error:(NSError ** _Nullable)error;
<mask> - (nullable EXUpdatesAsset *)assetWithKey:(nullable NSString *)key error:(NSError ** _Nullable)error;
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusEmbedded config:config error:&err];
</s> add NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusStatusEmbedded config:config error:&err]; </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add @import EXManifests;
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
@import EXManifests;
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/Database/EXUpdatesDatabase.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // Copyright 2021-present 650 Industries. All rights reserved.
<mask>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @interface EXUpdatesDatabaseIntegrityCheck : NSObject
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesBareUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #import "EXUpdates-Swift.h"
@import EXManifests;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/Database/EXUpdatesDatabaseIntegrityCheck.h
|
keep add keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesFileDownloader.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @implementation EXUpdatesDatabaseIntegrityCheck
<mask>
<mask> + (BOOL)runWithDatabase:(EXUpdatesDatabase *)database
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #import "EXUpdates-Swift.h"
@import EXManifests;
</s> remove if (!filters || !update.manifestJSON) {
</s> add if (!filters || !update.manifest.rawManifestJSON) { </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/Database/EXUpdatesDatabaseIntegrityCheck.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return NO;
<mask> }
<mask> }
<mask>
<mask> NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusEmbedded config:config error:&err];
<mask> if (err) {
<mask> *error = err;
<mask> return NO;
<mask> }
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove extension Optional {
</s> add public extension Optional { </s> remove NSDictionary *metadata = update.manifestJSON[@"metadata"];
</s> add NSDictionary *metadata = update.manifest.rawManifestJSON[@"metadata"]; </s> remove public func assets() -> [Any]? {
return rawManifestJSON().optionalValue(forKey: "assets")
</s> add public func assets() -> [[String: Any]]? {
return self.rawManifestJSON().optionalValue(forKey: "assets") </s> remove if (!filters || !update.manifestJSON) {
</s> add if (!filters || !update.manifest.rawManifestJSON) { </s> remove theUpdate = [EXUpdatesUpdate updateWithId:NSUUID.UUID scopeKey:scopeKey commitTime:[NSDate dateWithTimeIntervalSince1970:1608667851] runtimeVersion:runtimeVersion manifest:nil status:EXUpdatesUpdateStatusReady keep:YES config:config database:database];
</s> add theUpdate = [[EXUpdatesUpdate alloc] initWithManifest:[EXManifestsManifestFactory manifestForManifestJSON:@{}]
config:config
database:database
updateId:NSUUID.UUID
scopeKey:scopeKey
commitTime:[NSDate dateWithTimeIntervalSince1970:1608667851]
runtimeVersion:runtimeVersion
keep:YES
status:EXUpdatesUpdateStatusStatusReady
isDevelopmentMode:NO
assetsFromManifest:@[]]; </s> remove 'GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS' => 'YES',
'GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS' => 'YES',
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}
</s> add 'USER_HEADER_SEARCH_PATHS' => '"${CONFIGURATION_TEMP_DIR}/EXUpdates.build/DerivedSources"',
'GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS' => 'YES',
'GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS' => 'YES',
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/Database/EXUpdatesDatabaseIntegrityCheck.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicy.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @interface EXUpdatesReaper : NSObject
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> add #import "EXUpdates-Swift.h"
@import EXManifests;
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/Database/EXUpdatesReaper.h
|
keep keep add keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesFileDownloader.h>
<mask> #import <EXUpdates/EXUpdatesReaper.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @implementation EXUpdatesReaper
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/Database/EXUpdatesReaper.m
|
keep keep add keep keep keep keep keep keep
|
<mask> #import "EXUpdates-Swift.h"
<mask> #endif
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> static NSString * const EXUpdatesAppControllerErrorDomain = @"EXUpdatesAppController";
<mask>
<mask> static NSString * const EXUpdatesUpdateAvailableEventName = @"updateAvailable";
<mask> static NSString * const EXUpdatesNoUpdateAvailableEventName = @"noUpdateAvailable";
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add @import EXManifests;
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
@import EXManifests;
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove @import EXManifests;
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @import EXManifests;
@import EXUpdates;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesAppController.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesReaper.h>
<mask> #import <EXUpdates/EXUpdatesReaperSelectionPolicyDevelopmentClient.h>
<mask> #import <EXUpdates/EXUpdatesRemoteAppLoader.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicy.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask> #import <React/RCTBridge.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> static NSString * const EXUpdatesDevLauncherControllerErrorDomain = @"EXUpdatesDevLauncherController";
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
@import EXManifests;
</s> add @import EXManifests;
</s> remove @import EXManifests;
</s> add </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add @import EXManifests;
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @import EXManifests;
@import EXUpdates;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesDevLauncherController.m
|
keep keep add keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesSelectionPolicy.h>
<mask> #import <React/RCTBridge.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> static NSString * const EXUpdatesDevLauncherControllerErrorDomain = @"EXUpdatesDevLauncherController";
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add @import EXManifests;
</s> add @import EXManifests;
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove @import EXManifests;
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @import EXManifests;
@import EXUpdates;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesDevLauncherController.m
|
keep keep keep add keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesAppLauncher.h>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <Foundation/Foundation.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> typedef NS_ENUM(NSInteger, EXUpdatesRemoteLoadStatus) {
<mask> EXUpdatesRemoteLoadStatusIdle,
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> add @class EXUpdatesUpdate;
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesErrorRecovery.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesFileDownloader.h>
<mask> #import <EXUpdates/EXUpdatesModule.h>
<mask> #import <EXUpdates/EXUpdatesRemoteAppLoader.h>
<mask> #import <EXUpdates/EXUpdatesService.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask> #import <EXUpdates/EXUpdatesUtils.h>
<mask>
<mask> #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
<mask> #import <EXUpdates/EXUpdates-Swift.h>
<mask> #else
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add @import EXManifests; </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesModule.m
|
keep keep add keep keep keep keep
|
<mask> #import "EXUpdates-Swift.h"
<mask> #endif
<mask>
<mask> @interface EXUpdatesModule ()
<mask>
<mask> @property (nonatomic, weak) id<EXUpdatesModuleInterface> updatesService;
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #import "EXUpdates-Swift.h"
</s> add #import "EXUpdates-Swift.h"
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesModule.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicy.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask> #import <ExpoModulesCore/EXInternalModule.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> typedef void (^EXUpdatesAppRelaunchCompletionBlock)(BOOL success);
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add @class EXUpdatesUpdate;
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> add @class EXUpdatesUpdate;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesService.h
|
keep add keep keep keep keep keep keep
|
<mask> #import <ExpoModulesCore/EXInternalModule.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> typedef void (^EXUpdatesAppRelaunchCompletionBlock)(BOOL success);
<mask>
<mask> @protocol EXUpdatesModuleInterface
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> add @class EXUpdatesUpdate;
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesService.h
|
keep keep add keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesService.h>
<mask> #import <ExpoModulesCore/EXUtilities.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> /**
<mask> * Internal module whose purpose is to connect EXUpdatesModule with the central updates entry point.
<mask> * In most apps, this is EXUpdatesAppController.
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove extension Dictionary where Key == String {
</s> add public extension Dictionary where Key == String { </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
@import EXManifests;
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove @import EXManifests;
</s> add
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/EXUpdatesService.m
|
keep keep add keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesLauncherSelectionPolicyFilterAware.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicies.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @interface EXUpdatesLauncherSelectionPolicyFilterAware ()
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> add @import EXManifests;
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/SelectionPolicy/EXUpdatesLauncherSelectionPolicyFilterAware.m
|
keep add keep keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesLauncherSelectionPolicySingleUpdate.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @interface EXUpdatesLauncherSelectionPolicySingleUpdate ()
<mask>
<mask> @property (nonatomic, strong) NSUUID *updateId;
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #import "EXUpdates-Swift.h"
</s> add #import "EXUpdates-Swift.h"
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> add @import EXManifests;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/SelectionPolicy/EXUpdatesLauncherSelectionPolicySingleUpdate.m
|
keep add keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesSelectionPolicies.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @implementation EXUpdatesLoaderSelectionPolicyFilterAware
<mask>
<mask> - (BOOL)shouldLoadNewUpdate:(nullable EXUpdatesUpdate *)newUpdate withLaunchedUpdate:(nullable EXUpdatesUpdate *)launchedUpdate filters:(nullable NSDictionary *)filters
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove if (!filters || !update.manifestJSON) {
</s> add if (!filters || !update.manifest.rawManifestJSON) { </s> remove - (nullable NSArray<EXUpdatesUpdate *> *)allUpdatesWithStatus:(EXUpdatesUpdateStatus)status config:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
- (nullable NSArray<NSUUID *> *)allUpdateIdsWithStatus:(EXUpdatesUpdateStatus)status error:(NSError ** _Nullable)error;
</s> add // these use long status temporarily during transition since importing enums is tough
- (nullable NSArray<EXUpdatesUpdate *> *)allUpdatesWithStatus:(long)status config:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
- (nullable NSArray<NSUUID *> *)allUpdateIdsWithStatus:(long)status error:(NSError ** _Nullable)error;
</s> add @import EXManifests;
</s> add #import "EXUpdates-Swift.h"
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/SelectionPolicy/EXUpdatesLoaderSelectionPolicyFilterAware.m
|
keep keep keep add keep keep keep keep keep
|
<mask>
<mask> #import <EXUpdates/EXUpdatesReaperSelectionPolicyFilterAware.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicies.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> @implementation EXUpdatesReaperSelectionPolicyFilterAware
<mask>
<mask> - (NSArray<EXUpdatesUpdate *> *)updatesToDeleteWithLaunchedUpdate:(EXUpdatesUpdate *)launchedUpdate updates:(NSArray<EXUpdatesUpdate *> *)updates filters:(nullable NSDictionary *)filters
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove - (nullable NSArray<EXUpdatesUpdate *> *)allUpdatesWithStatus:(EXUpdatesUpdateStatus)status config:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
- (nullable NSArray<NSUUID *> *)allUpdateIdsWithStatus:(EXUpdatesUpdateStatus)status error:(NSError ** _Nullable)error;
</s> add // these use long status temporarily during transition since importing enums is tough
- (nullable NSArray<EXUpdatesUpdate *> *)allUpdatesWithStatus:(long)status config:(EXUpdatesConfig *)config error:(NSError ** _Nullable)error;
- (nullable NSArray<NSUUID *> *)allUpdateIdsWithStatus:(long)status error:(NSError ** _Nullable)error;
</s> remove NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusEmbedded config:config error:&err];
</s> add NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusStatusEmbedded config:config error:&err]; </s> remove if (!filters || !update.manifestJSON) {
</s> add if (!filters || !update.manifest.rawManifestJSON) { </s> add @import EXManifests;
</s> add #import "EXUpdates-Swift.h"
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/SelectionPolicy/EXUpdatesReaperSelectionPolicyFilterAware.m
|
keep keep add keep keep keep keep keep
|
<mask>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicies.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> /**
<mask> * Utility methods used by multiple [SelectionPolicy] subclasses.
<mask> */
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/SelectionPolicy/EXUpdatesSelectionPolicies.m
|
keep keep keep replace keep keep keep replace keep keep
|
<mask>
<mask> + (BOOL)doesUpdate:(EXUpdatesUpdate *)update matchFilters:(nullable NSDictionary *)filters
<mask> {
<mask> if (!filters || !update.manifestJSON) {
<mask> return YES;
<mask> }
<mask>
<mask> NSDictionary *metadata = update.manifestJSON[@"metadata"];
<mask> if (!metadata || ![metadata isKindOfClass:[NSDictionary class]]) {
<mask> return YES;
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove extension Optional {
</s> add public extension Optional { </s> remove NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusEmbedded config:config error:&err];
</s> add NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusStatusEmbedded config:config error:&err]; </s> remove public func assets() -> [Any]? {
return rawManifestJSON().optionalValue(forKey: "assets")
</s> add public func assets() -> [[String: Any]]? {
return self.rawManifestJSON().optionalValue(forKey: "assets") </s> remove extension Dictionary where Key == String {
</s> add public extension Dictionary where Key == String { </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/SelectionPolicy/EXUpdatesSelectionPolicies.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> #import <EXUpdates/EXUpdatesLauncherSelectionPolicy.h>
<mask> #import <EXUpdates/EXUpdatesLoaderSelectionPolicy.h>
<mask> #import <EXUpdates/EXUpdatesReaperSelectionPolicy.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask>
<mask> NS_ASSUME_NONNULL_BEGIN
<mask>
<mask> /**
<mask> * Pluggable class whose essential responsibility is to determine an ordering of the updates stored
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
@import EXManifests;
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add @import EXManifests; </s> remove @import EXManifests;
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/EXUpdates/SelectionPolicy/EXUpdatesSelectionPolicy.h
|
keep keep keep add keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicy.h>
<mask>
<mask> @interface EXUpdatesAppLauncherWithDatabaseMock : EXUpdatesAppLauncherWithDatabase
<mask>
<mask> + (EXUpdatesUpdate *)testUpdate;
<mask>
<mask> @end
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesAppLauncherWithDatabaseTests.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> NSString *runtimeVersion = @"1.0";
<mask> NSString *scopeKey = @"dummyScope";
<mask> EXUpdatesConfig *config = [EXUpdatesConfig new];
<mask> EXUpdatesDatabase *database = [EXUpdatesDatabase new];
<mask> theUpdate = [EXUpdatesUpdate updateWithId:NSUUID.UUID scopeKey:scopeKey commitTime:[NSDate dateWithTimeIntervalSince1970:1608667851] runtimeVersion:runtimeVersion manifest:nil status:EXUpdatesUpdateStatusReady keep:YES config:config database:database];
<mask> }
<mask> });
<mask> return theUpdate;
<mask> }
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusEmbedded config:config error:&err];
</s> add NSArray<EXUpdatesUpdate *> *updatesWithEmbeddedStatus = [database allUpdatesWithStatus:EXUpdatesUpdateStatusStatusEmbedded config:config error:&err]; </s> remove NSDictionary *metadata = update.manifestJSON[@"metadata"];
</s> add NSDictionary *metadata = update.manifest.rawManifestJSON[@"metadata"]; </s> add @import EXManifests;
</s> add @import EXUpdates; </s> remove extension Optional {
</s> add public extension Optional { </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesAppLauncherWithDatabaseTests.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // Copyright (c) 2021 650 Industries, Inc. All rights reserved.
<mask>
<mask> #import <XCTest/XCTest.h>
<mask>
<mask> #import <EXUpdates/EXUpdatesNewUpdate.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesBuildData+Tests.h>
<mask>
<mask> @import EXManifests;
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesBareUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> add #import "EXUpdates-Swift.h"
</s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesBuildDataTests.m
|
keep keep add keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesBuildData+Tests.h>
<mask>
<mask> @import EXManifests;
<mask>
<mask> @interface EXUpdatesBuildDataTests : XCTestCase
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add #import "EXUpdates-Swift.h" </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesBuildDataTests.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> #import <EXUpdates/EXUpdatesAsset.h>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase+Tests.h>
<mask> #import <EXUpdates/EXUpdatesNewUpdate.h>
<mask>
<mask> @import EXManifests;
<mask>
<mask> @interface EXUpdatesDatabaseTests : XCTestCase
<mask>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> add #import "EXUpdates-Swift.h"
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesDatabaseTests.m
|
keep add keep keep keep keep
|
<mask> #import <OCMockito/OCMockito.h>
<mask>
<mask> @interface EXUpdatesErrorRecoveryTests : XCTestCase
<mask>
<mask> @property (nonatomic, strong) EXUpdatesErrorRecovery *errorRecovery;
<mask> @property (nonatomic, strong) dispatch_queue_t testQueue;
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> add #import "EXUpdates-Swift.h"
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesErrorRecoveryTests.m
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> #import <XCTest/XCTest.h>
<mask>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesLegacyUpdate.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask>
<mask> @interface EXUpdatesLegacyUpdateTests : XCTestCase
<mask>
<mask> @property (nonatomic, strong) EXUpdatesConfig *config;
<mask> @property (nonatomic, strong) EXUpdatesConfig *selfHostedConfig;
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> add #import "EXUpdates-Swift.h"
</s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> add #import "EXUpdates-Swift.h"
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesLegacyUpdateTests.m
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> #import <XCTest/XCTest.h>
<mask>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesNewUpdate.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask>
<mask> @interface EXUpdatesNewUpdateTests : XCTestCase
<mask>
<mask> @property (nonatomic, strong) EXUpdatesConfig *config;
<mask> @property (nonatomic, strong) EXUpdatesDatabase *database;
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> add #import "EXUpdates-Swift.h"
</s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #import "EXUpdates-Swift.h"
</s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesNewUpdateTests.m
|
keep keep keep replace keep keep replace
|
<mask>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesNewUpdate.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicyFactory.h>
<mask> #import <EXUpdates/EXUpdatesSelectionPolicies.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesBareUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add #import "EXUpdates-Swift.h" </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesSelectionPolicyFilterAwareTests.m
|
keep keep keep keep replace keep keep replace replace replace keep keep keep
|
<mask> // Copyright (c) 2020 650 Industries, Inc. All rights reserved.
<mask>
<mask> #import <XCTest/XCTest.h>
<mask>
<mask> #import <EXUpdates/EXUpdatesBareUpdate.h>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesLegacyUpdate.h>
<mask> #import <EXUpdates/EXUpdatesNewUpdate.h>
<mask> #import <EXUpdates/EXUpdatesUpdate.h>
<mask> #import <EXUpdates/EXUpdatesManifestHeaders.h>
<mask>
<mask> @interface EXUpdatesUpdateTests : XCTestCase
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add @class EXUpdatesUpdate; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests;
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesUpdateTests.m
|
keep keep add keep keep keep keep keep
|
<mask> #import <EXUpdates/EXUpdatesDatabase.h>
<mask> #import <EXUpdates/EXUpdatesManifestHeaders.h>
<mask>
<mask> @interface EXUpdatesUpdateTests : XCTestCase
<mask>
<mask> @property (nonatomic, strong) NSDictionary *legacyManifest;
<mask> @property (nonatomic, strong) NSDictionary *easNewManifest;
<mask> @property (nonatomic, strong) NSDictionary *bareManifest;
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #import "EXUpdates-Swift.h"
</s> remove #import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> add #if __has_include(<EXUpdates/EXUpdates-Swift.h>)
#import <EXUpdates/EXUpdates-Swift.h>
#else
#import "EXUpdates-Swift.h"
#endif
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/EXUpdatesUpdateTests.m
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> @import XCTest;
<mask>
<mask> #import <EXUpdates/EXUpdatesAsset.h>
<mask> #import <EXUpdates/EXUpdatesConfig.h>
<mask> #import <EXUpdates/EXUpdatesLegacyUpdate.h>
<mask> #import <EXUpdates/EXUpdatesUtils.h>
<mask>
<mask> @interface Tests : XCTestCase
<mask>
<mask> @end
</s> [exupdates][ios] Start converting to swift (#21320)
# Why
Start the conversion process of the expo-updates library by converting
EXUpdatesUpdate and subclasses.
# How
Convert manually... lol.
The main note is that we can't use swift nullability/type forcing
operators (`!`, `as!`, `as?`) etc since the previous implementation was
relying upon NSAssert to raise an NSException which is caught in the
calling code, so I added new extension functions to replicate the
behavior (similar to EXManifests util functions).
# Test Plan
Build and run all tests.
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->
- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin). </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add #import "EXUpdates-Swift.h" </s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesNewUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add </s> add #import "EXUpdates-Swift.h"
@import EXManifests;
</s> remove #import <EXUpdates/EXUpdatesLegacyUpdate.h>
#import <EXUpdates/EXUpdatesUpdate.h>
</s> add #import "EXUpdates-Swift.h"
@import EXManifests; </s> remove #import <EXUpdates/EXUpdatesNewUpdate.h>
</s> add </s> add #import "EXUpdates-Swift.h"
|
https://github.com/expo/expo/commit/0b66f7ddca830fc07b994e1371b091b24abb88ab
|
packages/expo-updates/ios/Tests/Tests.m
|
keep keep keep replace replace replace replace keep keep keep replace replace replace keep keep keep keep
|
<mask> "test": "jest"
<mask> },
<mask> "dependencies": {
<mask> "expo": "~38.0.0",
<mask> "expo-splash-screen": "~0.3.1",
<mask> "expo-status-bar": "^1.0.0",
<mask> "expo-updates": "~0.2.10",
<mask> "react": "~16.11.0",
<mask> "react-dom": "~16.11.0",
<mask> "react-native": "~0.62.2",
<mask> "react-native-gesture-handler": "~1.6.1",
<mask> "react-native-reanimated": "~1.9.0",
<mask> "react-native-screens": "~2.9.0",
<mask> "react-native-unimodules": "~0.10.1",
<mask> "react-native-web": "~0.12.0"
<mask> },
<mask> "devDependencies": {
</s> [templates] update project templates to latest expo package versions </s> remove "react-native-gesture-handler": "~1.6.0",
"react-native-reanimated": "~1.9.0",
"react-native-screens": "~2.9.0",
</s> add "react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-screens": "~2.10.1", </s> remove "expo": "~38.0.0",
"expo-updates": "~0.2.8",
</s> add "expo": "~39.0.1",
"expo-updates": "~0.3.2", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
"react-native-gesture-handler": "~1.6.0",
"react-native-safe-area-context": "3.0.2",
"react-native-screens": "~2.9.0",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1", </s> remove "expo": "~38.0.0",
"expo-status-bar": "^1.0.0",
</s> add "expo": "~39.0.1",
"expo-status-bar": "~1.0.2", </s> remove "expo": "~38.0.0",
"expo-status-bar": "^1.0.0",
</s> add "expo": "~39.0.1",
"expo-status-bar": "~1.0.2",
|
https://github.com/expo/expo/commit/0d9fab0e0d8ef3957e01350ea4a74ca616fca67e
|
templates/expo-template-bare-minimum/package.json
|
keep keep keep replace replace keep keep keep replace replace replace keep keep keep
|
<mask> "test": "jest"
<mask> },
<mask> "dependencies": {
<mask> "expo": "~38.0.0",
<mask> "expo-updates": "~0.2.8",
<mask> "react": "~16.11.0",
<mask> "react-dom": "~16.11.0",
<mask> "react-native": "~0.62.2",
<mask> "react-native-gesture-handler": "~1.6.0",
<mask> "react-native-reanimated": "~1.9.0",
<mask> "react-native-screens": "~2.9.0",
<mask> "react-native-unimodules": "~0.10.0",
<mask> "react-native-web": "~0.12.0"
<mask> },
</s> [templates] update project templates to latest expo package versions </s> remove "react-native-gesture-handler": "~1.6.1",
"react-native-reanimated": "~1.9.0",
"react-native-screens": "~2.9.0",
</s> add "react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-screens": "~2.10.1", </s> remove "expo": "~38.0.0",
"expo-splash-screen": "~0.3.1",
"expo-status-bar": "^1.0.0",
"expo-updates": "~0.2.10",
</s> add "expo": "~39.0.1",
"expo-splash-screen": "~0.6.0",
"expo-status-bar": "~1.0.2",
"expo-updates": "~0.3.2", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
"react-native-gesture-handler": "~1.6.0",
"react-native-safe-area-context": "3.0.2",
"react-native-screens": "~2.9.0",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1", </s> remove "expo": "~38.0.0",
"expo-status-bar": "^1.0.0",
</s> add "expo": "~39.0.1",
"expo-status-bar": "~1.0.2", </s> remove "expo": "~38.0.0",
"expo-status-bar": "^1.0.0",
</s> add "expo": "~39.0.1",
"expo-status-bar": "~1.0.2",
|
https://github.com/expo/expo/commit/0d9fab0e0d8ef3957e01350ea4a74ca616fca67e
|
templates/expo-template-bare-typescript/package.json
|
keep replace replace keep keep replace keep
|
<mask> "dependencies": {
<mask> "expo": "~38.0.0",
<mask> "expo-status-bar": "^1.0.0",
<mask> "react": "~16.11.0",
<mask> "react-dom": "~16.11.0",
<mask> "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
<mask> "react-native-web": "~0.12.0"
</s> [templates] update project templates to latest expo package versions </s> remove "expo": "~38.0.0",
"expo-status-bar": "^1.0.0",
</s> add "expo": "~39.0.1",
"expo-status-bar": "~1.0.2", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz", </s> remove "expo": "~38.0.0",
"expo-splash-screen": "~0.3.1",
"expo-status-bar": "^1.0.0",
"expo-updates": "~0.2.10",
</s> add "expo": "~39.0.1",
"expo-splash-screen": "~0.6.0",
"expo-status-bar": "~1.0.2",
"expo-updates": "~0.3.2", </s> remove "expo": "~38.0.0",
"expo-updates": "~0.2.8",
</s> add "expo": "~39.0.1",
"expo-updates": "~0.3.2", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
"react-native-gesture-handler": "~1.6.0",
"react-native-safe-area-context": "3.0.2",
"react-native-screens": "~2.9.0",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
|
https://github.com/expo/expo/commit/0d9fab0e0d8ef3957e01350ea4a74ca616fca67e
|
templates/expo-template-blank-typescript/package.json
|
keep keep replace replace keep keep replace
|
<mask> },
<mask> "dependencies": {
<mask> "expo": "~38.0.0",
<mask> "expo-status-bar": "^1.0.0",
<mask> "react": "~16.11.0",
<mask> "react-dom": "~16.11.0",
<mask> "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
</s> [templates] update project templates to latest expo package versions
|
https://github.com/expo/expo/commit/0d9fab0e0d8ef3957e01350ea4a74ca616fca67e
|
templates/expo-template-blank/package.json
|
keep replace replace replace replace keep replace replace replace
|
<mask> "@react-navigation/stack": "^5.6.2",
<mask> "expo": "~38.0.0",
<mask> "expo-asset": "~8.1.7",
<mask> "expo-constants": "~9.1.1",
<mask> "expo-font": "~8.2.1",
<mask> "expo-linking": "^1.0.1",
<mask> "expo-splash-screen": "~0.3.1",
<mask> "expo-status-bar": "1.0.0",
<mask> "expo-web-browser": "~8.3.1",
</s> [templates] update project templates to latest expo package versions </s> remove "expo": "~38.0.0",
"expo-splash-screen": "~0.3.1",
"expo-status-bar": "^1.0.0",
"expo-updates": "~0.2.10",
</s> add "expo": "~39.0.1",
"expo-splash-screen": "~0.6.0",
"expo-status-bar": "~1.0.2",
"expo-updates": "~0.3.2", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
"react-native-gesture-handler": "~1.6.0",
"react-native-safe-area-context": "3.0.2",
"react-native-screens": "~2.9.0",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1", </s> remove "expo": "~38.0.0",
"expo-status-bar": "^1.0.0",
</s> add "expo": "~39.0.1",
"expo-status-bar": "~1.0.2", </s> remove "expo": "~38.0.0",
"expo-status-bar": "^1.0.0",
</s> add "expo": "~39.0.1",
"expo-status-bar": "~1.0.2", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
|
https://github.com/expo/expo/commit/0d9fab0e0d8ef3957e01350ea4a74ca616fca67e
|
templates/expo-template-tabs/package.json
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> "expo-status-bar": "1.0.0",
<mask> "expo-web-browser": "~8.3.1",
<mask> "react": "~16.11.0",
<mask> "react-dom": "~16.11.0",
<mask> "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
<mask> "react-native-gesture-handler": "~1.6.0",
<mask> "react-native-safe-area-context": "3.0.2",
<mask> "react-native-screens": "~2.9.0",
<mask> "react-native-web": "~0.12.0"
<mask> },
<mask> "devDependencies": {
<mask> "@babel/core": "^7.8.6",
<mask> "@types/react": "~16.9.23",
</s> [templates] update project templates to latest expo package versions </s> remove "expo-splash-screen": "~0.3.1",
"expo-status-bar": "1.0.0",
"expo-web-browser": "~8.3.1",
</s> add "expo-splash-screen": "~0.6.0",
"expo-status-bar": "~1.0.2",
"expo-web-browser": "~8.5.0", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz", </s> remove "react-native-gesture-handler": "~1.6.0",
"react-native-reanimated": "~1.9.0",
"react-native-screens": "~2.9.0",
</s> add "react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-screens": "~2.10.1", </s> remove "react-native-gesture-handler": "~1.6.1",
"react-native-reanimated": "~1.9.0",
"react-native-screens": "~2.9.0",
</s> add "react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-screens": "~2.10.1", </s> remove "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
</s> add "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz", </s> remove "expo": "~38.0.0",
"expo-asset": "~8.1.7",
"expo-constants": "~9.1.1",
"expo-font": "~8.2.1",
</s> add "expo": "~39.0.1",
"expo-asset": "~8.2.0",
"expo-constants": "~9.2.0",
"expo-font": "~8.3.0",
|
https://github.com/expo/expo/commit/0d9fab0e0d8ef3957e01350ea4a74ca616fca67e
|
templates/expo-template-tabs/package.json
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> typedef NS_ENUM(NSInteger, EXUpdatesCheckAutomaticallyConfig) {
<mask> EXUpdatesCheckAutomaticallyConfigAlways = 0,
<mask> EXUpdatesCheckAutomaticallyConfigWifiOnly = 1,
<mask> EXUpdatesCheckAutomaticallyConfigNever = 2
<mask> };
<mask>
<mask> FOUNDATION_EXPORT NSString * const EXUpdatesConfigPlistName;
<mask> FOUNDATION_EXPORT NSString * const EXUpdatesConfigEnableAutoSetupKey;
<mask>
</s> [expo-updates][ios] add native setting for checkAutomatically: ON_ERROR_RECOVERY (#14673) </s> add case EXUpdatesCheckAutomaticallyConfigErrorRecoveryOnly:
// check will happen later on if there's an error
return NO; </s> add @property (nonatomic, readonly, strong) EXUpdatesConfig *config;
|
https://github.com/expo/expo/commit/0e8b94aaba1aa0b10d8ffa63e7196f1360a8e383
|
packages/expo-updates/ios/EXUpdates/EXUpdatesConfig.h
|
keep keep keep add keep keep keep keep keep keep
|
<mask> };
<mask>
<mask> @protocol EXUpdatesErrorRecoveryDelegate <NSObject>
<mask>
<mask> @property (nonatomic, readonly, strong) EXUpdatesUpdate *launchedUpdate;
<mask> @property (nonatomic, readonly, assign) EXUpdatesRemoteLoadStatus remoteLoadStatus;
<mask>
<mask> - (void)relaunchWithCompletion:(EXUpdatesAppLauncherCompletionBlock)completion;
<mask> - (void)loadRemoteUpdate;
<mask>
</s> [expo-updates][ios] add native setting for checkAutomatically: ON_ERROR_RECOVERY (#14673) </s> remove EXUpdatesCheckAutomaticallyConfigNever = 2
</s> add EXUpdatesCheckAutomaticallyConfigNever = 2,
EXUpdatesCheckAutomaticallyConfigErrorRecoveryOnly = 3 </s> add case EXUpdatesCheckAutomaticallyConfigErrorRecoveryOnly:
// check will happen later on if there's an error
return NO;
|
https://github.com/expo/expo/commit/0e8b94aaba1aa0b10d8ffa63e7196f1360a8e383
|
packages/expo-updates/ios/EXUpdates/EXUpdatesErrorRecovery.h
|
keep add keep keep keep keep keep keep
|
<mask> case EXUpdatesCheckAutomaticallyConfigNever:
<mask> return NO;
<mask> case EXUpdatesCheckAutomaticallyConfigWifiOnly: {
<mask> struct sockaddr_in zeroAddress;
<mask> bzero(&zeroAddress, sizeof(zeroAddress));
<mask> zeroAddress.sin_len = sizeof(zeroAddress);
<mask> zeroAddress.sin_family = AF_INET;
<mask>
</s> [expo-updates][ios] add native setting for checkAutomatically: ON_ERROR_RECOVERY (#14673) </s> remove EXUpdatesCheckAutomaticallyConfigNever = 2
</s> add EXUpdatesCheckAutomaticallyConfigNever = 2,
EXUpdatesCheckAutomaticallyConfigErrorRecoveryOnly = 3 </s> add @property (nonatomic, readonly, strong) EXUpdatesConfig *config;
|
https://github.com/expo/expo/commit/0e8b94aaba1aa0b10d8ffa63e7196f1360a8e383
|
packages/expo-updates/ios/EXUpdates/EXUpdatesUtils.m
|
add keep keep keep keep keep
|
<mask> apply plugin: 'com.android.library'
<mask> apply plugin: 'maven'
<mask>
<mask> group = 'host.exp.exponent'
<mask> version = '0.7.1'
<mask>
</s> [expo-notifications] Add Kotlin to expo-notifications (#10551)
# Why
A prerequisite to next steps moving notifications handling to a single thread.
# How
Looked at the difference in `build.gradle`s between `expo-notifications` and `expo-splash-screen`, applied the changes.
# Test Plan
Kotlin works! (tested manually on a different branch) </s> remove // Simple helper that allows the root project to override versions declared by this library.
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
</s> add buildscript {
// Simple helper that allows the root project to override versions declared by this library.
ext.safeExtGet = { prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.3.61')}"
} </s> add implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.3.50')}"
|
https://github.com/expo/expo/commit/0ed719bab8dab9af08a4a36014a9a7ff1c2922be
|
packages/expo-notifications/android/build.gradle
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask>
<mask> group = 'host.exp.exponent'
<mask> version = '0.7.1'
<mask>
<mask> // Simple helper that allows the root project to override versions declared by this library.
<mask> def safeExtGet(prop, fallback) {
<mask> rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
<mask> }
<mask>
<mask> // Upload android library to maven with javadoc and android sources
<mask> configurations {
<mask> deployerJars
</s> [expo-notifications] Add Kotlin to expo-notifications (#10551)
# Why
A prerequisite to next steps moving notifications handling to a single thread.
# How
Looked at the difference in `build.gradle`s between `expo-notifications` and `expo-splash-screen`, applied the changes.
# Test Plan
Kotlin works! (tested manually on a different branch) </s> add apply plugin: 'kotlin-android' </s> add implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.3.50')}"
|
https://github.com/expo/expo/commit/0ed719bab8dab9af08a4a36014a9a7ff1c2922be
|
packages/expo-notifications/android/build.gradle
|
keep keep keep add keep keep keep keep
|
<mask> api 'androidx.lifecycle:lifecycle-runtime:2.2.0'
<mask> api 'androidx.lifecycle:lifecycle-process:2.2.0'
<mask> api 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
<mask>
<mask> api 'com.google.firebase:firebase-messaging:20.2.4'
<mask>
<mask> api 'me.leolin:ShortcutBadger:1.1.22@aar'
<mask> }
</s> [expo-notifications] Add Kotlin to expo-notifications (#10551)
# Why
A prerequisite to next steps moving notifications handling to a single thread.
# How
Looked at the difference in `build.gradle`s between `expo-notifications` and `expo-splash-screen`, applied the changes.
# Test Plan
Kotlin works! (tested manually on a different branch) </s> remove // Simple helper that allows the root project to override versions declared by this library.
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
</s> add buildscript {
// Simple helper that allows the root project to override versions declared by this library.
ext.safeExtGet = { prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.3.61')}"
} </s> add apply plugin: 'kotlin-android'
|
https://github.com/expo/expo/commit/0ed719bab8dab9af08a4a36014a9a7ff1c2922be
|
packages/expo-notifications/android/build.gradle
|
keep keep add keep keep keep keep keep keep
|
<mask> | `EXPO_METRO_NO_MAIN_FIELD_OVERRIDE` | **boolean** | Force Expo CLI to use the [`resolver.resolverMainFields`](https://facebook.github.io/metro/docs/configuration/#resolvermainfields) from the project's **metro.config.js** for all platforms. By default, Expo CLI will use `['browser', 'module', 'main']`, which is the default for webpack, for the web and the user-defined main fields for other platforms. |
<mask> | `EXPO_USE_PATH_ALIASES` | **boolean** | <StatusTag status="experimental" note="SDK 49+" /><br/>Allow Metro to use the `compilerOptions.paths` and `compilerOptions.baseUrl` features from **tsconfig.json** or **jsconfig.json**) to enable import aliases and absolute imports. |
<mask> | `EXPO_USE_CUSTOM_INSPECTOR_PROXY` | **boolean** | <StatusTag status="experimental" note="SDK 49+" /><br/>Use a customized inspector proxy with improved support for the Chrome DevTools protocol.<br/>This includes support for the network inspector. |
<mask>
<mask> ## Telemetry
<mask>
<mask> Expo dev tools collect anonymous data about general usage. This helps us know when a feature is not working as expected. Telemetry is completely optional, you can opt out by using the `EXPO_NO_TELEMETRY=1` environment variable.
<mask>
<mask> [ngrok]: https://ngrok.com
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> {
</s> add export async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> { </s> add /** **Experimental:** Enable automatic TypeScript types for Expo Router projects (SDK +49). */
get EXPO_USE_TYPED_ROUTES() {
return boolish('EXPO_USE_TYPED_ROUTES', false);
} </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> { </s> remove import { waitForMetroToObserveTypeScriptFile } from './waitForMetroToObserveTypeScriptFile';
</s> add import { metroWatchTypeScriptFiles } from './metroWatchTypeScriptFiles';
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
docs/pages/more/expo-cli.mdx
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> protected abstract startImplementationAsync(
<mask> options: BundlerStartOptions
<mask> ): Promise<DevServerInstance>;
<mask>
<mask> public async waitForTypeScriptAsync(): Promise<void> {
<mask> // noop -- We've only implemented this functionality in Metro.
<mask> }
<mask>
<mask> /**
<mask> * Creates a mock server representation that can be used to estimate URLs for a server started in another process.
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> { </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove Log.exception(error);
}
}
);
</s> add try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
resolve(true);
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
);
Log.exception(error);
resolve(false);
}
},
});
});
}
public async startTypeScriptServices() {
typescriptTypeGeneration({
server: this.instance!.server,
metro: this.metro,
projectRoot: this.projectRoot,
}); </s> add import { env } from '../../utils/env'; </s> remove await server.waitForTypeScriptAsync();
</s> add if (!typescriptPrerequisite) {
server.waitForTypeScriptAsync().then(async (success) => {
if (success) {
await server.startTypeScriptServices();
}
});
} else {
server.startTypeScriptServices();
}
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/BundlerDevServer.ts
|
keep keep keep add keep keep keep keep keep
|
<mask> import chalk from 'chalk';
<mask>
<mask> import { FileNotifier } from '../../utils/FileNotifier';
<mask> import { logEventAsync } from '../../utils/analytics/rudderstackClient';
<mask> import { ProjectPrerequisite } from '../doctor/Prerequisite';
<mask> import { TypeScriptProjectPrerequisite } from '../doctor/typescript/TypeScriptProjectPrerequisite';
<mask> import * as AndroidDebugBridge from '../platforms/android/adb';
<mask> import { BundlerDevServer, BundlerStartOptions } from './BundlerDevServer';
<mask> import { getPlatformBundlers } from './platformBundlers';
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> add import { typescriptTypeGeneration } from '../type-generation'; </s> remove import { waitForMetroToObserveTypeScriptFile } from './waitForMetroToObserveTypeScriptFile';
</s> add import { metroWatchTypeScriptFiles } from './metroWatchTypeScriptFiles'; </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> {
return false;
}
public async startTypeScriptServices(): Promise<void> { </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove await server.waitForTypeScriptAsync();
</s> add if (!typescriptPrerequisite) {
server.waitForTypeScriptAsync().then(async (success) => {
if (success) {
await server.startTypeScriptServices();
}
});
} else {
server.startTypeScriptServices();
}
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/DevServerManager.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return exp;
<mask> }
<mask>
<mask> async bootstrapTypeScriptAsync() {
<mask> if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
<mask> return;
<mask> }
<mask> // Optionally, wait for the user to add TypeScript during the
<mask> // development cycle.
<mask> const server = devServers.find((server) => server.name === 'metro');
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove await server.waitForTypeScriptAsync();
</s> add if (!typescriptPrerequisite) {
server.waitForTypeScriptAsync().then(async (success) => {
if (success) {
await server.startTypeScriptServices();
}
});
} else {
server.startTypeScriptServices();
} </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove Log.exception(error);
}
}
);
</s> add try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
resolve(true);
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
);
Log.exception(error);
resolve(false);
}
},
});
});
}
public async startTypeScriptServices() {
typescriptTypeGeneration({
server: this.instance!.server,
metro: this.metro,
projectRoot: this.projectRoot,
}); </s> remove async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> {
</s> add export async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> {
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/DevServerManager.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> const server = devServers.find((server) => server.name === 'metro');
<mask> if (!server) {
<mask> return;
<mask> }
<mask> await server.waitForTypeScriptAsync();
<mask> }
<mask>
<mask> /** Stop all servers including ADB. */
<mask> async stopAsync(): Promise<void> {
<mask> await Promise.allSettled([
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
</s> add const typescriptPrerequisite = await this.ensureProjectPrerequisiteAsync(
TypeScriptProjectPrerequisite
);
if (env.EXPO_NO_TYPESCRIPT_SETUP) { </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> add /** **Experimental:** Enable automatic TypeScript types for Expo Router projects (SDK +49). */
get EXPO_USE_TYPED_ROUTES() {
return boolish('EXPO_USE_TYPED_ROUTES', false);
} </s> remove import { waitForMetroToObserveTypeScriptFile } from './waitForMetroToObserveTypeScriptFile';
</s> add import { metroWatchTypeScriptFiles } from './metroWatchTypeScriptFiles';
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/DevServerManager.ts
|
keep add keep keep keep keep keep
|
<mask> import { ServeStaticMiddleware } from '../middleware/ServeStaticMiddleware';
<mask> import { ServerNext, ServerRequest, ServerResponse } from '../middleware/server.types';
<mask> import { instantiateMetroAsync } from './instantiateMetro';
<mask> import { metroWatchTypeScriptFiles } from './metroWatchTypeScriptFiles';
<mask>
<mask> const debug = require('debug')('expo:start:server:metro') as typeof console.log;
<mask>
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove import { waitForMetroToObserveTypeScriptFile } from './waitForMetroToObserveTypeScriptFile';
</s> add import { metroWatchTypeScriptFiles } from './metroWatchTypeScriptFiles'; </s> add import { env } from '../../utils/env'; </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove await server.waitForTypeScriptAsync();
</s> add if (!typescriptPrerequisite) {
server.waitForTypeScriptAsync().then(async (success) => {
if (success) {
await server.startTypeScriptServices();
}
});
} else {
server.startTypeScriptServices();
} </s> remove if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
</s> add const typescriptPrerequisite = await this.ensureProjectPrerequisiteAsync(
TypeScriptProjectPrerequisite
);
if (env.EXPO_NO_TYPESCRIPT_SETUP) {
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> } from '../middleware/RuntimeRedirectMiddleware';
<mask> import { ServeStaticMiddleware } from '../middleware/ServeStaticMiddleware';
<mask> import { ServerNext, ServerRequest, ServerResponse } from '../middleware/server.types';
<mask> import { instantiateMetroAsync } from './instantiateMetro';
<mask> import { waitForMetroToObserveTypeScriptFile } from './waitForMetroToObserveTypeScriptFile';
<mask>
<mask> const debug = require('debug')('expo:start:server:metro') as typeof console.log;
<mask>
<mask> /** Default port to use for apps running in Expo Go. */
<mask> const EXPO_GO_METRO_PORT = 19000;
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> add import { typescriptTypeGeneration } from '../type-generation'; </s> add import { env } from '../../utils/env'; </s> add /** **Experimental:** Enable automatic TypeScript types for Expo Router projects (SDK +49). */
get EXPO_USE_TYPED_ROUTES() {
return boolish('EXPO_USE_TYPED_ROUTES', false);
} </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove await server.waitForTypeScriptAsync();
</s> add if (!typescriptPrerequisite) {
server.waitForTypeScriptAsync().then(async (success) => {
if (success) {
await server.startTypeScriptServices();
}
});
} else {
server.startTypeScriptServices();
} </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
}
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts
|
keep keep keep keep replace keep keep keep replace replace replace replace replace replace replace keep keep keep keep
|
<mask> messageSocket,
<mask> };
<mask> }
<mask>
<mask> public async waitForTypeScriptAsync(): Promise<void> {
<mask> if (!this.instance) {
<mask> throw new Error('Cannot wait for TypeScript without a running server.');
<mask> }
<mask> if (!this.metro) {
<mask> // This can happen when the run command is used and the server is already running in another
<mask> // process. In this case we can't wait for the TypeScript check to complete because we don't
<mask> // have access to the Metro server.
<mask> debug('Skipping TypeScript check because Metro is not running (headless).');
<mask> return;
<mask> }
<mask>
<mask> const off = waitForMetroToObserveTypeScriptFile(
<mask> this.projectRoot,
<mask> { server: this.instance!.server, metro: this.metro },
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove Log.exception(error);
}
}
);
</s> add try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
resolve(true);
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
);
Log.exception(error);
resolve(false);
}
},
});
});
}
public async startTypeScriptServices() {
typescriptTypeGeneration({
server: this.instance!.server,
metro: this.metro,
projectRoot: this.projectRoot,
}); </s> remove if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
</s> add const typescriptPrerequisite = await this.ensureProjectPrerequisiteAsync(
TypeScriptProjectPrerequisite
);
if (env.EXPO_NO_TYPESCRIPT_SETUP) { </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> {
return false;
}
public async startTypeScriptServices(): Promise<void> {
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts
|
keep replace replace replace replace replace replace replace replace replace keep replace replace replace replace replace replace replace replace replace
|
<mask>
<mask> const off = waitForMetroToObserveTypeScriptFile(
<mask> this.projectRoot,
<mask> { server: this.instance!.server, metro: this.metro },
<mask> async () => {
<mask> // Run once, this prevents the TypeScript project prerequisite from running on every file change.
<mask> off();
<mask> const { TypeScriptProjectPrerequisite } = await import(
<mask> '../../doctor/typescript/TypeScriptProjectPrerequisite'
<mask> );
<mask>
<mask> try {
<mask> const req = new TypeScriptProjectPrerequisite(this.projectRoot);
<mask> await req.bootstrapAsync();
<mask> } catch (error: any) {
<mask> // Ensure the process doesn't fail if the TypeScript check fails.
<mask> // This could happen during the install.
<mask> Log.log();
<mask> Log.error(
<mask> chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove Log.exception(error);
}
}
);
</s> add try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
resolve(true);
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
);
Log.exception(error);
resolve(false);
}
},
});
});
}
public async startTypeScriptServices() {
typescriptTypeGeneration({
server: this.instance!.server,
metro: this.metro,
projectRoot: this.projectRoot,
}); </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> remove if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
</s> add const typescriptPrerequisite = await this.ensureProjectPrerequisiteAsync(
TypeScriptProjectPrerequisite
);
if (env.EXPO_NO_TYPESCRIPT_SETUP) { </s> remove async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> {
</s> add export async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> { </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> {
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> Log.log();
<mask> Log.error(
<mask> chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
<mask> );
<mask> Log.exception(error);
<mask> }
<mask> }
<mask> );
<mask> }
<mask>
<mask> protected getConfigModuleIds(): string[] {
<mask> return ['./metro.config.js', './metro.config.json', './rn-cli.config.js'];
<mask> }
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
</s> add const typescriptPrerequisite = await this.ensureProjectPrerequisiteAsync(
TypeScriptProjectPrerequisite
);
if (env.EXPO_NO_TYPESCRIPT_SETUP) { </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> {
return false;
}
public async startTypeScriptServices(): Promise<void> { </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> remove import { waitForMetroToObserveTypeScriptFile } from './waitForMetroToObserveTypeScriptFile';
</s> add import { metroWatchTypeScriptFiles } from './metroWatchTypeScriptFiles';
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts
|
keep keep keep add keep keep keep
|
<mask> /** **Experimental:** Use the network inspector by overriding the metro inspector proxy with a custom version */
<mask> get EXPO_USE_CUSTOM_INSPECTOR_PROXY(): boolean {
<mask> return boolish('EXPO_USE_CUSTOM_INSPECTOR_PROXY', false);
<mask> }
<mask> }
<mask>
<mask> export const env = new Env();
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> add | `EXPO_USE_TYPED_ROUTES` | **boolean** | <StatusTag status="experimental" note="SDK 49+" /><br/>Generate TypeScript types for Expo Router.<br/>This includes support for the network inspector. | </s> remove async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> {
</s> add export async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> { </s> remove import { waitForMetroToObserveTypeScriptFile } from './waitForMetroToObserveTypeScriptFile';
</s> add import { metroWatchTypeScriptFiles } from './metroWatchTypeScriptFiles'; </s> remove await server.waitForTypeScriptAsync();
</s> add if (!typescriptPrerequisite) {
server.waitForTypeScriptAsync().then(async (success) => {
if (success) {
await server.startTypeScriptServices();
}
});
} else {
server.startTypeScriptServices();
} </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
</s> add const typescriptPrerequisite = await this.ensureProjectPrerequisiteAsync(
TypeScriptProjectPrerequisite
);
if (env.EXPO_NO_TYPESCRIPT_SETUP) {
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/utils/env.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if (jsonFileContents.errors?.length) {
<mask> throw new Error(ts.formatDiagnostic(jsonFileContents.errors[0], formatDiagnosticsHost));
<mask> }
<mask>
<mask> return { compilerOptions: jsonFileContents.options };
<mask> } catch (error: any) {
<mask> if (error?.name === 'SyntaxError') {
<mask> throw new Error('tsconfig.json is invalid:\n' + (error.message ?? ''));
<mask> }
<mask> throw error;
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> { </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> remove await server.waitForTypeScriptAsync();
</s> add if (!typescriptPrerequisite) {
server.waitForTypeScriptAsync().then(async (success) => {
if (success) {
await server.startTypeScriptServices();
}
});
} else {
server.startTypeScriptServices();
} </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove Log.exception(error);
}
}
);
</s> add try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
resolve(true);
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
);
Log.exception(error);
resolve(false);
}
},
});
});
}
public async startTypeScriptServices() {
typescriptTypeGeneration({
server: this.instance!.server,
metro: this.metro,
projectRoot: this.projectRoot,
}); </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/utils/tsconfig/evaluateTsConfig.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return null;
<mask> }
<mask>
<mask> // TODO: Refactor for speed
<mask> async function readTsconfigAsync(projectRoot: string): Promise<null | ConfigReadResults> {
<mask> const configPath = path.join(projectRoot, 'tsconfig.json');
<mask> if (await fileExistsAsync(configPath)) {
<mask> // We need to fully evaluate the tsconfig to get the baseUrl and paths in case they were applied in `extends`.
<mask> const ts = importTypeScriptFromProjectOptionally(projectRoot);
<mask> if (ts) {
</s> feat: typed route generation for expo router (#21651)
> Draft PR - just seeking feedback on the implementation.
# Why
WIP implementation of route generation for Expo Router.
# How
## Typescript bootstrapping
This is expands the Typescript bootstrapping to also accommodate for
long-lived typescript watchers.
- Changes `waitForMetroToObserveTypeScriptFile` to
`metroWatchTypeScriptFiles`
- Processes are now responsible to disabling their watcher
- tsconfig can optionally be watched
## Type generation
`typedRouteGenerator` is invokes after the CLI has bootstrapped
TypeScript.
- Generates types only for absolute paths
- Supports static and dynamic routes
- Supports URL normalisation (TODO: Need unit tests for these!)
- Supports dynamic route parameter typing
# Test Plan
`EXPO_ROUTER_TYPED_ROUTES=true nexpo start`
// Todo
# Checklist
- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `expo prebuild` & EAS Build (eg:
updated a module plugin).
---------
Co-authored-by: Evan Bacon <[email protected]> </s> remove if (await this.ensureProjectPrerequisiteAsync(TypeScriptProjectPrerequisite)) {
</s> add const typescriptPrerequisite = await this.ensureProjectPrerequisiteAsync(
TypeScriptProjectPrerequisite
);
if (env.EXPO_NO_TYPESCRIPT_SETUP) { </s> remove if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return;
}
</s> add </s> remove const off = waitForMetroToObserveTypeScriptFile(
this.projectRoot,
{ server: this.instance!.server, metro: this.metro },
async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite'
);
</s> add return new Promise<boolean>((resolve) => {
if (!this.metro) {
// This can happen when the run command is used and the server is already running in another
// process. In this case we can't wait for the TypeScript check to complete because we don't
// have access to the Metro server.
debug('Skipping TypeScript check because Metro is not running (headless).');
return resolve(false);
} </s> remove try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
</s> add const off = metroWatchTypeScriptFiles({
projectRoot: this.projectRoot,
server: this.instance!.server,
metro: this.metro,
tsconfig: true,
throttle: true,
eventTypes: ['change', 'add'],
callback: async () => {
// Run once, this prevents the TypeScript project prerequisite from running on every file change.
off();
const { TypeScriptProjectPrerequisite } = await import(
'../../doctor/typescript/TypeScriptProjectPrerequisite' </s> remove Log.exception(error);
}
}
);
</s> add try {
const req = new TypeScriptProjectPrerequisite(this.projectRoot);
await req.bootstrapAsync();
resolve(true);
} catch (error: any) {
// Ensure the process doesn't fail if the TypeScript check fails.
// This could happen during the install.
Log.log();
Log.error(
chalk.red`Failed to automatically setup TypeScript for your project. Try restarting the dev server to fix.`
);
Log.exception(error);
resolve(false);
}
},
});
});
}
public async startTypeScriptServices() {
typescriptTypeGeneration({
server: this.instance!.server,
metro: this.metro,
projectRoot: this.projectRoot,
}); </s> remove public async waitForTypeScriptAsync(): Promise<void> {
</s> add public async waitForTypeScriptAsync(): Promise<boolean> {
|
https://github.com/expo/expo/commit/1117330aee4397efdbcae647dc47b58ba30baeaf
|
packages/@expo/cli/src/utils/tsconfig/loadTsConfigPaths.ts
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> # generated from template-files/ios/ExpoKit.podspec
<mask>
<mask> Pod::Spec.new do |s|
<mask> s.name = "ExpoKit"
<mask> s.version = "2.7.4"
<mask> s.summary = 'ExpoKit'
<mask> s.description = 'ExpoKit allows native projects to integrate with the Expo SDK.'
<mask> s.homepage = 'http://docs.expo.io'
<mask> s.license = 'BSD'
<mask> s.author = "650 Industries, Inc."
</s> v2.7.5 - Fingerprint and Permissions fixes
fbshipit-source-id: 1267df0 </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string>
|
https://github.com/expo/expo/commit/1194378dc6c461793f6d49dc4526d9ef532015d6
|
ExpoKit.podspec
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> <string>APPL</string>
<mask> <key>CFBundleShortVersionString</key>
<mask> <string>1.0</string>
<mask> <key>CFBundleVersion</key>
<mask> <string>2.7.4</string>
<mask> <key>LSRequiresIPhoneOS</key>
<mask> <true/>
<mask> <key>NSAppTransportSecurity</key>
<mask> <dict>
<mask> <key>NSAllowsArbitraryLoads</key>
</s> v2.7.5 - Fingerprint and Permissions fixes
fbshipit-source-id: 1267df0 </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove s.version = "2.7.4"
</s> add s.version = "2.7.5"
|
https://github.com/expo/expo/commit/1194378dc6c461793f6d49dc4526d9ef532015d6
|
exponent-view-template/ios/exponent-view-template/Supporting/Info.plist
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> <string>$(EX_BUNDLE_NAME)</string>
<mask> <key>CFBundlePackageType</key>
<mask> <string>APPL</string>
<mask> <key>CFBundleShortVersionString</key>
<mask> <string>2.7.4</string>
<mask> <key>CFBundleSignature</key>
<mask> <string>????</string>
<mask> <key>CFBundleURLTypes</key>
<mask> <array>
<mask> <dict>
</s> v2.7.5 - Fingerprint and Permissions fixes
fbshipit-source-id: 1267df0 </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove s.version = "2.7.4"
</s> add s.version = "2.7.5"
|
https://github.com/expo/expo/commit/1194378dc6c461793f6d49dc4526d9ef532015d6
|
ios/Exponent/Supporting/Info.plist
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> </array>
<mask> </dict>
<mask> </array>
<mask> <key>CFBundleVersion</key>
<mask> <string>2.7.4</string>
<mask> <key>Fabric</key>
<mask> <dict>
<mask> <key>APIKey</key>
<mask> <string>a25fafe9f9edee11a9882b32e0cd7a26df6e2c42</string>
<mask> <key>Kits</key>
</s> v2.7.5 - Fingerprint and Permissions fixes
fbshipit-source-id: 1267df0 </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove <string>2.7.4</string>
</s> add <string>2.7.5</string> </s> remove s.version = "2.7.4"
</s> add s.version = "2.7.5"
|
https://github.com/expo/expo/commit/1194378dc6c461793f6d49dc4526d9ef532015d6
|
ios/Exponent/Supporting/Info.plist
|
keep keep add keep keep keep keep keep
|
<mask> import host.exp.exponent.analytics.EXL;
<mask> import host.exp.exponent.kernel.Kernel;
<mask> import host.exp.exponent.kernel.KernelProvider;
<mask> import okhttp3.Call;
<mask> import okhttp3.Callback;
<mask> import okhttp3.OkHttpClient;
<mask> import okhttp3.Request;
<mask> import okhttp3.Response;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponentview.ExponentViewBuildConfig;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> WritableMap result = Arguments.createMap();
<mask> if (file.exists()) {
<mask> result.putBoolean("exists", true);
<mask> result.putBoolean("isDirectory", file.isDirectory());
<mask> result.putString("uri", Uri.fromFile(file).toString());
<mask> if (options.hasKey("md5") && options.getBoolean("md5")) {
<mask> result.putString("md5", md5(file));
<mask> }
<mask> promise.resolve(result);
<mask> } else {
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString());
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> sink.writeAll(response.body().source());
<mask> sink.close();
<mask>
<mask> WritableMap result = Arguments.createMap();
<mask> result.putString("uri", Uri.fromFile(file).toString());
<mask> if (options.hasKey("md5") && options.getBoolean("md5")) {
<mask> result.putString("md5", md5(file));
<mask> }
<mask> promise.resolve(result);
<mask> } catch (Exception e) {
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString());
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep add keep keep keep keep keep keep
|
<mask>
<mask> import host.exp.exponent.ActivityResultListener;
<mask> import host.exp.exponentview.Exponent;
<mask>
<mask> public class ImagePickerModule extends ReactContextBaseJavaModule implements ActivityResultListener {
<mask> static final int REQUEST_LAUNCH_CAMERA = 1;
<mask> static final int REQUEST_LAUNCH_IMAGE_LIBRARY = 2;
<mask>
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> if (imageFile == null) {
<mask> promise.reject(new IOException("Could not create temporary image file."));
<mask> return;
<mask> }
<mask> cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
<mask> mCameraCaptureURI = Uri.fromFile(imageFile);
<mask> mPromise = promise;
<mask> Exponent.getInstance().getCurrentActivity().startActivityForResult(cameraIntent, REQUEST_LAUNCH_CAMERA);
<mask> }
<mask>
<mask> // NOTE: Currently not reentrant / doesn't support concurrent requests
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add Uri uri = ExpFileUtils.uriFromFile(imageFile);
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
mCameraCaptureURI = uri;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> String path = writeImage(bmp);
<mask>
<mask> WritableMap response = Arguments.createMap();
<mask> response.putString("uri", Uri.fromFile(new File(path)).toString());
<mask> response.putInt("width", bmp.getWidth());
<mask> response.putInt("height", bmp.getHeight());
<mask> response.putBoolean("cancelled", false);
<mask> promise.resolve(response);
<mask> }
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString());
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep add keep keep keep keep
|
<mask>
<mask> import abi10_0_0.com.facebook.react.bridge.Promise;
<mask> import abi10_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager;
<mask> import abi10_0_0.com.facebook.react.uimanager.UIBlock;
<mask>
<mask> import java.io.ByteArrayOutputStream;
<mask> import java.io.File;
<mask> import java.io.FileOutputStream;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
</s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/ViewShot.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> try {
<mask> if ("file".equals(result)) {
<mask> os = new FileOutputStream(output);
<mask> captureView(view, os);
<mask> String uri = Uri.fromFile(output).toString();
<mask> promise.resolve(uri);
<mask> }
<mask> else if ("base64".equals(result)) {
<mask> os = new ByteArrayOutputStream();
<mask> captureView(view, os);
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove String uri = Uri.fromFile(output).toString();
</s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove String uri = Uri.fromFile(output).toString();
</s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove String uri = Uri.fromFile(output).toString();
</s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove Amplitude.getInstance().initialize(context, BuildConfig.DEBUG ? ExponentKeys.AMPLITUDE_DEV_KEY : ExponentKeys.AMPLITUDE_KEY);
</s> add Amplitude.getInstance().initialize(context, ExponentViewBuildConfig.DEBUG ? ExponentKeys.AMPLITUDE_DEV_KEY : ExponentKeys.AMPLITUDE_KEY); </s> remove if (BuildConfig.DEBUG) {
</s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove if (BuildConfig.DEBUG) {
</s> add if (ExponentViewBuildConfig.DEBUG) {
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi10_0_0/host/exp/exponent/modules/api/ViewShot.java
|
keep keep keep add keep keep keep keep
|
<mask> import host.exp.exponent.ExponentManifest;
<mask> import host.exp.exponent.analytics.EXL;
<mask> import host.exp.exponent.kernel.Kernel;
<mask> import host.exp.exponent.kernel.KernelProvider;
<mask> import okhttp3.Call;
<mask> import okhttp3.Callback;
<mask> import okhttp3.OkHttpClient;
<mask> import okhttp3.Request;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponentview.ExponentViewBuildConfig;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> WritableMap result = Arguments.createMap();
<mask> if (file.exists()) {
<mask> result.putBoolean("exists", true);
<mask> result.putBoolean("isDirectory", file.isDirectory());
<mask> result.putString("uri", Uri.fromFile(file).toString());
<mask> if (options.hasKey("md5") && options.getBoolean("md5")) {
<mask> result.putString("md5", md5(file));
<mask> }
<mask> promise.resolve(result);
<mask> } else {
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> sink.writeAll(response.body().source());
<mask> sink.close();
<mask>
<mask> WritableMap result = Arguments.createMap();
<mask> result.putString("uri", Uri.fromFile(file).toString());
<mask> if (options.hasKey("md5") && options.getBoolean("md5")) {
<mask> result.putString("md5", md5(file));
<mask> }
<mask> promise.resolve(result);
<mask> } catch (Exception e) {
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep add keep keep keep keep
|
<mask> import com.theartofdev.edmodo.cropper.CropImage;
<mask>
<mask> import host.exp.exponent.ActivityResultListener;
<mask> import host.exp.exponent.experience.BaseExperienceActivity;
<mask> import host.exp.exponentview.Exponent;
<mask>
<mask> public class ImagePickerModule extends ReactContextBaseJavaModule implements ActivityResultListener {
<mask> static final int REQUEST_LAUNCH_CAMERA = 1;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> if (imageFile == null) {
<mask> promise.reject(new IOException("Could not create temporary image file."));
<mask> return;
<mask> }
<mask> cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
<mask> mCameraCaptureURI = Uri.fromFile(imageFile);
<mask> mPromise = promise;
<mask> Exponent.getInstance().getCurrentActivity().startActivityForResult(cameraIntent, REQUEST_LAUNCH_CAMERA);
<mask> }
<mask>
<mask> // NOTE: Currently not reentrant / doesn't support concurrent requests
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> String path = writeImage(bmp);
<mask>
<mask> WritableMap response = Arguments.createMap();
<mask> response.putString("uri", Uri.fromFile(new File(path)).toString());
<mask> response.putInt("width", bmp.getWidth());
<mask> response.putInt("height", bmp.getHeight());
<mask> response.putBoolean("cancelled", false);
<mask> promise.resolve(response);
<mask> }
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep add keep keep keep keep keep keep
|
<mask> import abi11_0_0.com.facebook.react.bridge.Promise;
<mask> import abi11_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager;
<mask> import abi11_0_0.com.facebook.react.uimanager.UIBlock;
<mask>
<mask> import java.io.ByteArrayOutputStream;
<mask> import java.io.File;
<mask> import java.io.FileOutputStream;
<mask> import java.io.IOException;
<mask> import java.io.OutputStream;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
</s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/ViewShot.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> try {
<mask> if ("file".equals(result)) {
<mask> os = new FileOutputStream(output);
<mask> captureView(view, os);
<mask> String uri = Uri.fromFile(output).toString();
<mask> promise.resolve(uri);
<mask> }
<mask> else if ("base64".equals(result)) {
<mask> os = new ByteArrayOutputStream();
<mask> captureView(view, os);
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi11_0_0/host/exp/exponent/modules/api/ViewShot.java
|
keep keep keep add keep keep keep keep keep
|
<mask>
<mask> import host.exp.exponent.ExponentManifest;
<mask> import host.exp.exponent.analytics.EXL;
<mask> import host.exp.exponent.kernel.KernelProvider;
<mask> import okhttp3.Call;
<mask> import okhttp3.Callback;
<mask> import okhttp3.OkHttpClient;
<mask> import okhttp3.Request;
<mask> import okhttp3.Response;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponentview.ExponentViewBuildConfig;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> WritableMap result = Arguments.createMap();
<mask> if (file.exists()) {
<mask> result.putBoolean("exists", true);
<mask> result.putBoolean("isDirectory", file.isDirectory());
<mask> result.putString("uri", Uri.fromFile(file).toString());
<mask> if (options.hasKey("md5") && options.getBoolean("md5")) {
<mask> result.putString("md5", md5(file));
<mask> }
<mask> promise.resolve(result);
<mask> } else {
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> sink.writeAll(response.body().source());
<mask> sink.close();
<mask>
<mask> WritableMap result = Arguments.createMap();
<mask> result.putString("uri", Uri.fromFile(file).toString());
<mask> if (options.hasKey("md5") && options.getBoolean("md5")) {
<mask> result.putString("md5", md5(file));
<mask> }
<mask> promise.resolve(result);
<mask> } catch (Exception e) {
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep add keep keep keep keep keep keep
|
<mask> import com.nostra13.universalimageloader.core.ImageLoader;
<mask> import com.theartofdev.edmodo.cropper.CropImage;
<mask>
<mask> import host.exp.exponent.ActivityResultListener;
<mask> import host.exp.exponentview.Exponent;
<mask>
<mask> public class ImagePickerModule extends ReactContextBaseJavaModule implements ActivityResultListener {
<mask> static final int REQUEST_LAUNCH_CAMERA = 1;
<mask> static final int REQUEST_LAUNCH_IMAGE_LIBRARY = 2;
<mask>
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> if (imageFile == null) {
<mask> promise.reject(new IOException("Could not create temporary image file."));
<mask> return;
<mask> }
<mask> cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
<mask> mCameraCaptureURI = Uri.fromFile(imageFile);
<mask> mPromise = promise;
<mask> Exponent.getInstance().getCurrentActivity().startActivityForResult(cameraIntent, REQUEST_LAUNCH_CAMERA);
<mask> }
<mask>
<mask> // NOTE: Currently not reentrant / doesn't support concurrent requests
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
mCameraCaptureURI = Uri.fromFile(imageFile);
</s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile));
mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile);
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> String path = writeImage(bmp);
<mask>
<mask> WritableMap response = Arguments.createMap();
<mask> response.putString("uri", Uri.fromFile(new File(path)).toString());
<mask> response.putInt("width", bmp.getWidth());
<mask> response.putInt("height", bmp.getHeight());
<mask> response.putBoolean("cancelled", false);
<mask> promise.resolve(response);
<mask> }
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep add keep keep keep keep keep keep
|
<mask>
<mask> import abi12_0_0.com.facebook.react.bridge.Promise;
<mask> import abi12_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager;
<mask> import abi12_0_0.com.facebook.react.uimanager.UIBlock;
<mask>
<mask> import java.io.ByteArrayOutputStream;
<mask> import java.io.File;
<mask> import java.io.FileOutputStream;
<mask> import java.io.IOException;
<mask> import java.io.OutputStream;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
</s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/ViewShot.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> try {
<mask> if ("file".equals(result)) {
<mask> os = new FileOutputStream(output);
<mask> captureView(view, os);
<mask> String uri = Uri.fromFile(output).toString();
<mask> promise.resolve(uri);
<mask> }
<mask> else if ("base64".equals(result)) {
<mask> os = new ByteArrayOutputStream();
<mask> captureView(view, os);
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi12_0_0/host/exp/exponent/modules/api/ViewShot.java
|
keep add keep keep keep keep
|
<mask> import host.exp.exponent.ActivityResultListener;
<mask> import host.exp.exponent.experience.BaseExperienceActivity;
<mask> import host.exp.exponentview.Exponent;
<mask>
<mask> public class ImagePickerModule extends ReactContextBaseJavaModule implements ActivityResultListener {
<mask> static final int REQUEST_LAUNCH_CAMERA = 1;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi7_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> if (imageFile == null) {
<mask> promise.reject(new IOException("Could not create temporary image file."));
<mask> return;
<mask> }
<mask> cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
<mask> mCameraCaptureURI = Uri.fromFile(imageFile);
<mask> mPromise = promise;
<mask> Exponent.getInstance().getCurrentActivity().startActivityForResult(cameraIntent, REQUEST_LAUNCH_CAMERA);
<mask> }
<mask>
<mask> // NOTE: Currently not reentrant / doesn't support concurrent requests
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi7_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> String path = writeImage(bmp);
<mask>
<mask> WritableMap response = Arguments.createMap();
<mask> response.putString("uri", Uri.fromFile(new File(path)).toString());
<mask> response.putInt("width", bmp.getWidth());
<mask> response.putInt("height", bmp.getHeight());
<mask> response.putBoolean("cancelled", false);
<mask> promise.resolve(response);
<mask> }
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi7_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep add keep keep keep keep keep keep
|
<mask> import host.exp.exponent.ExponentManifest;
<mask> import host.exp.exponent.kernel.Kernel;
<mask> import host.exp.exponent.kernel.KernelProvider;
<mask>
<mask> public class FileSystemModule extends ReactContextBaseJavaModule {
<mask> private SparseArray<Downloader> mDownloaders = new SparseArray<Downloader>();
<mask> private String mRootPath;
<mask> private int mNextJobId = 0;
<mask>
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add ExponentViewBuildConfig.DEBUG = BuildConfig.DEBUG; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi7_0_0/host/exp/exponent/modules/api/filesystem/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> public void onTaskCompleted(DownloadResult res) {
<mask> if (res.exception == null) {
<mask> WritableMap infoMap = Arguments.createMap();
<mask>
<mask> infoMap.putString("uri", Uri.fromFile(file).toString());
<mask> infoMap.putInt("jobId", jobId);
<mask> infoMap.putInt("statusCode", res.statusCode);
<mask> infoMap.putInt("bytesWritten", res.bytesWritten);
<mask>
<mask> promise.resolve(infoMap);
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove if (!BuildConfig.DEBUG) {
</s> add if (!ExponentViewBuildConfig.DEBUG) { </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString());
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi7_0_0/host/exp/exponent/modules/api/filesystem/FileSystemModule.java
|
keep keep add keep keep keep keep keep keep
|
<mask> import host.exp.exponent.analytics.EXL;
<mask> import host.exp.exponent.kernel.Kernel;
<mask> import host.exp.exponent.kernel.KernelProvider;
<mask> import okhttp3.Call;
<mask> import okhttp3.Callback;
<mask> import okhttp3.OkHttpClient;
<mask> import okhttp3.Request;
<mask> import okhttp3.Response;
<mask> import okio.BufferedSink;
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponentview.ExponentViewBuildConfig;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi8_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> WritableMap response = Arguments.createMap();
<mask> if (file.exists()) {
<mask> response.putBoolean("exists", true);
<mask> response.putBoolean("isDirectory", file.isDirectory());
<mask> response.putString("uri", Uri.fromFile(file).toString());
<mask> promise.resolve(response);
<mask> } else {
<mask> response.putBoolean("exists", false);
<mask> response.putBoolean("isDirectory", false);
<mask> promise.resolve(response);
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString());
</s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString());
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi8_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> sink.writeAll(response.body().source());
<mask> sink.close();
<mask>
<mask> WritableMap result = Arguments.createMap();
<mask> result.putString("uri", Uri.fromFile(file).toString());
<mask> promise.resolve(result);
<mask> } catch (Exception e) {
<mask> EXL.e(TAG, e.getMessage());
<mask> promise.reject(e);
<mask> }
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString());
</s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString());
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi8_0_0/host/exp/exponent/modules/api/FileSystemModule.java
|
keep keep add keep keep keep keep keep keep
|
<mask>
<mask> import host.exp.exponent.ActivityResultListener;
<mask> import host.exp.exponent.experience.BaseExperienceActivity;
<mask> import host.exp.exponentview.Exponent;
<mask>
<mask> public class ImagePickerModule extends ReactContextBaseJavaModule implements ActivityResultListener {
<mask> static final int REQUEST_LAUNCH_CAMERA = 1;
<mask> static final int REQUEST_LAUNCH_IMAGE_LIBRARY = 2;
<mask>
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi8_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> if (imageFile == null) {
<mask> promise.reject(new IOException("Could not create temporary image file."));
<mask> return;
<mask> }
<mask> cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile));
<mask> mCameraCaptureURI = Uri.fromFile(imageFile);
<mask> mPromise = promise;
<mask> Exponent.getInstance().getCurrentActivity().startActivityForResult(cameraIntent, REQUEST_LAUNCH_CAMERA);
<mask> }
<mask>
<mask> // NOTE: Currently not reentrant / doesn't support concurrent requests
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi8_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> String path = writeImage(bmp);
<mask>
<mask> WritableMap response = Arguments.createMap();
<mask> response.putString("uri", Uri.fromFile(new File(path)).toString());
<mask> response.putInt("width", bmp.getWidth());
<mask> response.putInt("height", bmp.getHeight());
<mask> response.putBoolean("cancelled", false);
<mask> promise.resolve(response);
<mask> }
</s> Fixing imagepicker crash on android 7
fbshipit-source-id: 40baba9
|
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
|
android/app/src/main/java/abi8_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.