expo 57.0.6 → 57.0.7

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.
@@ -10,7 +10,7 @@ buildscript {
10
10
  }
11
11
 
12
12
  group = 'host.exp.exponent'
13
- version = '57.0.6'
13
+ version = '57.0.7'
14
14
 
15
15
  expoModule {
16
16
  // We can't prebuild the module because it depends on the generated files.
@@ -21,7 +21,7 @@ android {
21
21
  namespace "expo.core"
22
22
  defaultConfig {
23
23
  versionCode 1
24
- versionName "57.0.6"
24
+ versionName "57.0.7"
25
25
  consumerProguardFiles("proguard-rules.pro")
26
26
  }
27
27
  testOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"getBundleUrl.web.d.ts","sourceRoot":"","sources":["../../src/utils/getBundleUrl.web.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,IAAI,MAAM,GAAG,IAAI,CAkB5C"}
1
+ {"version":3,"file":"getBundleUrl.web.d.ts","sourceRoot":"","sources":["../../src/utils/getBundleUrl.web.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,IAAI,MAAM,GAAG,IAAI,CAe5C"}
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "@expo/dom-webview": "~57.0.1",
3
3
  "@expo/fingerprint": "~0.20.5",
4
- "@expo/metro-runtime": "~57.0.5",
4
+ "@expo/metro-runtime": "~57.0.6",
5
5
  "@expo/vector-icons": "^15.0.2",
6
- "@expo/ui": "~57.0.6",
6
+ "@expo/ui": "~57.0.7",
7
7
  "@react-native-async-storage/async-storage": "2.2.0",
8
8
  "@react-native-community/datetimepicker": "9.1.0",
9
9
  "@react-native-masked-view/masked-view": "0.3.2",
@@ -17,28 +17,28 @@
17
17
  "expo-analytics-amplitude": "~11.3.0",
18
18
  "expo-app-auth": "~11.1.0",
19
19
  "expo-app-loader-provider": "~8.0.0",
20
- "expo-app-metrics": "~57.0.4",
20
+ "expo-app-metrics": "~57.0.5",
21
21
  "expo-apple-authentication": "~57.0.1",
22
- "expo-application": "~57.0.1",
23
- "expo-asset": "~57.0.5",
22
+ "expo-application": "~57.0.2",
23
+ "expo-asset": "~57.0.6",
24
24
  "expo-audio": "~57.0.2",
25
- "expo-auth-session": "~57.0.3",
26
- "expo-background-fetch": "~57.0.4",
27
- "expo-background-task": "~57.0.4",
25
+ "expo-auth-session": "~57.0.4",
26
+ "expo-background-fetch": "~57.0.5",
27
+ "expo-background-task": "~57.0.5",
28
28
  "expo-battery": "~57.0.1",
29
29
  "expo-blur": "~57.0.2",
30
30
  "expo-brightness": "~57.0.1",
31
- "expo-brownfield": "~57.0.5",
32
- "expo-build-properties": "~57.0.5",
31
+ "expo-brownfield": "~57.0.6",
32
+ "expo-build-properties": "~57.0.6",
33
33
  "expo-calendar": "~57.0.1",
34
- "expo-camera": "~57.0.2",
34
+ "expo-camera": "~57.0.3",
35
35
  "expo-cellular": "~57.0.1",
36
36
  "expo-checkbox": "~57.0.0",
37
37
  "expo-clipboard": "~57.0.1",
38
- "expo-constants": "~57.0.5",
39
- "expo-contacts": "~57.0.1",
38
+ "expo-constants": "~57.0.6",
39
+ "expo-contacts": "~57.0.2",
40
40
  "expo-crypto": "~57.0.1",
41
- "expo-dev-client": "~57.0.6",
41
+ "expo-dev-client": "~57.0.7",
42
42
  "expo-device": "~57.0.1",
43
43
  "expo-document-picker": "~57.0.1",
44
44
  "expo-eas-client": "~57.0.1",
@@ -50,37 +50,37 @@
50
50
  "expo-haptics": "~57.0.1",
51
51
  "expo-image": "~57.0.1",
52
52
  "expo-image-loader": "~57.0.1",
53
- "expo-image-manipulator": "~57.0.4",
54
- "expo-image-picker": "~57.0.4",
53
+ "expo-image-manipulator": "~57.0.5",
54
+ "expo-image-picker": "~57.0.5",
55
55
  "expo-intent-launcher": "~57.0.1",
56
- "expo-insights": "~57.0.4",
56
+ "expo-insights": "~57.0.5",
57
57
  "expo-keep-awake": "~57.0.1",
58
58
  "expo-linear-gradient": "~57.0.1",
59
59
  "expo-linking": "~57.0.3",
60
60
  "expo-local-authentication": "~57.0.1",
61
61
  "expo-localization": "~57.0.1",
62
- "expo-location": "~57.0.4",
62
+ "expo-location": "~57.0.5",
63
63
  "expo-mail-composer": "~57.0.1",
64
64
  "expo-manifests": "~57.0.1",
65
65
  "expo-maps": "~57.0.1",
66
66
  "expo-mcp": "~0.2.1",
67
- "expo-media-library": "~57.0.2",
67
+ "expo-media-library": "~57.0.3",
68
68
  "expo-mesh-gradient": "~57.0.1",
69
- "expo-module-template": "~57.0.3",
70
- "expo-modules-core": "~57.0.5",
69
+ "expo-module-template": "~57.0.4",
70
+ "expo-modules-core": "~57.0.6",
71
71
  "expo-navigation-bar": "~57.0.2",
72
72
  "expo-network": "~57.0.1",
73
- "expo-notifications": "~57.0.5",
74
- "expo-observe": "~57.0.6",
73
+ "expo-notifications": "~57.0.6",
74
+ "expo-observe": "~57.0.7",
75
75
  "expo-print": "~57.0.1",
76
76
  "expo-live-photo": "~57.0.1",
77
- "expo-router": "~57.0.6",
77
+ "expo-router": "~57.0.7",
78
78
  "expo-screen-capture": "~57.0.1",
79
79
  "expo-screen-orientation": "~57.0.1",
80
80
  "expo-secure-store": "~57.0.1",
81
81
  "expo-sensors": "~57.0.2",
82
82
  "expo-server": "~57.0.1",
83
- "expo-sharing": "~57.0.5",
83
+ "expo-sharing": "~57.0.6",
84
84
  "expo-sms": "~57.0.1",
85
85
  "expo-speech": "~57.0.1",
86
86
  "expo-splash-screen": "~57.0.4",
@@ -89,13 +89,13 @@
89
89
  "expo-store-review": "~57.0.1",
90
90
  "expo-symbols": "~57.0.1",
91
91
  "expo-system-ui": "~57.0.1",
92
- "expo-task-manager": "~57.0.4",
92
+ "expo-task-manager": "~57.0.5",
93
93
  "expo-tracking-transparency": "~57.0.1",
94
- "expo-updates": "~57.0.7",
94
+ "expo-updates": "~57.0.8",
95
95
  "expo-video-thumbnails": "~57.0.1",
96
96
  "expo-video": "~57.0.1",
97
97
  "expo-web-browser": "~57.0.1",
98
- "expo-widgets": "~57.0.5",
98
+ "expo-widgets": "~57.0.6",
99
99
  "jest-expo": "~57.0.2",
100
100
  "lottie-react-native": "~7.3.8",
101
101
  "react": "19.2.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "57.0.6",
3
+ "version": "57.0.7",
4
4
  "description": "The Expo SDK",
5
5
  "main": "src/Expo.ts",
6
6
  "module": "src/Expo.ts",
@@ -68,7 +68,7 @@
68
68
  "homepage": "https://github.com/expo/expo/tree/main/packages/expo",
69
69
  "dependencies": {
70
70
  "@babel/runtime": "^7.20.0",
71
- "@expo/cli": "^57.0.8",
71
+ "@expo/cli": "^57.0.9",
72
72
  "@expo/config": "~57.0.5",
73
73
  "@expo/config-plugins": "~57.0.5",
74
74
  "@expo/devtools": "~57.0.1",
@@ -77,16 +77,16 @@
77
77
  "@expo/local-build-cache-provider": "^57.0.4",
78
78
  "@expo/log-box": "^57.0.1",
79
79
  "@expo/metro": "~56.0.0",
80
- "@expo/metro-config": "~57.0.5",
80
+ "@expo/metro-config": "~57.0.6",
81
81
  "@ungap/structured-clone": "^1.3.0",
82
82
  "babel-preset-expo": "~57.0.3",
83
- "expo-asset": "~57.0.5",
84
- "expo-constants": "~57.0.5",
83
+ "expo-asset": "~57.0.6",
84
+ "expo-constants": "~57.0.6",
85
85
  "expo-file-system": "~57.0.1",
86
86
  "expo-font": "~57.0.1",
87
87
  "expo-keep-awake": "~57.0.1",
88
- "expo-modules-autolinking": "~57.0.7",
89
- "expo-modules-core": "~57.0.5",
88
+ "expo-modules-autolinking": "~57.0.8",
89
+ "expo-modules-core": "~57.0.6",
90
90
  "pretty-format": "^29.7.0",
91
91
  "react-refresh": "^0.14.2",
92
92
  "whatwg-url-minimum": "^0.1.2"
@@ -100,9 +100,9 @@
100
100
  "react-native": "0.86.0",
101
101
  "rimraf": "^6.1.2",
102
102
  "web-streams-polyfill": "^3.3.2",
103
- "@expo/metro-runtime": "57.0.5",
104
- "expo-updates": "57.0.7",
105
- "@expo/dom-webview": "57.0.1"
103
+ "@expo/dom-webview": "57.0.1",
104
+ "expo-updates": "57.0.8",
105
+ "@expo/metro-runtime": "57.0.6"
106
106
  },
107
107
  "peerDependencies": {
108
108
  "@expo/dom-webview": "*",
@@ -139,7 +139,7 @@
139
139
  "scripts/resolveAppEntry.js"
140
140
  ]
141
141
  },
142
- "gitHead": "b9503d06b8e130abfca1bc16f671dbefb41ad709",
142
+ "gitHead": "0dac79c8469fa00b76fb8f402c47ed61f3d6317e",
143
143
  "scripts": {
144
144
  "build": "tsc",
145
145
  "clean": "rimraf build",
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ */
4
+
5
+ function setCurrentScript(src: string | null) {
6
+ Object.defineProperty(document, 'currentScript', {
7
+ configurable: true,
8
+ value: src == null ? null : Object.assign(document.createElement('script'), { src }),
9
+ });
10
+ }
11
+
12
+ // The web test project runs this file in jsdom, the node project on the server.
13
+ // `getBundleUrl` reads `document.currentScript`, so only assert in the browser.
14
+ if (typeof window === 'undefined') {
15
+ it('noop', () => {});
16
+ } else {
17
+ afterEach(() => {
18
+ setCurrentScript(null);
19
+ jest.resetModules();
20
+ });
21
+
22
+ it('returns the bundle URL while the script is executing synchronously', () => {
23
+ setCurrentScript('https://localhost:8081/index.bundle?platform=web');
24
+ const { getBundleUrl } = require('../getBundleUrl');
25
+ expect(getBundleUrl()).toBe('https://localhost:8081/index.bundle');
26
+ });
27
+
28
+ it('still returns the bundle URL after the script finished executing', () => {
29
+ setCurrentScript('https://localhost:8081/index.bundle?platform=web');
30
+ const { getBundleUrl } = require('../getBundleUrl');
31
+ setCurrentScript(null);
32
+ expect(getBundleUrl()).toBe('https://localhost:8081/index.bundle');
33
+ });
34
+ }
@@ -1,21 +1,23 @@
1
1
  // Copyright 2015-present 650 Industries. All rights reserved.
2
2
 
3
+ // `document.currentScript` is only set during synchronous script execution, so we capture its URL
4
+ // at module load; reading it later (effect, async, dynamic import) would see `null`.
5
+ const initialScriptURL: string | null =
6
+ typeof window !== 'undefined' ? (document.currentScript as HTMLScriptElement)?.src : null;
7
+
3
8
  export function getBundleUrl(): string | null {
4
- let scriptURL: string | null | undefined = null;
9
+ let scriptURL: string | null = initialScriptURL;
5
10
 
6
11
  if (typeof window === 'undefined') {
7
12
  // For server runtime, we use the filename of the current script
8
- // @ts-ignore The react-native tsconfig doesn't support CJS
13
+ // @ts-expect-error The react-native tsconfig doesn't support CJS
9
14
  scriptURL = 'file://' + __filename;
10
- } else {
11
- // TODO: Try to support `import.meta.url` when the ecosystem supports ESM,
12
- // and jest doesn't throw SyntaxError when accessing `import.meta`.
13
- scriptURL = (document.currentScript as HTMLScriptElement)?.src;
14
15
  }
15
16
 
16
17
  if (scriptURL == null) {
17
18
  return null;
18
19
  }
20
+
19
21
  const url = new URL(scriptURL);
20
22
  return `${url.protocol}//${url.host}${url.pathname}`;
21
23
  }
package/template.tgz CHANGED
Binary file