chore(deps): remove runtime dependencies nothing imports, and unblock Dependabot's safe updates - #7
Merged
Merged
Conversation
`@workspacejson/rules` declared `dedent`, `ignore`, `unified` and `zod` in `dependencies`. None is imported anywhere in the package. `zod` and `unified` appear only as string literals in the framework-detection tables — the parser looks for the word "zod" in a manifest, it never loads the library. These were `dependencies`, not `devDependencies`, so every consumer of @workspacejson/rules installed all four to support code that does not exist. Removing them changes no behavior: 36 + 173 tests pass unchanged, and the schema hash is untouched at 7f1635bb. The cost was not only install weight. Dependabot opened major-version upgrade PRs for `ignore` (5 -> 7) and `zod` (3 -> 4), both of which passed CI cleanly — because nothing exercises them. A green check on an unused dependency is not evidence of anything. `@workspacejson/spec` drops the unused `json-schema-to-typescript` devDependency and `scripts/generate-types.js`, which read the schema file and discarded the result. `src/types.ts` is hand-written and committed; nothing was ever generated from it. The build script is now plain `tsc`. Adds an `unused-dependency` guard to scripts/check-architecture.mjs with a red test and a matching acceptance test, so a dependency that is declared but never imported fails the build rather than waiting to be noticed. devDependencies are deliberately not checked — build tools and type packages are legitimately invoked by config rather than by an import.
The first run of the dev-tooling group bundled a harmless `@types/node` patch
(22.19.17 -> 22.20.1) with `typescript` ^5.4 -> ^7.0 and `vitest` ^1.6 -> ^4.1.
The group failed on `error TS5102: Option 'baseUrl' has been removed`, so one
safe update was held hostage by two ecosystem migrations.
The group is now restricted to minor and patch. Majors arrive as individual
PRs that can be scheduled as the real work they are.
Also ignores majors for two dependencies where a bump is a migration:
* typescript — TypeScript 7 removes compiler options this tsconfig still
sets, and it emits the declarations @workspacejson/rules typechecks
against and consumers install.
* vitest — @workspacejson/rules re-exports vitest helpers through its
published ./testing entry point, so a vitest major is a public-surface
change for consumers writing rule tests, not an internal bump.
This was referenced Jul 26, 2026
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.
Replaces Dependabot PRs #4, #5 and #6, and fixes the config flaw that produced the failing #3.
The finding
Cross-checking every declared dependency of
@workspacejson/rulesagainst every import in its source:zodandunifiedappear only as string literals in the framework-detection tables (agents-md-parser.ts:75,framework-drift.ts:21) — the parser looks for the word "zod" in a manifest, it never loads the library.ignoreanddedenthave no references of any kind.These were
dependencies, notdevDependencies, so every consumer installed all four to support code that does not exist.@workspacejson/spechad the same problem in dev scope:json-schema-to-typescriptexisted forscripts/generate-types.js, which was a no-op —src/types.tsis hand-written and committed. Nothing was ever generated. Build script is now plaintsc.Why the Dependabot PRs were misleading
#4 (ignore 5→7)and#5 (zod 3→4)both passed CI on Node 20 and 22. They passed because nothing exercises those packages. A green check on an unused dependency is not evidence of anything — which is exactly the "no false green" failure mode worth guarding against.What prevents recurrence
A new
unused-dependencyguard inscripts/check-architecture.mjs, with a red test and a matching acceptance test proving it does not simply flag everything:devDependenciesare deliberately not checked — build tools, type packages and test runners are legitimately invoked by config rather than by an import statement, so absence of an import proves nothing there.Dependabot config fix (second commit)
#3failed onerror TS5102: Option 'baseUrl' has been removed. The dev-tooling group had bundled a harmless@types/nodepatch withtypescript ^5.4 → ^7.0andvitest ^1.6 → ^4.1— one safe update held hostage by two ecosystem migrations.minorandpatch; majors arrive individually.typescriptandvitestmajors are ignored. Both are migrations rather than updates: TypeScript emits the declarations consumers install, and@workspacejson/rulesre-exports vitest helpers through its published./testingentry point, making a vitest major a public-surface change for anyone writing rule tests.Verification
Lockfile shrinks by ~15KB.
Follow-ups, not in this PR
tsconfig.base.json:6setsbaseUrl, which does nothing undermoduleResolution: NodeNextwith nopaths— and is fatal under TypeScript 7. Deleting it is a one-liner that unblocks that upgrade whenever it is scheduled.