Skip to content

v0.4.1 — stop shipping MSW mocks in tarball

Latest

Choose a tag to compare

@popov-do popov-do released this 26 Apr 20:09
· 7 commits to main since this release
cc6cf10

Patch release. Strips MSW-related artifacts that were leaking into the published npm tarball since at least 0.2.0.

Removed from the published tarball

  • dist/mocks/{browser,data,handlers,search,server}.d.ts
  • dist/mockServiceWorker.js (~9 kB)

Why it was happening

  1. vite-plugin-dts walked all of src/ without an exclude for src/mocks/**, so it emitted .d.ts shells for the demo-only MSW handlers. Those shells reference types from msw (a devDependency), which would type-error in any consumer that touched them.
  2. Vite's default publicDir copies the root public/ into the build output. The lib build has no public assets to ship — publicDir: false opts out.

A defensive postbuild rm step also removes those paths in case either upstream regresses.

Verification

npm pack --dry-run — files 84 → 73, no mock* paths remain. grid.js / grid.umd.cjs runtime output is unchanged (mocks were never imported from src/index.ts, so the bundle was already free of them — only the .d.ts and worker file shipped as dead weight).

No API changes.