Sweep covering several unrelated cohorts:
- Delete dead `NewDeviceDialog.tsx` (commented-out in App.tsx, imports point at
non-existent `@components/PageComponents/Connect/*`).
- Add `better-result` to sdk-react deps so `useChat`/`useDirectChat`/
`useFavoriteNode`/`useIgnoreNode` resolve.
- Fix `test-utils.tsx`: route at `routeTree.gen.ts` was never generated;
re-export the existing `routeTree` constant from `routes.tsx` and pass
the missing router context + DeviceWrapper deviceId.
- Pre-existing `noUncheckedIndexedAccess` violations in `pskSchema.test.ts`,
`x25519.ts`, `Table/index.tsx` + test, `useCopyToClipboard` (Timeout vs
number) — non-null asserts where the index is guaranteed by the
surrounding code, plus a defensive `if (!cell) return 0` in the table sort.
- Immer `WritableDraft<T>` mismatches against SDK's `MeshDevice`/`Device`
classes — cast through `Draft<X>` where the inferred recursive draft type
can't represent SDK class internals.
- `deviceStore.mock` updated for the `connectionPhase`/`connectionId` +
setters added when the connection lifecycle was extracted.
- `HeatmapLayer` accepts the `isVisible` prop everyone else's layer accepts.
- `SNRTooltipProps.to` widened to `string | undefined` (single-node hover
has no `to`).
- Zod resolver returns `Record<string, never>` for the error-path values
shape that react-hook-form expects.
- Mock `NodeInfo` in `useFilterNode.test.ts` gains the `isMuted` proto
field that landed upstream.
- Drop bogus `dts.isolatedDeclarations` field from SDK (not a real tsdown
option; tsdown was silently ignoring it).
- Make every package explicit about the perf-relevant flags rather than
relying on defaults that drift between tsdown versions: target=esnext
(no syntax downleveling), sourcemap=false, minify=false, treeshake=true,
report=false, splitting=false.
- Modest wall-clock wins: SDK 1020→752ms, transports ~720→~600ms.
`isolatedDeclarations: true` in tsconfig would unlock the bigger oxc-dts
fast path but the codebase isn't ID-clean yet — left as future work.
The legacy `@meshtastic/core` package is gone. The six transport-*
packages and the web app no longer depend on it; everything routes
through `@meshtastic/sdk`.
Transport packages (transport-deno, transport-http, transport-node,
transport-node-serial, transport-web-bluetooth, transport-web-serial):
- package.json deps swap `@meshtastic/core: workspace:*` for
`@meshtastic/sdk: workspace:*`.
- src/transport.ts + src/transport.test.ts imports point at
`@meshtastic/sdk` (the `Types` and `Utils` namespaces are still
exported from the SDK so source code is otherwise unchanged).
- README.md examples updated to import from `@meshtastic/sdk`.
apps/web:
- Drops the leftover `@meshtastic/core` workspace dep; nothing in
apps/web/src imports from it.
@meshtastic/sdk:
- README description loses the "Replaces @meshtastic/core" suffix —
there's nothing left to replace.
- Three legacy shim files keep their re-exports but their docstrings
drop the "Phase-A shim, removed in Phase C" framing. The MeshDevice
facade survives because the web app's `connection.factoryResetDevice()`
/ `connection.reboot()` / etc. callsites still go through it; new
consumers should reach into `client.config` / `client.chat` / etc.
- New scripts/rename-dts.mjs is a postbuild step that renames tsdown's
hashed entry-point dts outputs (`mod-<hash>.d.ts` etc.) back to their
canonical names so package.json `types` and downstream dts-bundlers
can find them. Internal chunk dts files (e.g. `Transport-<hash>.d.ts`)
are intentionally NOT renamed because mod.d.ts imports them by path.
- build:npm runs tsdown then the rename script.
Version bumps (signal: now require @meshtastic/sdk):
- @meshtastic/sdk 0.1.0 -> 1.0.0
- @meshtastic/sdk-react 0.1.0 -> 1.0.0
- @meshtastic/sdk-storage-sqlocal 0.1.0 -> 1.0.0
- @meshtastic/transport-http 0.2.5 -> 1.0.0
- @meshtastic/transport-web-serial 0.2.5 -> 1.0.0
- @meshtastic/transport-web-bluetooth 0.1.5 -> 1.0.0
- @meshtastic/transport-deno 0.1.1 -> 1.0.0
- @meshtastic/transport-node 0.0.2 -> 1.0.0
- @meshtastic/transport-node-serial 0.0.2 -> 1.0.0
Workflows: nothing referenced packages/core directly (only the
release-packages.yml glob which already collapsed in the apps/web
move). README packages table loses the legacy `packages/core` row.
Verified: web build clean, all four package suites green
(web 236, sdk 65, sdk-react 8, storage 30).
The transport packages' dist build is currently blocked by a tsdown
cross-chunk dts resolution glitch where the `Types` namespace import
can't follow `mod.d.ts`'s reference to the internal `Transport-<hash>`
chunk. Runtime is fine — only the published-types path is affected,
and transport packages publish via their own release flow. Logged as
follow-up.