expo-updates 0.28.7 → 0.28.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/android/build.gradle +2 -2
- package/e2e/fixtures/custom_init/AppDelegate.swift +30 -18
- package/e2e/setup/create-bricking-measures-disabled-eas-project.ts +2 -3
- package/e2e/setup/create-dev-client-eas-project.ts +2 -4
- package/e2e/setup/create-disabled-eas-project.ts +2 -2
- package/e2e/setup/create-eas-project-custom-init.ts +7 -3
- package/e2e/setup/create-eas-project-tv.ts +1 -6
- package/e2e/setup/create-eas-project.ts +1 -6
- package/e2e/setup/create-error-recovery-eas-project.ts +2 -3
- package/e2e/setup/create-fingerprint-eas-project.ts +2 -3
- package/e2e/setup/create-startup-eas-project.ts +2 -3
- package/e2e/setup/create-updates-test.ts +2 -4
- package/e2e/setup/project.ts +10 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -39,7 +39,7 @@ expoModule {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
group = 'host.exp.exponent'
|
|
42
|
-
version = '0.28.
|
|
42
|
+
version = '0.28.8'
|
|
43
43
|
|
|
44
44
|
// Utility method to derive boolean values from the environment or from Java properties,
|
|
45
45
|
// and return them as strings to be used in BuildConfig fields
|
|
@@ -85,7 +85,7 @@ android {
|
|
|
85
85
|
namespace "expo.modules.updates"
|
|
86
86
|
defaultConfig {
|
|
87
87
|
versionCode 31
|
|
88
|
-
versionName '0.28.
|
|
88
|
+
versionName '0.28.8'
|
|
89
89
|
consumerProguardFiles("proguard-rules.pro")
|
|
90
90
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
91
91
|
|
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
import Expo
|
|
2
2
|
import EXUpdates
|
|
3
3
|
import React
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
@UIApplicationMain
|
|
7
|
-
class AppDelegate: ExpoAppDelegate {
|
|
8
|
-
var launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
9
|
-
// AppDelegate keeps a nullable reference to the updates controller
|
|
10
|
-
var updatesController: (any InternalAppControllerInterface)?
|
|
4
|
+
import ReactAppDependencyProvider
|
|
11
5
|
|
|
6
|
+
class CustomReactNativeFactoryDelegate: ExpoReactNativeFactoryDelegate {
|
|
7
|
+
// Extension point for config-plugins
|
|
12
8
|
let packagerUrl = URL(string: "http://localhost:8081/index.bundle?platform=ios&dev=true")
|
|
13
9
|
let bundledUrl = Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
return delegate
|
|
11
|
+
override func sourceURL(for bridge: RCTBridge) -> URL? {
|
|
12
|
+
// needed to return the correct URL for expo-dev-client.
|
|
13
|
+
bridge.bundleURL ?? bundleURL()
|
|
20
14
|
}
|
|
21
15
|
|
|
22
16
|
override func bundleURL() -> URL? {
|
|
23
17
|
if AppDelegate.isRunningWithPackager() {
|
|
24
18
|
return packagerUrl
|
|
25
19
|
}
|
|
26
|
-
if let updatesUrl = updatesController?.launchAssetUrl() {
|
|
20
|
+
if let updatesUrl = AppDelegate.shared().updatesController?.launchAssetUrl() {
|
|
27
21
|
return updatesUrl
|
|
28
22
|
}
|
|
29
23
|
return bundledUrl
|
|
30
24
|
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@UIApplicationMain
|
|
28
|
+
class AppDelegate: ExpoAppDelegate {
|
|
29
|
+
var launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
30
|
+
// AppDelegate keeps a nullable reference to the updates controller
|
|
31
|
+
var updatesController: (any InternalAppControllerInterface)?
|
|
32
|
+
|
|
33
|
+
static func shared() -> AppDelegate {
|
|
34
|
+
guard let delegate = UIApplication.shared.delegate as? AppDelegate else {
|
|
35
|
+
fatalError("Could not get app delegate")
|
|
36
|
+
}
|
|
37
|
+
return delegate
|
|
38
|
+
}
|
|
31
39
|
|
|
32
40
|
// If this is a debug build, and native debugging not enabled,
|
|
33
41
|
// then this returns true.
|
|
@@ -38,9 +46,13 @@ class AppDelegate: ExpoAppDelegate {
|
|
|
38
46
|
// Required initialization of react-native and expo-updates
|
|
39
47
|
private func initializeReactNativeAndUpdates(_ launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
|
|
40
48
|
self.launchOptions = launchOptions
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
let delegate = CustomReactNativeFactoryDelegate()
|
|
50
|
+
let factory = ExpoReactNativeFactory(delegate: delegate)
|
|
51
|
+
delegate.dependencyProvider = RCTAppDependencyProvider()
|
|
52
|
+
|
|
53
|
+
reactNativeFactoryDelegate = delegate
|
|
54
|
+
reactNativeFactory = factory
|
|
55
|
+
|
|
44
56
|
// AppController instance must always be created first.
|
|
45
57
|
// expo-updates creates a different type of controller
|
|
46
58
|
// depending on whether updates is enabled, and whether
|
|
@@ -123,8 +135,8 @@ public class CustomViewController: UIViewController, AppControllerDelegate {
|
|
|
123
135
|
fatalError("rootViewFactory has not been initialized")
|
|
124
136
|
}
|
|
125
137
|
let rootView = rootViewFactory.view(
|
|
126
|
-
withModuleName:
|
|
127
|
-
initialProperties:
|
|
138
|
+
withModuleName: "main",
|
|
139
|
+
initialProperties: [:],
|
|
128
140
|
launchOptions: appDelegate.launchOptions
|
|
129
141
|
)
|
|
130
142
|
let controller = self
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
5
|
import {
|
|
7
6
|
initAsync,
|
|
7
|
+
repoRoot,
|
|
8
8
|
setupUpdatesBrickingMeasuresDisabledE2EAppAsync,
|
|
9
9
|
transformAppJsonForE2EWithBrickingMeasuresDisabled,
|
|
10
10
|
} from './project';
|
|
11
11
|
|
|
12
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT, 'EXPO_REPO_ROOT is not defined');
|
|
13
12
|
const workingDir = path.resolve(repoRoot, '..');
|
|
14
13
|
const runtimeVersion = '1.0.0';
|
|
15
14
|
|
|
@@ -25,7 +24,7 @@ const runtimeVersion = '1.0.0';
|
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
26
|
(async function () {
|
|
28
|
-
if (!
|
|
27
|
+
if (!repoRoot || !process.env.UPDATES_HOST || !process.env.UPDATES_PORT) {
|
|
29
28
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
30
29
|
}
|
|
31
30
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
|
-
import { initAsync, setupUpdatesDevClientE2EAppAsync } from './project';
|
|
5
|
+
import { initAsync, repoRoot, setupUpdatesDevClientE2EAppAsync } from './project';
|
|
7
6
|
|
|
8
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT, 'EXPO_REPO_ROOT is not defined');
|
|
9
7
|
const workingDir = path.resolve(repoRoot, '..');
|
|
10
8
|
const runtimeVersion = '1.0.0';
|
|
11
9
|
|
|
@@ -21,7 +19,7 @@ const runtimeVersion = '1.0.0';
|
|
|
21
19
|
*/
|
|
22
20
|
|
|
23
21
|
(async function () {
|
|
24
|
-
if (!
|
|
22
|
+
if (!repoRoot || !process.env.UPDATES_HOST || !process.env.UPDATES_PORT) {
|
|
25
23
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
26
24
|
}
|
|
27
25
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
|
@@ -5,11 +5,11 @@ import path from 'path';
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
initAsync,
|
|
8
|
+
repoRoot,
|
|
8
9
|
setupUpdatesDisabledE2EAppAsync,
|
|
9
10
|
transformAppJsonForUpdatesDisabledE2E,
|
|
10
11
|
} from './project';
|
|
11
12
|
|
|
12
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT, 'EXPO_REPO_ROOT is not defined');
|
|
13
13
|
const workingDir = path.resolve(repoRoot, '..');
|
|
14
14
|
const runtimeVersion = '1.0.0';
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ const runtimeVersion = '1.0.0';
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
(async function () {
|
|
28
|
-
if (!
|
|
28
|
+
if (!repoRoot || !process.env.UPDATES_HOST || !process.env.UPDATES_PORT) {
|
|
29
29
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
30
30
|
}
|
|
31
31
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
import nullthrows from 'nullthrows';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
initAsync,
|
|
8
|
+
repoRoot,
|
|
9
|
+
setupE2EAppAsync,
|
|
10
|
+
transformAppJsonForE2EWithCustomInit,
|
|
11
|
+
} from './project';
|
|
7
12
|
|
|
8
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT, 'EXPO_REPO_ROOT is not defined');
|
|
9
13
|
const workingDir = path.resolve(repoRoot, '..');
|
|
10
14
|
const runtimeVersion = '1.0.0';
|
|
11
15
|
|
|
@@ -24,7 +28,7 @@ const runtimeVersion = '1.0.0';
|
|
|
24
28
|
*/
|
|
25
29
|
|
|
26
30
|
(async function () {
|
|
27
|
-
if (!
|
|
31
|
+
if (!repoRoot || !process.env.UPDATES_HOST || !process.env.UPDATES_PORT) {
|
|
28
32
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
29
33
|
}
|
|
30
34
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
|
-
import { initAsync, setupE2EAppAsync } from './project';
|
|
5
|
+
import { initAsync, setupE2EAppAsync, repoRoot } from './project';
|
|
7
6
|
|
|
8
|
-
const repoRoot = nullthrows(
|
|
9
|
-
process.env.EXPO_REPO_ROOT || process.env.EAS_BUILD_WORKINGDIR,
|
|
10
|
-
'EXPO_REPO_ROOT is not defined'
|
|
11
|
-
);
|
|
12
7
|
const workingDir = path.resolve(repoRoot, '..');
|
|
13
8
|
const runtimeVersion = '1.0.0';
|
|
14
9
|
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
|
-
import { initAsync, setupE2EAppAsync } from './project';
|
|
5
|
+
import { initAsync, repoRoot, setupE2EAppAsync } from './project';
|
|
7
6
|
|
|
8
|
-
const repoRoot = nullthrows(
|
|
9
|
-
process.env.EXPO_REPO_ROOT || process.env.EAS_BUILD_WORKINGDIR,
|
|
10
|
-
'EXPO_REPO_ROOT is not defined'
|
|
11
|
-
);
|
|
12
7
|
const workingDir = path.resolve(repoRoot, '..');
|
|
13
8
|
const runtimeVersion = '1.0.0';
|
|
14
9
|
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
5
|
import {
|
|
7
6
|
initAsync,
|
|
7
|
+
repoRoot,
|
|
8
8
|
setupUpdatesErrorRecoveryE2EAppAsync,
|
|
9
9
|
transformAppJsonForE2EWithFallbackToCacheTimeout,
|
|
10
10
|
} from './project';
|
|
11
11
|
|
|
12
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT);
|
|
13
12
|
const workingDir = path.resolve(repoRoot, '..');
|
|
14
13
|
const runtimeVersion = '1.0.0';
|
|
15
14
|
|
|
@@ -25,7 +24,7 @@ const runtimeVersion = '1.0.0';
|
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
26
|
(async function () {
|
|
28
|
-
if (!
|
|
27
|
+
if (!repoRoot || !process.env.UPDATES_HOST || !process.env.UPDATES_PORT) {
|
|
29
28
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
30
29
|
}
|
|
31
30
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
5
|
import {
|
|
7
6
|
initAsync,
|
|
7
|
+
repoRoot,
|
|
8
8
|
setupUpdatesFingerprintE2EAppAsync,
|
|
9
9
|
transformAppJsonForE2EWithFingerprint,
|
|
10
10
|
} from './project';
|
|
11
11
|
|
|
12
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT);
|
|
13
12
|
const workingDir = path.resolve(repoRoot, '..');
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -24,7 +23,7 @@ const workingDir = path.resolve(repoRoot, '..');
|
|
|
24
23
|
*/
|
|
25
24
|
|
|
26
25
|
(async function () {
|
|
27
|
-
if (!
|
|
26
|
+
if (!repoRoot || !process.env.UPDATES_HOST || !process.env.UPDATES_PORT) {
|
|
28
27
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
29
28
|
}
|
|
30
29
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
5
|
import {
|
|
7
6
|
initAsync,
|
|
7
|
+
repoRoot,
|
|
8
8
|
setupUpdatesStartupE2EAppAsync,
|
|
9
9
|
transformAppJsonForE2EWithFallbackToCacheTimeout,
|
|
10
10
|
} from './project';
|
|
11
11
|
|
|
12
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT, 'EXPO_REPO_ROOT is not defined');
|
|
13
12
|
const workingDir = path.resolve(repoRoot, '..');
|
|
14
13
|
const runtimeVersion = '1.0.0';
|
|
15
14
|
|
|
@@ -25,7 +24,7 @@ const runtimeVersion = '1.0.0';
|
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
26
|
(async function () {
|
|
28
|
-
if (!
|
|
27
|
+
if (!repoRoot || !process.env.UPDATES_HOST || !process.env.UPDATES_PORT) {
|
|
29
28
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
30
29
|
}
|
|
31
30
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env yarn --silent ts-node --transpile-only
|
|
2
2
|
|
|
3
|
-
import nullthrows from 'nullthrows';
|
|
4
3
|
import path from 'path';
|
|
5
4
|
|
|
6
|
-
import { initAsync, setupManualTestAppAsync, EXPO_ACCOUNT_NAME } from './project';
|
|
5
|
+
import { initAsync, repoRoot, setupManualTestAppAsync, EXPO_ACCOUNT_NAME } from './project';
|
|
7
6
|
|
|
8
|
-
const repoRoot = nullthrows(process.env.EXPO_REPO_ROOT, 'EXPO_REPO_ROOT is not defined');
|
|
9
7
|
const workingDir = path.resolve(repoRoot, '..');
|
|
10
8
|
|
|
11
9
|
/**
|
|
@@ -40,7 +38,7 @@ function transformAppJson(appJson: any, projectName: string, runtimeVersion: str
|
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
(async function () {
|
|
43
|
-
if (!
|
|
41
|
+
if (!repoRoot) {
|
|
44
42
|
throw new Error('Missing one or more environment variables; see instructions in e2e/README.md');
|
|
45
43
|
}
|
|
46
44
|
const projectRoot = process.env.TEST_PROJECT_ROOT || path.join(workingDir, 'updates-e2e');
|
package/e2e/setup/project.ts
CHANGED
|
@@ -11,6 +11,14 @@ import path from 'path';
|
|
|
11
11
|
*/
|
|
12
12
|
export const EXPO_ACCOUNT_NAME = process.env.EXPO_ACCOUNT_NAME || 'myusername';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Repository root directory
|
|
16
|
+
*/
|
|
17
|
+
export const repoRoot = nullthrows(
|
|
18
|
+
process.env.EXPO_REPO_ROOT || process.env.EAS_BUILD_WORKINGDIR,
|
|
19
|
+
'EXPO_REPO_ROOT is not defined'
|
|
20
|
+
);
|
|
21
|
+
|
|
14
22
|
const dirName = __dirname; /* eslint-disable-line */
|
|
15
23
|
|
|
16
24
|
// Package dependencies in chunks based on peer dependencies.
|
|
@@ -78,7 +86,7 @@ function getExpoDependencyNamesForDependencyChunks(expoDependencyChunks: string[
|
|
|
78
86
|
return expoDependencyChunks.flat();
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
const expoResolutions = {};
|
|
89
|
+
const expoResolutions: { [key: string]: string } = {};
|
|
82
90
|
|
|
83
91
|
/**
|
|
84
92
|
* Executes `npm pack` on one of the Expo packages used in updates E2E
|
|
@@ -376,7 +384,7 @@ async function preparePackageJson(
|
|
|
376
384
|
...packageJson,
|
|
377
385
|
dependencies: {
|
|
378
386
|
...packageJson.dependencies,
|
|
379
|
-
'react-native': 'npm:react-native-tvos@0.79.0
|
|
387
|
+
'react-native': 'npm:react-native-tvos@0.79.1-0',
|
|
380
388
|
'@react-native-tvos/config-tv': '^0.1.1',
|
|
381
389
|
},
|
|
382
390
|
expo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.8",
|
|
4
4
|
"description": "Fetches and manages remotely-hosted assets and updates to your app's JS bundle.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@expo/code-signing-certificates": "0.0.5",
|
|
43
43
|
"@expo/config": "~11.0.5",
|
|
44
|
-
"@expo/config-plugins": "~9.1.
|
|
44
|
+
"@expo/config-plugins": "~9.1.7",
|
|
45
45
|
"@expo/spawn-async": "^1.7.2",
|
|
46
46
|
"arg": "4.1.0",
|
|
47
47
|
"chalk": "^4.1.2",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"expo": "*",
|
|
73
73
|
"react": "*"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "a639a661a5329e58f916cf69b8f1a7718bbdd26e"
|
|
76
76
|
}
|