expo-modules-core 3.0.6 → 3.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.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 3.0.7 — 2025-08-26
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [Android] Fix ErrorManager not receiving error/warning events on the JS side. ([#39126](https://github.com/expo/expo/pull/39126) by [@behenate](https://github.com/behenate))
18
+
13
19
  ## 3.0.6 — 2025-08-25
14
20
 
15
21
  ### 🎉 New features
@@ -66,6 +72,7 @@ _This version does not introduce any user-facing changes._
66
72
 
67
73
  ### 💡 Others
68
74
 
75
+ - Add package exports support. ([#37302](https://github.com/expo/expo/pull/37302) by [@EvanBacon](https://github.com/EvanBacon))
69
76
  - [iOS] Cleaned up iOS header files for precompilation ([#38441](https://github.com/expo/expo/pull/38441) by [@chrfalch](https://github.com/chrfalch))
70
77
  - [Android] RN 0.81.0: patched some reflection issues after kotlin upgrade ([#38451](https://github.com/expo/expo/pull/38451) by [@chrfalch](https://github.com/chrfalch))
71
78
  - Restructure Jest polyfills to not import forbidden platform extension directly. ([#37588](https://github.com/expo/expo/pull/37588) by [@EvanBacon](https://github.com/EvanBacon))
@@ -25,7 +25,7 @@ if (shouldIncludeCompose) {
25
25
  }
26
26
 
27
27
  group = 'host.exp.exponent'
28
- version = '3.0.6'
28
+ version = '3.0.7'
29
29
 
30
30
  def isExpoModulesCoreTests = {
31
31
  Gradle gradle = getGradle()
@@ -75,7 +75,7 @@ android {
75
75
  defaultConfig {
76
76
  consumerProguardFiles 'proguard-rules.pro'
77
77
  versionCode 1
78
- versionName "3.0.6"
78
+ versionName "3.0.7"
79
79
  buildConfigField "String", "EXPO_MODULES_CORE_VERSION", "\"${versionName}\""
80
80
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
81
81
 
@@ -1,3 +1,3 @@
1
- declare const _default: import("..").ProxyNativeModule;
1
+ declare const _default: any;
2
2
  export default _default;
3
3
  //# sourceMappingURL=NativeErrorManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativeErrorManager.d.ts","sourceRoot":"","sources":["../../src/sweet/NativeErrorManager.ts"],"names":[],"mappings":";AACA,wBAA8D"}
1
+ {"version":3,"file":"NativeErrorManager.d.ts","sourceRoot":"","sources":["../../src/sweet/NativeErrorManager.ts"],"names":[],"mappings":";AAEA,wBAA0E"}
@@ -1,2 +1,4 @@
1
- export { default } from './uuid';
1
+ import { UUID } from './uuid.types';
2
+ declare const uuid: UUID;
3
+ export default uuid;
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/uuid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/uuid/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAgCrD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AACF,eAAe,IAAI,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { UUID } from './uuid.types';
2
2
  declare const uuid: UUID;
3
3
  export default uuid;
4
- //# sourceMappingURL=uuid.d.ts.map
4
+ //# sourceMappingURL=index.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../src/uuid/index.web.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAsBrD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "The core of Expo Modules architecture",
5
5
  "main": "src/index.ts",
6
6
  "types": "build/index.d.ts",
@@ -8,6 +8,22 @@
8
8
  "*.fx.ts",
9
9
  "./src/polyfill/*.ts"
10
10
  ],
11
+ "exports": {
12
+ "./package.json": "./package.json",
13
+ ".": {
14
+ "types": "./build/index.d.ts",
15
+ "default": "./src/index.ts"
16
+ },
17
+ "./types": "./types.d.ts",
18
+ "./src/polyfill/dangerous-internal": {
19
+ "types": "./build/polyfill/dangerous-internal.d.ts",
20
+ "default": "./src/polyfill/dangerous-internal.ts"
21
+ },
22
+ "./src/uuid": {
23
+ "types": "./build/uuid/index.d.ts",
24
+ "default": "./src/uuid/index.ts"
25
+ }
26
+ },
11
27
  "scripts": {
12
28
  "build": "expo-module build",
13
29
  "clean": "expo-module clean",
@@ -47,7 +63,7 @@
47
63
  },
48
64
  "devDependencies": {
49
65
  "@testing-library/react-native": "^13.2.0",
50
- "expo-module-scripts": "^5.0.3"
66
+ "expo-module-scripts": "^5.0.4"
51
67
  },
52
- "gitHead": "ef0b9ecf9645d3e93587d5ee5030dbfcbf735bbd"
68
+ "gitHead": "d44e41c9c0714a838b1652556d27bcb506fabbdf"
53
69
  }
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter, NativeModule, SharedObject, SharedRef } from './CoreModule';
2
- import uuid from '../uuid/uuid.web';
2
+ import uuid from '../uuid/index.web';
3
3
 
4
4
  // jest-expo imports to this file directly without going through the global types
5
5
  // Exporting the types to let jest-expo to know the globalThis types
@@ -1,2 +1,3 @@
1
- import NativeModulesProxy from '../NativeModulesProxy';
2
- export default NativeModulesProxy.ExpoModulesCoreErrorManager;
1
+ import { requireOptionalNativeModule } from '../requireNativeModule';
2
+
3
+ export default requireOptionalNativeModule('ExpoModulesCoreErrorManager');
package/src/uuid/index.ts CHANGED
@@ -1 +1,39 @@
1
- export { default } from './uuid';
1
+ import bytesToUuid from './lib/bytesToUuid';
2
+ import { UUID, Uuidv5Namespace } from './uuid.types';
3
+
4
+ function uuidv4(): string {
5
+ const nativeUuidv4 = globalThis?.expo?.uuidv4;
6
+
7
+ if (!nativeUuidv4) {
8
+ throw Error(
9
+ "Native UUID version 4 generator implementation wasn't found in `expo-modules-core`"
10
+ );
11
+ }
12
+
13
+ return nativeUuidv4();
14
+ }
15
+
16
+ function uuidv5(name: string, namespace: string | number[]) {
17
+ const parsedNamespace =
18
+ Array.isArray(namespace) && namespace.length === 16 ? bytesToUuid(namespace) : namespace;
19
+
20
+ // If parsed namespace is still an array it means that it wasn't valid
21
+ if (Array.isArray(parsedNamespace)) {
22
+ throw new Error('`namespace` must be a valid UUID string or an Array of 16 byte values');
23
+ }
24
+
25
+ const nativeUuidv5 = globalThis?.expo?.uuidv5;
26
+
27
+ if (!nativeUuidv5) {
28
+ throw Error("Native UUID type 5 generator implementation wasn't found in `expo-modules-core`");
29
+ }
30
+
31
+ return nativeUuidv5(name, parsedNamespace);
32
+ }
33
+
34
+ const uuid: UUID = {
35
+ v4: uuidv4,
36
+ v5: uuidv5,
37
+ namespace: Uuidv5Namespace,
38
+ };
39
+ export default uuid;
@@ -1 +0,0 @@
1
- {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/uuid/uuid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAgCrD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AACF,eAAe,IAAI,CAAC"}
@@ -1,4 +0,0 @@
1
- import { UUID } from './uuid.types';
2
- declare const uuid: UUID;
3
- export default uuid;
4
- //# sourceMappingURL=uuid.web.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uuid.web.d.ts","sourceRoot":"","sources":["../../src/uuid/uuid.web.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAsBrD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/src/uuid/uuid.ts DELETED
@@ -1,39 +0,0 @@
1
- import bytesToUuid from './lib/bytesToUuid';
2
- import { UUID, Uuidv5Namespace } from './uuid.types';
3
-
4
- function uuidv4(): string {
5
- const nativeUuidv4 = globalThis?.expo?.uuidv4;
6
-
7
- if (!nativeUuidv4) {
8
- throw Error(
9
- "Native UUID version 4 generator implementation wasn't found in `expo-modules-core`"
10
- );
11
- }
12
-
13
- return nativeUuidv4();
14
- }
15
-
16
- function uuidv5(name: string, namespace: string | number[]) {
17
- const parsedNamespace =
18
- Array.isArray(namespace) && namespace.length === 16 ? bytesToUuid(namespace) : namespace;
19
-
20
- // If parsed namespace is still an array it means that it wasn't valid
21
- if (Array.isArray(parsedNamespace)) {
22
- throw new Error('`namespace` must be a valid UUID string or an Array of 16 byte values');
23
- }
24
-
25
- const nativeUuidv5 = globalThis?.expo?.uuidv5;
26
-
27
- if (!nativeUuidv5) {
28
- throw Error("Native UUID type 5 generator implementation wasn't found in `expo-modules-core`");
29
- }
30
-
31
- return nativeUuidv5(name, parsedNamespace);
32
- }
33
-
34
- const uuid: UUID = {
35
- v4: uuidv4,
36
- v5: uuidv5,
37
- namespace: Uuidv5Namespace,
38
- };
39
- export default uuid;
File without changes