@yahoo/uds-create-sidecar 5.115.0 → 5.115.2

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.
Files changed (2) hide show
  1. package/README.md +42 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,8 +16,11 @@ Customer app ── exact modules + versions ──┘
16
16
  └──> real app dependencies
17
17
  ```
18
18
 
19
- The standalone app in `apps/create-sidecar` consumes this same package and is
20
- the reference implementation.
19
+ Embed this package in your team's development app and share that app through
20
+ your existing signing and distribution process. You do not need to build or
21
+ install the standalone UDS app. The app in `apps/create-sidecar` consumes this
22
+ same package as a reference implementation and test host; its fixed native
23
+ dependencies cannot cover every consumer app.
21
24
 
22
25
  ## Requirements
23
26
 
@@ -117,7 +120,8 @@ advertises the registry, and Create and the phone run the same comparison:
117
120
 
118
121
  - A required package or import path that is not registered is missing.
119
122
  - A registered version whose major or minor differs from the required version
120
- is a mismatch. Patch versions may differ.
123
+ is a mismatch. Patch versions may differ, except for `react-native-worklets`,
124
+ whose host runtime must match the preview compiler's exact version.
121
125
 
122
126
  While the phone is connected, Create's phone controls name the packages the
123
127
  host cannot provide. The phone repeats the check before evaluating a bundle and
@@ -136,16 +140,15 @@ For Expo Router, guard the package load as well as the rendered route:
136
140
  ```tsx
137
141
  // app/create-preview.tsx
138
142
  import { Redirect } from "expo-router";
139
- import { createSidecarRegistry } from "../src/create-sidecar-registry";
140
143
 
141
- declare const require: (
142
- id: "@yahoo/uds-create-sidecar",
143
- ) => typeof import("@yahoo/uds-create-sidecar");
144
+ declare function require(id: "@yahoo/uds-create-sidecar"): typeof import("@yahoo/uds-create-sidecar");
145
+ declare function require(id: "../src/create-sidecar-registry"): typeof import("../src/create-sidecar-registry");
144
146
 
145
147
  export default function CreatePreviewRoute() {
146
148
  if (!__DEV__) return <Redirect href="/" />;
147
149
 
148
150
  const { UDSCreateSidecar } = require("@yahoo/uds-create-sidecar");
151
+ const { createSidecarRegistry } = require("../src/create-sidecar-registry");
149
152
  return <UDSCreateSidecar registry={createSidecarRegistry} />;
150
153
  }
151
154
  ```
@@ -154,7 +157,11 @@ Use the equivalent compile-time development constant and production fallback
154
157
  with another router. Do not gate only a navigation link: the route itself must
155
158
  return before loading or rendering Sidecar. The package test compiles this
156
159
  pattern with `__DEV__` set to false and verifies that the Sidecar reference is
157
- removed from the route's execution path.
160
+ removed from the route's execution path, together with the registry and its
161
+ preview-only module imports. Keep your existing app-level providers, such as
162
+ `SafeAreaProvider` and `GestureHandlerRootView`, above this route. Load the
163
+ app's fonts and provide any theme or other contexts its previewed components
164
+ need just as you would on an ordinary screen.
158
165
 
159
166
  The two entry points are split for this gate. `@yahoo/uds-create-sidecar/registry`
160
167
  holds only the registry builder, imports nothing, and is safe to import at
@@ -205,13 +212,39 @@ return (
205
212
 
206
213
  Create's QR code uses the `uds-create-sidecar` scheme. An embedded app must
207
214
  route that scheme to its development-only preview screen to use QR pairing.
208
- Apps that do not own that route should use the short pairing code.
215
+ Prefer the short pairing code for an embedded app. It requires no new URL
216
+ scheme or native configuration. A custom app URL scheme can also carry the
217
+ pairing fields if the app routes them to the component.
209
218
 
210
219
  In Create, open **Connect phone**, choose **Connect Sidecar**, and enter the
211
220
  code from the app. The embedded host advertises the registry's exact package
212
221
  versions through the existing preview protocol; no protocol or token changes
213
222
  are required.
214
223
 
224
+ ## Build and share the development app
225
+
226
+ Build with your app's normal Expo development-build process and share the
227
+ result with designers and other teammates. Everyone using the same native
228
+ dependencies and configuration can install the same team build; each person
229
+ does not need to compile it. Keep the preview route behind the build's
230
+ compile-time development flag. A normal production build returns the fallback
231
+ and cannot pair, even when someone opens the route directly.
232
+
233
+ Rebuild and redistribute the development app when adding or upgrading native
234
+ modules, changing native configuration or permissions, or changing Expo/React
235
+ Native versions. Installing this package for the first time may also require a
236
+ build if its peer dependencies are not already compiled into the app.
237
+
238
+ Create selections, design edits and compatible pushed component bundles use
239
+ the existing app. They do not require a new native build. A newly registered
240
+ JavaScript module still needs to be included in the host's Metro bundle; an
241
+ installed package is not automatically exposed to downloaded previews.
242
+
243
+ The consumer checks in [`tests/native-expo`](../../tests/native-expo/README.md)
244
+ install the packed library into separate Expo SDK 57 and 58 apps. Their preview
245
+ registry includes `expo-constants`, which the standalone UDS app does not
246
+ expose, so the checks exercise the consumer's own dependency boundary.
247
+
215
248
  ## Security boundary
216
249
 
217
250
  The host downloads a bundle only from the selected Create origin, sends the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yahoo/uds-create-sidecar",
3
- "version": "5.115.0",
3
+ "version": "5.115.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "publishConfig": {