expo-constants 13.2.2 → 13.2.3

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
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 13.2.3 — 2022-07-25
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Deprecated the unreliable `source-login-scripts.sh` and sourcing the Node.js binary path from `.xcode.env` and `.xcode.env.local`. ([#18330](https://github.com/expo/expo/pull/18330) by [@kudo](https://github.com/kudo))
18
+
13
19
  ## 13.2.2 — 2022-07-16
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '13.2.2'
6
+ version = '13.2.3'
7
7
 
8
8
  apply from: "../scripts/get-app-config-android.gradle"
9
9
 
@@ -76,7 +76,7 @@ android {
76
76
  minSdkVersion safeExtGet("minSdkVersion", 21)
77
77
  targetSdkVersion safeExtGet("targetSdkVersion", 31)
78
78
  versionCode 33
79
- versionName "13.2.2"
79
+ versionName "13.2.3"
80
80
  }
81
81
  lintOptions {
82
82
  abortOnError false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-constants",
3
- "version": "13.2.2",
3
+ "version": "13.2.3",
4
4
  "description": "Provides system information that remains constant throughout the lifetime of your app.",
5
5
  "main": "build/Constants.js",
6
6
  "types": "build/Constants.d.ts",
@@ -43,5 +43,5 @@
43
43
  "peerDependencies": {
44
44
  "expo": "*"
45
45
  },
46
- "gitHead": "c6678c65b68e45062d49a2deea8e822f69388278"
46
+ "gitHead": "066000e04629874e1c67f2b3b9a38af805d9831c"
47
47
  }
@@ -4,23 +4,7 @@ set -eo pipefail
4
4
 
5
5
  DEST="$CONFIGURATION_BUILD_DIR"
6
6
  RESOURCE_BUNDLE_NAME="EXConstants.bundle"
7
- # ref: https://github.com/facebook/react-native/blob/c974cbff04a8d90ac0f856dbada3fc5a75c75b49/scripts/react-native-xcode.sh#L59-L65
8
- # Path to expo-constants folder inside node_modules
9
- EXPO_CONSTANTS_PACKAGE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
-
11
- # Suppress environment errors from sourcing the login scripts
12
- set +e
13
- source "$EXPO_CONSTANTS_PACKAGE_DIR/scripts/source-login-scripts.sh"
14
- set -e
15
-
16
- NODE_BINARY=${NODE_BINARY:-node}
17
-
18
- if ! [ -x "$(command -v "$NODE_BINARY")" ]; then
19
- echo 'Error: cannot find the node binary. Try setting the NODE_BINARY variable in the ' \
20
- '"Bundle React Native code and images" Build Phase to the absolute path to your node binary. ' \
21
- 'You can find it by executing "which node" in a terminal window.' >&2
22
- exit 1
23
- fi
7
+ EXPO_CONSTANTS_PACKAGE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
24
8
 
25
9
  # For classic main project build phases integration, will be no-op to prevent duplicated app.config creation.
26
10
  #
@@ -38,4 +22,4 @@ PROJECT_ROOT=${PROJECT_ROOT:-"$EXPO_CONSTANTS_PACKAGE_DIR/../.."}
38
22
 
39
23
  cd "$PROJECT_ROOT" || exit
40
24
 
41
- "$NODE_BINARY" "${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/getAppConfig.js" "$PROJECT_ROOT" "$DEST/$RESOURCE_BUNDLE_NAME"
25
+ "${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/with-node.sh" "${EXPO_CONSTANTS_PACKAGE_DIR}/scripts/getAppConfig.js" "$PROJECT_ROOT" "$DEST/$RESOURCE_BUNDLE_NAME"
@@ -0,0 +1,44 @@
1
+ #!/bin/bash
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ # Copyright 2018-present 650 Industries. All rights reserved.
4
+ #
5
+ # @generated by expo-module-scripts
6
+ #
7
+ # USAGE:
8
+ # ./with-node.sh command
9
+
10
+ CURR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
11
+
12
+ # Start with a default
13
+ NODE_BINARY=$(command -v node)
14
+ export NODE_BINARY
15
+
16
+ # Override the default with the global environment
17
+ ENV_PATH="$PODS_ROOT/../.xcode.env"
18
+ if [[ -f "$ENV_PATH" ]]; then
19
+ source "$ENV_PATH"
20
+ fi
21
+
22
+ # Override the global with the local environment
23
+ LOCAL_ENV_PATH="${ENV_PATH}.local"
24
+ if [[ -f "$LOCAL_ENV_PATH" ]]; then
25
+ source "$LOCAL_ENV_PATH"
26
+ fi
27
+
28
+ if [[ -n "$NODE_BINARY" && -x "$NODE_BINARY" ]]; then
29
+ echo "Node found at: ${NODE_BINARY}"
30
+ else
31
+ cat >&2 << EOF
32
+ [ERROR] Could not find "node" while running an Xcode build script. You need to specify the path to your Node.js executable by defining an environment variable named NODE_BINARY in your project's .xcode.env or .xcode.env.local file. You can set this up quickly by running:
33
+
34
+ echo "export NODE_BINARY=\$(command -v node)" >> .xcode.env
35
+
36
+ in the ios folder of your project.
37
+ EOF
38
+ exit 1
39
+ fi
40
+
41
+ # Execute argument, if present
42
+ if [[ "$#" -gt 0 ]]; then
43
+ "$NODE_BINARY" $@
44
+ fi
@@ -1,52 +0,0 @@
1
- # shellcheck shell=bash disable=SC1090,SC1091
2
-
3
- # @generated by expo-module-scripts
4
-
5
- # Source login scripts to simulate running in an interactive login shell to
6
- # configure environment variables as if the user had opened a shell. This
7
- # script is intended for Xcode build phase scripts on macOS and does not have
8
- # a shebang so it inherits the current shell.
9
-
10
- current_shell=$(ps -cp "$$" -o comm='' | sed 's/^-//')
11
-
12
- # attempt to source via nvm
13
- if [ -f "$HOME/.nvm/nvm.sh" ]; then
14
- . "$HOME/.nvm/nvm.sh"
15
- fi
16
-
17
- if [[ "$current_shell" == zsh ]]; then
18
- # Zsh's setup script order is:
19
- # /etc/zshenv
20
- # ~/.zshenv
21
- # /etc/zprofile
22
- # ~/.zprofile
23
- # /etc/zshrc
24
- # ~/.zshrc
25
- # /etc/zlogin
26
- # ~/.zlogin
27
- # http://zsh.sourceforge.net/Guide/zshguide02.html
28
-
29
- if [ -f /etc/zshenv ]; then . /etc/zshenv; fi
30
- if [ -f ~/.zshenv ]; then . ~/.zshenv; fi
31
- if [ -f /etc/zprofile ]; then . /etc/zprofile; fi
32
- if [ -f ~/.zprofile ]; then . ~/.zprofile; fi
33
- if [ -f /etc/zshrc ]; then . /etc/zshrc; fi
34
- if [ -f ~/.zshrc ]; then . ~/.zshrc; fi
35
- if [ -f /etc/zlogin ]; then . /etc/zlogin; fi
36
- if [ -f ~/.zlogin ]; then . ~/.zlogin; fi
37
- else
38
- # Bash's setup script order is:
39
- # /etc/profile (if it exists)
40
- # The first of: ~/.bash_profile, ~/.bash_login, and ~/.profile
41
- # https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
42
-
43
- if [ -f /etc/profile ]; then . /etc/profile; fi
44
-
45
- if [ -f ~/.bash_profile ]; then
46
- . ~/.bash_profile
47
- elif [ -f ~/.bash_login ]; then
48
- . ~/.bash_login
49
- elif [ -f ~/.profile ]; then
50
- . ~/.profile
51
- fi
52
- fi