expo-constants 58.0.8 → 58.0.10
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
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 58.0.10
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Patch Changes
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Updated dependencies. ([#51076](https://github.com/expo/expo/pull/51076), [#51080](https://github.com/expo/expo/pull/51080), [#51089](https://github.com/expo/expo/pull/51089))
|
|
8
|
+
- @expo/require-utils@58.0.3
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## 58.0.9
|
|
10
11
|
|
|
11
|
-
###
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Force-bump all packages, due to migration to changesets. ([#50762](https://github.com/expo/expo/pull/50762) by [@kitten](https://github.com/kitten))
|
|
15
|
+
- [iOS] Load app config and `.env` files in the build's mode: development for configurations containing `Debug`, production otherwise. ([#49511](https://github.com/expo/expo/pull/49511) by [@ramonclaudio](https://github.com/ramonclaudio))
|
|
16
|
+
- [Android] Load app config and `.env` files in each build variant's mode: development for `debug` and `debugOptimized` build types, production otherwise. ([#50661](https://github.com/expo/expo/pull/50661) by [@ramonclaudio](https://github.com/ramonclaudio))
|
|
17
|
+
- Updated dependencies. ([#50762](https://github.com/expo/expo/pull/50762))
|
|
18
|
+
- @expo/env@2.5.1
|
|
19
|
+
- @expo/require-utils@58.0.2
|
|
12
20
|
|
|
13
21
|
## 58.0.8 — 2026-09-28
|
|
14
22
|
|
package/android/build.gradle
CHANGED
|
@@ -6,7 +6,7 @@ plugins {
|
|
|
6
6
|
apply from: "../scripts/get-app-config-android.gradle"
|
|
7
7
|
|
|
8
8
|
group = 'host.exp.exponent'
|
|
9
|
-
version = '58.0.
|
|
9
|
+
version = '58.0.10'
|
|
10
10
|
|
|
11
11
|
expoModule {
|
|
12
12
|
// We can't prebuild the module because we need to apply `get-app-config-android.gradle` script.
|
|
@@ -17,6 +17,13 @@ android {
|
|
|
17
17
|
namespace "expo.modules.constants"
|
|
18
18
|
defaultConfig {
|
|
19
19
|
versionCode 33
|
|
20
|
-
versionName "58.0.
|
|
20
|
+
versionName "58.0.10"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
buildTypes {
|
|
24
|
+
create("debugOptimized") {
|
|
25
|
+
initWith(buildTypes.debug)
|
|
26
|
+
matchingFallbacks += ["release"]
|
|
27
|
+
}
|
|
21
28
|
}
|
|
22
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-constants",
|
|
3
|
-
"version": "58.0.
|
|
3
|
+
"version": "58.0.10",
|
|
4
4
|
"description": "Provides system information that remains constant throughout the lifetime of your app.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"constants",
|
|
@@ -47,20 +47,19 @@
|
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@expo/env": "~2.5.
|
|
51
|
-
"@expo/require-utils": "^58.0.
|
|
50
|
+
"@expo/env": "~2.5.1",
|
|
51
|
+
"@expo/require-utils": "^58.0.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^22.14.0",
|
|
55
|
-
"expo-manifests": "58.0.
|
|
56
|
-
"expo-module-scripts": "56.0.
|
|
57
|
-
"expo-updates": "58.0.
|
|
55
|
+
"expo-manifests": "58.0.1",
|
|
56
|
+
"expo-module-scripts": "56.0.7",
|
|
57
|
+
"expo-updates": "58.0.15"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"expo": "*",
|
|
61
61
|
"react-native": "*"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "74f6d2b90bc50bd8df7b160d6e6b2204b37a8ce7",
|
|
64
63
|
"scripts": {
|
|
65
64
|
"build": "expo-build src",
|
|
66
65
|
"clean": "expo-module clean",
|
|
@@ -15,43 +15,45 @@ afterEvaluate {
|
|
|
15
15
|
def expoGradleExtension = gradle.extensions.findByName("expoGradle")
|
|
16
16
|
def customProjectRoot = expoGradleExtension?.projectRoot
|
|
17
17
|
def projectRoot = file("${customProjectRoot ?: rootProject.projectDir}")
|
|
18
|
-
def assetsDir = file("$buildDir/generated/assets/expo-constants")
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
project.android.libraryVariants.all { variant ->
|
|
20
|
+
def assetsDir = file("$buildDir/generated/assets/expo-constants/${variant.name}")
|
|
21
|
+
def configMode = variant.buildType.name == "debug" || variant.buildType.name == "debugOptimized" ? "development" : "production"
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
assetsDir.mkdirs()
|
|
26
|
-
}
|
|
23
|
+
def createConfigTask = tasks.register("create${variant.name.capitalize()}ExpoConfig", Exec) {
|
|
24
|
+
description = 'expo-constants: Create app.config.'
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
doFirst {
|
|
27
|
+
assetsDir.deleteDir()
|
|
28
|
+
assetsDir.mkdirs()
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
// Mark the task as always out-of-date so it always runs - ie. regenerate app.config on every build
|
|
32
|
+
outputs.upToDateWhen { false }
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
// Set up outputs so gradle can cache the result
|
|
35
|
+
outputs.dir assetsDir
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
// Switch to project root and generate the app config
|
|
38
|
+
workingDir projectRoot
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
// The `false` argument turns the fingerprint embed off here: the task below owns it.
|
|
41
|
+
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
42
|
+
commandLine("cmd", "/c", *nodeExecutableAndArgs, "$expoConstantsDir/scripts/getAppConfig.js", projectRoot, assetsDir, "android", "false", configMode)
|
|
43
|
+
} else {
|
|
44
|
+
commandLine(*nodeExecutableAndArgs, "$expoConstantsDir/scripts/getAppConfig.js", projectRoot, assetsDir, "android", "false", configMode)
|
|
45
|
+
}
|
|
45
46
|
}
|
|
46
|
-
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
// Generate app.config at preBuild
|
|
49
|
+
variant.preBuildProvider.configure { it.dependsOn(createConfigTask) }
|
|
50
|
+
|
|
51
|
+
// Add generated assetsDir into assets.srcDirs
|
|
52
|
+
project.android.sourceSets.maybeCreate(variant.name).assets.srcDirs += assetsDir
|
|
53
|
+
}
|
|
50
54
|
|
|
51
55
|
def fingerprintAssetsDir = file("$buildDir/generated/assets/expo-constants-fingerprint")
|
|
52
56
|
|
|
53
|
-
// A second task because `createExpoConfig` publishes to `sourceSets.main` off the single
|
|
54
|
-
// `preBuild`, so its output reaches release too. The fingerprint must not.
|
|
55
57
|
def createFingerprintTask = tasks.register('createExpoFingerprint', Exec) {
|
|
56
58
|
description = 'expo-constants: Embed the project fingerprint (app.fingerprint) in debug builds.'
|
|
57
59
|
|
|
@@ -48,5 +48,6 @@ fi
|
|
|
48
48
|
# Debug builds only, by the same configuration test expo-updates uses. The `|| echo` keeps a
|
|
49
49
|
# release build from tripping `set -e`.
|
|
50
50
|
EMBED_FINGERPRINT=$([[ "$CONFIGURATION" == *Debug* ]] && echo true || echo false)
|
|
51
|
+
CONFIG_MODE=$([[ "$CONFIGURATION" == *Debug* ]] && echo development || echo production)
|
|
51
52
|
|
|
52
|
-
"${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/with-node.sh" "${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/getAppConfig.js" "$PROJECT_ROOT" "$RESOURCE_DEST" "ios" "$EMBED_FINGERPRINT"
|
|
53
|
+
"${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/with-node.sh" "${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/getAppConfig.js" "$PROJECT_ROOT" "$RESOURCE_DEST" "ios" "$EMBED_FINGERPRINT" "$CONFIG_MODE"
|
package/scripts/getAppConfig.js
CHANGED
|
@@ -14,11 +14,14 @@ const destinationDir = process.argv[3] ?? cwd;
|
|
|
14
14
|
const platform = process.argv[4];
|
|
15
15
|
// The native build scripts pass 'true' for debug builds only.
|
|
16
16
|
const embedFingerprint = process.argv[5] === 'true';
|
|
17
|
+
const mode = process.argv[6];
|
|
17
18
|
|
|
18
19
|
(async () => {
|
|
19
20
|
const projectRoot = resolveProjectRoot(possibleProjectRoot);
|
|
20
21
|
|
|
21
|
-
require('@expo/env')
|
|
22
|
+
const expoEnv = require('@expo/env');
|
|
23
|
+
process.env = expoEnv.getOriginalEnv();
|
|
24
|
+
expoEnv.logLoadedEnv(expoEnv.loadProjectEnv(projectRoot, { mode }));
|
|
22
25
|
process.chdir(projectRoot);
|
|
23
26
|
|
|
24
27
|
const { exp } = getConfig(projectRoot, {
|