@reliantlabs/forge-web-runtime 0.10.1 → 0.10.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.
- package/README.md +12 -0
- package/package.json +12 -3
package/README.md
CHANGED
|
@@ -87,6 +87,18 @@ and `npm run typecheck` compiles the package against **both** majors
|
|
|
87
87
|
are peers, resolved from the consuming app. `next` deliberately is **not** — a
|
|
88
88
|
Vite SPA consumes this package identically.
|
|
89
89
|
|
|
90
|
+
Only `@opentelemetry/api` is a **required** peer: the barrel's trace
|
|
91
|
+
propagation and the `/node` entry both build on it. Every other peer is
|
|
92
|
+
**optional** (`peerDependenciesMeta`), because some entry point never imports
|
|
93
|
+
it and npm would otherwise install it into every consumer. `react`,
|
|
94
|
+
`@connectrpc/connect` and `@bufbuild/protobuf` are what the barrel and the
|
|
95
|
+
browser subpaths import, so a browser app declares them as its own
|
|
96
|
+
dependencies — every forge frontend scaffold (Next.js, Vite, Expo) already
|
|
97
|
+
does. A consumer of `/node` alone (an Electron main process, a Node CLI)
|
|
98
|
+
installs `@opentelemetry/api` and nothing else. `src/published-surface.test.ts`
|
|
99
|
+
holds the rule: a peer the `/node` import closure does not reach must be
|
|
100
|
+
optional.
|
|
101
|
+
|
|
90
102
|
Next.js consumers keep `transpilePackages: ["@reliantlabs/forge-web-runtime"]`
|
|
91
103
|
(forge's generated `next.config.ts` sets it). The reason changed with the
|
|
92
104
|
build — it is no longer "these are `.tsx` files" but "these modules carry
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reliantlabs/forge-web-runtime",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "The forge frontend runtime: Connect interceptor stack, session, error boundary, toast queue, <Resource> container, W3C trace propagation and the HyperDX browser SDK wiring (errors, console, network, traces; replay off by default). The web twin of forge/pkg.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"//repository note": "REQUIRED for `npm publish --provenance`, not decoration. npm cross-checks this against the repository in the signed provenance statement and rejects the publish with a 422 if they disagree — an absent field reads as \"\" and fails that comparison. `directory` names the subdirectory this package lives in, so the provenance points at the real source. Omitting this is what made the first 0.3.1 publish fail AFTER the tarball had been signed and written to the sigstore transparency log.",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"pretest": "node scripts/build.mjs",
|
|
73
73
|
"test": "vitest run"
|
|
74
74
|
},
|
|
75
|
-
"// peerDependencies note": "@opentelemetry/api is REQUIRED
|
|
75
|
+
"// peerDependencies note": "@opentelemetry/api is the one REQUIRED peer: trace.ts propagates traceparent on every RPC from the barrel, and the './node' entry builds its spans on it. Every other peer is OPTIONAL because some entry point never imports it, and npm installs a non-optional peer for every consumer whether or not it is reached: react, @connectrpc/connect and @bufbuild/protobuf are imported by the barrel and the browser subpaths, which every forge frontend scaffold (Next.js, Vite, Expo) declares as its own direct dependencies, while a './node'-only consumer (an Electron main process, a Node CLI) imports none of them. @hyperdx/browser is exact-pinned and imported only (and lazily) by the './telemetry' subpath; it carries the whole OpenTelemetry web SDK and the rrweb recorder, so a frontend that never imports './telemetry' (React Native) installs none of it. @tanstack/react-query is imported only by './service-hooks'. src/published-surface.test.ts holds the rule: a peer the './node' import closure does not reach must be optional.",
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@bufbuild/protobuf": "^2.5.0",
|
|
78
78
|
"@connectrpc/connect": "^2.0.0",
|
|
@@ -82,11 +82,20 @@
|
|
|
82
82
|
"react": "^18.3.0 || ^19.0.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
|
-
"@
|
|
85
|
+
"@bufbuild/protobuf": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@connectrpc/connect": {
|
|
86
89
|
"optional": true
|
|
87
90
|
},
|
|
88
91
|
"@hyperdx/browser": {
|
|
89
92
|
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"@tanstack/react-query": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"react": {
|
|
98
|
+
"optional": true
|
|
90
99
|
}
|
|
91
100
|
},
|
|
92
101
|
"devDependencies": {
|