From 59a37110c0dfeafa175dcc8b096c4f1977754c11 Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 15 May 2026 15:47:43 +0200 Subject: [PATCH 1/2] chore: declare sideEffects: false across all 11 published packages (closes queue #70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit publint 0.3.21 (introduced via PR #82, merged 2026-05-11) added a "sideEffects" Suggestion: "package.json should declare \"sideEffects\": false so bundlers can tree-shake the module under deep import." The queue #31 wrapper at scripts/lint-pkg.mjs correctly elevates publint Suggestions to fatal, so every fs-packages PR has inherited a red gate-6 since 2026-05-11 regardless of scope. This commit closes the red by adding "sideEffects": false to each of the 11 packages/*/package.json files. Per-package audit (read src/index.ts + everything it re-exports) confirms zero top-level side effects across all 11 packages: no console.*, no global mutation, no CSS imports, no IIFE side effects, no polyfill installation, no prototype patches. The factory + barrel doctrine is structurally side-effect-free; this commit makes it explicit and bundler-actionable. No version bumps. No CHANGELOG entries. Pure metadata change — bundlers may treat the manifest more aggressively (more tree-shaking), but the public API surface is unchanged. Coordination with PR #87 (streamRequest removal, also open at dispatch time): PR #87 modifies 4 of 11 manifests (fs-http + the three cascade peers) by editing "version" and "peerDependencies"; this PR adds the new "sideEffects" key. The two PRs target main independently; whichever merges second will need a trivial rebase, mechanical at worst. Gate-6 evidence: before — 11 packages each emit one publint Suggestion that the wrapper elevates to fatal (lint:pkg gate FAILED with 11 entries). After — every package shows publint "All good!" and attw 🟢 across the node10/node16(CJS/ESM)/bundler matrix (lint:pkg gate PASS). Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/adapter-store/package.json | 1 + packages/cached-adapter-store/package.json | 1 + packages/dialog/package.json | 1 + packages/helpers/package.json | 1 + packages/http/package.json | 1 + packages/loading/package.json | 1 + packages/router/package.json | 1 + packages/storage/package.json | 1 + packages/theme/package.json | 1 + packages/toast/package.json | 1 + packages/translation/package.json | 1 + 11 files changed, 11 insertions(+) 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", From 43edb0637c7a7a77c115418766abbf2caa48a13a Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 15 May 2026 15:47:52 +0200 Subject: [PATCH 2/2] =?UTF-8?q?docs(fs-packages):=20codify=20no-top-level-?= =?UTF-8?q?side-effects=20convention=20in=20=C2=A7=20Conventions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a "No top-level side effects" bullet under ## Conventions, alongside the existing Factory pattern / Single entry point / Peer dependencies / Loose coupling / Test environment / Identical build config / No direct axios imports family. Locks in the convention so a future package author doesn't ship without the "sideEffects": false manifest entry and re-fire gate-6 with the publint Suggestion. The factory + barrel pattern is structurally side-effect-free; the manifest entry makes it explicit and bundler-actionable. Closes enforcement queue #70. Co-Authored-By: Claude Opus 4.7 (1M context) --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) 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