Remove unused devDependencies (lint-staged, zlib); fix turbo.json for turbo 2.x#3764
Remove unused devDependencies (lint-staged, zlib); fix turbo.json for turbo 2.x#3764mattgperry wants to merge 1 commit into
Conversation
… turbo 2.x Implements plan 010 (manifest hygiene), with one correction. - Remove lint-staged@8 (no husky/config/hooks) and zlib@1 (its only consumer, dev/inc/bundlesize.mjs, imports the Node builtin which shadows the npm package). Verified: zlib.gzip resolves with the npm package absent; yarn measure is green. - KEEP @types/styled-components. The plan listed it as dead, but its presence in node_modules suppresses a rollup-plugin-dts leak that injects `/// <reference types="react" />` into dist/dom.d.ts. That trips framer-motion's check-bundle guard (the vanilla DOM bundle must be React-free), breaking the build. lint-staged/zlib are non-@types packages and cannot affect .d.ts output, so they stay safe to remove. - Fix turbo.json: rename "pipeline" -> "tasks". main already bumped turbo to 2.x (package.json + lockfile resolve 2.9.14) but left the old key, so `yarn build` was already broken on main. This rename unblocks the gates (outside the plan's original scope; flagged). Gates: yarn install clean; yarn build 8/8; yarn measure exit 0 (pre-existing plan-035 budget overages only); yarn test 7/7, 799 passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Greptile SummaryThis PR removes two genuinely dead devDependencies (
Confidence Score: 5/5Safe to merge — removes only verified-unused packages and fixes a config key that was already causing build failures on main. All changes are narrow and well-verified: the two removed packages have no consumers in the codebase, the turbo.json rename is the single required key change for turbo 2.x and all gates passed, and the decision to retain @types/styled-components is backed by a reproducible build failure. The yarn.lock diff contains no unrelated churn beyond the lint-staged subtree. No files require special attention. The @types/styled-components fragility (implicit dependency for the React-free type build) is already flagged as a follow-up item and does not need to be resolved in this PR. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[yarn build / yarn test] --> B{turbo.json key}
B -->|old pipeline key| C[turbo 2.x rejects config\nbroken on main before PR]
B -->|new tasks key| D[turbo 2.x accepts config\n8 of 8 tasks run]
D --> E[framer-motion build]
E --> F{types/styled-components\nin node_modules?}
F -->|removed| G[rollup-plugin-dts injects\nReact reference\ncheck-bundle fails]
F -->|retained| H[dom.d.ts is React-free\ncheck-bundle passes]
D --> I[yarn measure]
I --> J{zlib import resolution}
J -->|npm package present| K[npm package shadows builtin]
J -->|npm package removed| L[Node builtin resolves\nzlib.gzip is a function]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[yarn build / yarn test] --> B{turbo.json key}
B -->|old pipeline key| C[turbo 2.x rejects config\nbroken on main before PR]
B -->|new tasks key| D[turbo 2.x accepts config\n8 of 8 tasks run]
D --> E[framer-motion build]
E --> F{types/styled-components\nin node_modules?}
F -->|removed| G[rollup-plugin-dts injects\nReact reference\ncheck-bundle fails]
F -->|retained| H[dom.d.ts is React-free\ncheck-bundle passes]
D --> I[yarn measure]
I --> J{zlib import resolution}
J -->|npm package present| K[npm package shadows builtin]
J -->|npm package removed| L[Node builtin resolves\nzlib.gzip is a function]
Reviews (1): Last reviewed commit: "Remove unused devDependencies (lint-stag..." | Re-trigger Greptile |
Implements plan 010 (root manifest hygiene), with one correction and one necessary unblock.
What changed
lint-staged@8— no husky, no.lintstagedrc, nolint-stagedconfig block, no active git hook. Dead since 2019.zlib@1— its only consumer,dev/inc/bundlesize.mjs(await import("zlib")), resolves the Node builtin, which shadows the npm package. Verified directly (zlib.gzipis a function with the npm package absent) and via a greenyarn measure.@types/styled-components(plan said to remove it — see below).turbo.json: renamed"pipeline"→"tasks"(see below).Correction to the plan:
@types/styled-componentsis NOT dead weightThe plan listed
@types/styled-componentsas safely removable (nostyled-componentsdep, no imports). It has no source imports, but its presence innode_modulesis load-bearing for the type build: removing it makesrollup-plugin-dtsinject/// <reference types="react" />intodist/dom.d.ts, whichpackages/framer-motion/scripts/check-bundle.jsrejects — the vanilla DOM bundle must be React-free. That failsframer-motion#build.Reproduced cleanly:
dom.d.tsline 1 is a plainmotion-domimport; check-bundle passes.@types/styled-componentsremoved → the React triple-slash reference appears; build fails.lint-staged/zlibare non-@typespackages and cannot affect.d.tsoutput, so they remain safe to remove.Necessary unblock:
turbo.jsonpipeline→tasksmainHEAD had already bumpedturboto2.x(package.json and committedyarn.lockresolve2.9.14) but leftturbo.jsonusing the old"pipeline"key, which turbo 2.x rejects — soyarn buildwas already broken onmainbefore this work. This branch renames the key to unblock the gates. This is outside the plan's original scope (which said don't touch turbo); flagged here for review. The broader turbo 1→2 migration (cache behavior, CI images) remains a separate deferred decision.Gates (all green)
yarn install— clean, onlylint-staged/zlibsubtrees removed from the lockfileyarn build— 8/8 turbo tasks, including framer-motion check-bundleyarn measure— exit 0 (the ❌ bundle-size overages are the pre-existing plan-035 items; the script reports, doesn't fail)yarn test— 7/7 turbo tasks, 799 passed / 7 skippedDeviations from the plan
@types/styled-componentsretained (load-bearing — see above), so 2 of 3 removals.turbo.jsonmodified (pre-existing turbo-2.x breakage), per operator approval.Follow-up for the maintainer
The DOM bundle's React-free guarantee currently depends on a stray, unused
@types/styled-componentsbeing installed — fragile. The real fix is to stoprollup-plugin-dtsleaking the React reference (or pin the dts toolchain), after which@types/styled-componentscan be dropped too.🤖 Generated with Claude Code