expo-modules-macros 0.22.0 → 0.23.1

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/build/types.d.ts CHANGED
@@ -61,6 +61,15 @@ export type TypeNode = {
61
61
  name: string;
62
62
  refKind?: 'record' | 'sharedObject' | 'enum' | 'union';
63
63
  }
64
+ /**
65
+ * `SharedRef<T>`: a shared object that JS sees as an instance of `expo.SharedRef`. `native` is the
66
+ * `T` it holds on the native side. It never reaches JS, so refs in it are not resolved.
67
+ */
68
+ | {
69
+ kind: 'sharedRef';
70
+ typeof: JSType;
71
+ native: TypeNode;
72
+ }
64
73
  /** A type the scanner couldn't interpret; `text` is its source spelling. */
65
74
  | {
66
75
  kind: 'unknown';
@@ -241,11 +250,26 @@ export interface ExportedSharedObject extends ExportedAccess, ExportedAvailabili
241
250
  * which every JS object inherits.
242
251
  */
243
252
  initializer?: ExportedInitializer;
253
+ /** What the class inherits from `SharedRef<T>`, or absent when its superclass isn't `SharedRef`. */
254
+ sharedRef?: ExportedSharedRef;
244
255
  functions: ExportedFunction[];
245
256
  properties: ExportedProperty[];
246
257
  events: ExportedEvent[];
247
258
  file: string;
248
259
  }
260
+ /**
261
+ * The `SharedRef<T>` superclass of a shared object. Only the superclass written on the class is read,
262
+ * so a class that inherits `SharedRef` through another subclass has none.
263
+ */
264
+ export interface ExportedSharedRef {
265
+ /** The `T` in `SharedRef<T>`: the native type the object holds, which JS never sees. */
266
+ native: TypeNode;
267
+ /**
268
+ * The `nativeRefType` JS reads to tell refs apart, for example `image`. `unknown` (core's default)
269
+ * when the class doesn't override it, and absent when the override isn't a plain string literal.
270
+ */
271
+ nativeRefType?: string;
272
+ }
249
273
  /** A `@Record` type and its properties. */
250
274
  export interface ExportedRecord extends ExportedAccess, ExportedAvailability {
251
275
  /** The Swift type name, qualified with the types it is nested in (`Outer.Options`). */
@@ -365,4 +389,4 @@ export interface ScanExportsResult {
365
389
  * as a clear error instead of silently misread fields.
366
390
  */
367
391
  export declare const SUPPORTED_SCAN_MODULES_SCHEMA_VERSION = 2;
368
- export declare const SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 8;
392
+ export declare const SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 9;
package/build/types.js CHANGED
@@ -12,4 +12,4 @@ exports.SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = exports.SUPPORTED_SCAN_MODULES_S
12
12
  * as a clear error instead of silently misread fields.
13
13
  */
14
14
  exports.SUPPORTED_SCAN_MODULES_SCHEMA_VERSION = 2;
15
- exports.SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 8;
15
+ exports.SUPPORTED_SCAN_EXPORTS_SCHEMA_VERSION = 9;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-macros",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "description": "Swift macro plugin for Expo modules",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -11,6 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/expo/expo-modules-macros.git"
13
13
  },
14
+ "packageManager": "pnpm@12.14.0",
14
15
  "scripts": {
15
16
  "build": "node scripts/build.js",
16
17
  "build:ts": "tsc -p tsconfig.json",
@@ -25,9 +26,9 @@
25
26
  "typescript": "^5.4.0"
26
27
  },
27
28
  "optionalDependencies": {
28
- "@expo/modules-macros-linux-arm64": "0.22.0",
29
- "@expo/modules-macros-linux-x64": "0.22.0",
30
- "@expo/modules-macros-win32-arm64": "0.22.0",
31
- "@expo/modules-macros-win32-x64": "0.22.0"
29
+ "@expo/modules-macros-linux-arm64": "0.23.1",
30
+ "@expo/modules-macros-linux-x64": "0.23.1",
31
+ "@expo/modules-macros-win32-arm64": "0.23.1",
32
+ "@expo/modules-macros-win32-x64": "0.23.1"
32
33
  }
33
34
  }