diff --git a/CLAUDE.md b/CLAUDE.md index 57fcfca..e3371dd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -54,6 +54,7 @@ Consumer territories must apply per-call timeouts at instantiation OR rely on th - **Test environment:** Browser-dependent tests use `// @vitest-environment happy-dom` file-level comments. - **Identical build config:** All packages share the same `tsdown.config.ts` structure. - **No direct axios imports in dependent packages.** Route `AxiosResponse` / `AxiosRequestConfig` / sibling types through `fs-http`'s re-exports (e.g. `Parameters[0]` for response types). Direct `import type {AxiosResponse} from 'axios'` breaks rolldown's `d.cts` emission on dual-bundle packages — caught during `fs-cached-adapter-store` scaffold 2026-05-13. +- **No top-level side effects.** Every published package declares `"sideEffects": false` in its `package.json` so bundlers can tree-shake under deep imports. The factory + barrel pattern ensures this is structurally true — every package's `src/index.ts` is either a pure re-export or a file whose top-level statements are imports, type declarations, and `const`/`function` factory declarations. The manifest entry makes it explicit and bundler-actionable. Closes enforcement queue #70 (publint 0.3.21 Suggestion, fatal-promoted by `scripts/lint-pkg.mjs`). ### Internal Dependency Coordination diff --git a/packages/adapter-store/package.json b/packages/adapter-store/package.json index 76664a9..de49165 100644 --- a/packages/adapter-store/package.json +++ b/packages/adapter-store/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/cached-adapter-store/package.json b/packages/cached-adapter-store/package.json index 6e0e260..d3b41c5 100644 --- a/packages/cached-adapter-store/package.json +++ b/packages/cached-adapter-store/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/dialog/package.json b/packages/dialog/package.json index 429b176..488ecc2 100644 --- a/packages/dialog/package.json +++ b/packages/dialog/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/helpers/package.json b/packages/helpers/package.json index 76b4918..152cf67 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/http/package.json b/packages/http/package.json index 09e2cec..75536ce 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/loading/package.json b/packages/loading/package.json index c2ebbfe..3f6637b 100644 --- a/packages/loading/package.json +++ b/packages/loading/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/router/package.json b/packages/router/package.json index dde314f..654e50a 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/storage/package.json b/packages/storage/package.json index 9655be7..9c28c4b 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/theme/package.json b/packages/theme/package.json index a29ae49..6bb7791 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/toast/package.json b/packages/toast/package.json index 922d3b5..a603d2f 100644 --- a/packages/toast/package.json +++ b/packages/toast/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", diff --git a/packages/translation/package.json b/packages/translation/package.json index c84758e..b9e45a4 100644 --- a/packages/translation/package.json +++ b/packages/translation/package.json @@ -13,6 +13,7 @@ "dist" ], "type": "module", + "sideEffects": false, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts",