@bowmark/web 1.12.1 → 1.12.3

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 CHANGED
@@ -18,9 +18,13 @@ lmstudio://add_mcp?name=bowmark&config=eyJ1cmwiOiJodHRwczovL2FwaS5ib3dtYXJrLmFpL
18
18
  > `bowmark-web` and `bowmark-web-stubs` on PyPI at the same version. The plan that built it
19
19
  > is deleted; the reasoning is in the four
20
20
  > [`docs/decisions/2026-08-06-*`](../../../docs/decisions/) records and the enforceable half
21
- > is [`.claude/rules/public-types.md`](../../../.claude/rules/public-types.md).
22
- > **What would make this doc wrong:** a build step appearing, the declarations moving out
23
- > into a second package, or a runtime dependency landing in `package.json`.
21
+ > is [`.claude/rules/public-types.md`](../../../.claude/rules/public-types.md). Since
22
+ > 2026-09-01 the TARBALL ships compiled `dist/`, not raw `src/` see
23
+ > [`docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md`](../../../docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md).
24
+ > **What would make THIS doc wrong:** the declarations moving out into a second package,
25
+ > a runtime dependency landing in `package.json`, or a build step reappearing where a
26
+ > CONSUMER or this MONOREPO has to run it — the one that ships is at publish time only,
27
+ > in the public mirror's own CI, and neither of those two ever sees it.
24
28
 
25
29
  ```sh
26
30
  npm i @bowmark/web
@@ -226,6 +230,35 @@ refuses one, with no exception set — an exception would be a declaration that
226
230
  parameter is uncallable. Found once, on `pizzahut.priceOrder`, by generating validators
227
231
  for all 253 typed parameters.
228
232
 
233
+ ## What ships is compiled, not `src/` verbatim
234
+
235
+ `main`/`types` point at `dist/index.{js,d.ts}`. `dist/` is never committed — it does not
236
+ exist in this workspace and does not exist in the public mirror's git history either — it
237
+ is produced once, in the mirror's own `publish.yml`, by `npm run build`
238
+ (`scripts/build.mjs`, `tsconfig.build.json`), immediately before `npm publish`. Nobody
239
+ runs it but that one CI job:
240
+
241
+ - **This workspace never does.** `pnpm typecheck` is `tsc -p tsconfig.json --noEmit` —
242
+ reads `src/` directly, emits nothing, unaffected.
243
+ - **A consumer never does.** `npm i @bowmark/web` installs the already-compiled `dist/`;
244
+ there is still no build step on their side, which is the property this package has
245
+ always promised.
246
+
247
+ Why compiled at all: Node refuses to strip types out of a `.ts` file found inside
248
+ `node_modules`, so shipping `main: src/index.ts` made plain `node app.mjs` fail with
249
+ `ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING` for every consumer who was not already on
250
+ `tsx`, Bun, or a bundler.
251
+ [`docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md`](../../../docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md).
252
+
253
+ **One thing `tsc`'s declaration emit does not do on its own, and `build.mjs` does by
254
+ hand:** `src/generated/library.d.ts` is ambient (no imports, no exports — see below) and
255
+ `index.ts` reaches it only with `/// <reference path="./generated/library.d.ts" />`. tsc
256
+ consumes that directive for this package's own compile but does not carry it into the
257
+ emitted `dist/index.d.ts`. Left alone, a downstream `tsc` never loads `library.d.ts` at
258
+ all and `BowmarkLibrary` — the type this package exists to ship — reads as `Cannot find
259
+ name`. `build.mjs` re-inserts the reference line and copies `library.d.ts` into
260
+ `dist/generated/` verbatim (it has nothing to compile).
261
+
229
262
  ## Regenerating
230
263
 
231
264
  ```bash