🔧 Inline sources and drop declaration maps

The JS source maps now embed their sources (inlineSources), so a debugger
resolves into src/ even though the package ships only dist/. declarationMap
is dropped: a .d.ts.map cannot embed source and would dangle against the
unshipped src/.

Also removes a duplicate backlog entry for the same task and closes the
sourcemap item.
This commit is contained in:
tmu committed 2026-09-11 19:50:50 +00:00
1 parent e96c3f89ac
commit e7a058d608
3 files changed
+5 -7

No files matched your search

+3 -5
View File
@@ -27,13 +27,14 @@ Setup:
☐ Fix the declaration emit (`.d.ts` post-step) or stop using relative `.ts` in the declaration surface
☐ Reconcile the README/CONTRIBUTING claim that `rewriteRelativeImportExtensions` yields "conventional ESM imports"
☐ Add a consumer-resolution test to the suite (durable guard; `attw` currently misses it)
☐ Resolve sourcemap sources for consumers
✔ Resolve sourcemap sources for consumers @done
- `dist/*.map` `sources` are `../src/*.ts`, but `src` is not in `files`, so debuggers get missing sources
- HANDOVER (setup-phase review, unfixed — emit work deferred out of that session):
- verified: every `dist/*.map` (js and d.ts) has `sources: ["../src/<file>.ts"]`, and `package.json#files` ships only `dist`, `CHANGELOG.md`, `README.md`, `LICENSE` — so those paths point at files the consumer never receives
- decide between shipping `src` in `files` (keeps go-to-definition working, slightly larger tarball) or dropping `sourceMap`/`declarationMap` from `tsconfig.build.json` (smaller, no broken references). Shipping `src` is usually the better library DX
- overlaps the `.d.ts` item above: both are emit-surface changes, so doing them in one branch/commit avoids rebuilding that config twice
☐ Ship `src`, or disable `sourceMap`/`declarationMap` for the published artifact
- resolution: `inlineSources: true` embeds `sourcesContent` in `dist/*.js.map`, so debuggers resolve the original TS even though `files` ships only `dist`; `declarationMap` is dropped because a `.d.ts.map` cannot embed source and would dangle against unshipped `src`
✔ Resolved by `inlineSources` + dropping `declarationMap` (not by shipping `src`, nor by disabling both maps) @done
✔ Document pi-lsp false-positive diagnostics @done
- `lsp_diagnostics` reported TS1295/TS1287 "CommonJS file under `verbatimModuleSyntax`" errors that `check:tsc` never produced
- root cause: an earlier local test emptied package.json; the still-running TS7 server (5 min idle timeout) kept the corrupted project state alive and reported it against the real files
@@ -56,9 +57,6 @@ Setup:
✔ Silence the knip `@runwisp/pubv` false positive @done
- `pubv` is a CLI invoked by `release.sh`, not imported, so knip flags it as an unused devDependency and advisory output stays permanently red
✔ Add a knip `ignoreDependencies` entry @done
☐ Resolve sourcemap sources for consumers
- `dist/*.map` `sources` are `../src/*.ts`, but `src` is not in `files`, so debuggers get missing sources
☐ Ship `src`, or disable `sourceMap`/`declarationMap` for the published artifact
✔ Sweep doc/formatter drift before v1.0 @done
✔ README says `--experimental-strip-types`; scripts use `--strip-types` @done