chore: declare sideEffects: false across all 11 packages — closes queue #70#88
Open
Goosterhof wants to merge 2 commits into
Open
chore: declare sideEffects: false across all 11 packages — closes queue #70#88Goosterhof wants to merge 2 commits into
Goosterhof wants to merge 2 commits into
Conversation
…loses queue #70) 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) <noreply@anthropic.com>
…onventions 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) <noreply@anthropic.com>
Deploying fs-packages with
|
| Latest commit: |
43edb06
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b665a159.fs-packages.pages.dev |
| Branch Preview URL: | https://armorer-queue-70-sideeffects.fs-packages.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes war-room enforcement queue #70 by adding
"sideEffects": falseto each of the 11packages/*/package.jsonfiles. Restores gate 6 (lint:pkg) to GREEN onmainand every subsequent PR.The Red Gate
publint 0.3.21 (introduced via #82, merged 2026-05-11) added a new Suggestion:
The queue #31 wrapper at
scripts/lint-pkg.mjscorrectly elevates publint Suggestions to fatal — its entire purpose is to harden against silent advisory drift (queue #31 seed: the PR #35git+regression that drifted silently across 10 packages because the unenforced wrapper only printed the suggestion). The wrapper is doing its job; the manifests needed to match the new publint Suggestion.Net effect since 2026-05-11: every fs-packages PR inherited a red gate-6 regardless of scope. PR #86 and PR #87 both flagged the red as "pre-existing, not introduced here."
Per-Package Side-Effect Audit
All 11 packages audited: read
src/index.ts+ every re-exported file. Checked forconsole.*, global mutation, CSS imports, IIFE side effects, polyfill installation, prototype patches, top-levelObject.defineProperty, bare side-effect-only imports. All 11 audit-cleared — zero top-level side effects. The factory + barrel doctrine ensures every package'ssrc/index.tsis either a pure re-export or a file whose top-level statements are imports, type declarations, andconst/functionfactory declarations only.sideEffects: falseGate-6 Evidence
Before:
After:
Each package now reports
All good!from publint and 🟢 across the attwnode10/node16 (from CJS)/node16 (from ESM)/bundlermatrix.Local CI: All 8 Gates Green
npm auditnpm run format:checktypeper its canonical shape)npm run lintnpm run buildnpm run typechecknpm run lint:pkgnpm run test:coveragenpm run test:mutationLockfile sanity:
npm installproduced no drift (pure metadata change, no dependency-graph shift).Coordination With PR #87
#87 (
streamRequestremoval, fs-http 0.4.0) is currently open at the time of this PR opening and modifies 4 of the 11 manifests:packages/http/package.json(version 0.3.0 → 0.4.0)packages/loading/package.json(peer-range widen + patch bump)packages/adapter-store/package.json(peer-range widen + patch bump)packages/cached-adapter-store/package.json(peer-range widen + patch bump)The two PRs target
mainindependently. The file-level edits are disjoint within each shared manifest: #87 edits"version"and"peerDependencies"; this PR adds a new"sideEffects"key alongside"type". Whichever PR merges second will need a trivial rebase — the"sideEffects": falsekey addition does not conflict semantically with a"version"bump, and git's three-way merge handles it cleanly. If an auto-merge surfaces a textual conflict, resolution is mechanical (both edits land; key ordering is the only question).What This Doesn't Touch
packages/*/src/is unchanged.sideEffectsdeclaration.Doctrine Update
A new bullet "No top-level side effects" added under
CLAUDE.md## Conventions, alongside the existing factory / barrel / peer / loose-coupling / no-direct-axios family. Locks the convention so a future package author doesn't ship without the flag and re-fire gate 6.Commit Shape
Two atomic commits — reviewers should diff the first commit (mechanical manifest sweep) and the second commit (doctrine bullet) separately:
chore: declare sideEffects: false across all 11 published packages (closes queue #70)— 11 files, +11 linesdocs(fs-packages): codify no-top-level-side-effects convention in § Conventions— 1 file, +1 line🤖 Generated with Claude Code