Repository navigation
Drop unused @graphql-codegen/cli and declare dotenv explicitly - #2444
Merged
Merged
Conversation
@graphql-codegen/cli sat in frontend devDependencies with no codegen config, no script and no import anywhere in the frontend; generated GraphQL types live in src/types/graphql-api.ts and are maintained by hand. Removing it (and the @graphql-codegen/cli/yaml resolution that existed only for it) prunes 230 lockfile entries / 1,635 lines, including all 27 @graphql-tools/* packages. That is the dev-only transitive chain behind PR #2420 (@graphql-tools/executor-legacy-ws and its Node >=22.15 engine requirement), so it can no longer generate Dependabot alerts. frontend/scripts/env.js (run by `yarn build` and `yarn start`) requires dotenv, which was only ever installed transitively via @graphql-tools/prisma-loader inside that tree. Declare dotenv@^16.6.1 as a devDependency so the build keeps working. Verified: yarn install --frozen-lockfile, yarn build, prettier, any-baseline check, 2644 unit tests.
|
Review: clean, well-scoped dependency cleanup. Checked against the repo:
Minor, non-blocking:
No bugs, security, or performance concerns. Good to merge once the doc references are cleaned up. |
Three docs still described a codegen step for frontend GraphQL types. Those types live in frontend/src/types/graphql-api.ts and are hand-maintained, and @graphql-codegen/cli is gone as of the previous commit. Also confirms the review's packaging question: frontend/Dockerfile runs a plain `yarn install` (devDependencies included) before `yarn build`, so dotenv belongs in devDependencies.
ReviewThis is a clean dependency removal and I found nothing blocking.
Optional nits:
LGTM. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Follow-up to #2420.
@graphql-codegen/cliwas in frontenddevDependencieswith no codegen config, no script, and no import anywhere in the frontend (generated types insrc/types/graphql-api.tsare maintained by hand). This removes it, along with the@graphql-codegen/cli/yamlresolution that existed only for it.Effect on the lockfile: 230 entries / 1,635 lines pruned, including all 27
@graphql-tools/*packages. That is the dev-only transitive chain behind #2420 (@graphql-tools/executor-legacy-ws,@graphql-tools/utils@12,@whatwg-node/promise-helpers@2), so it can no longer generate Dependabot alerts. Nothing else in the tree depended on any of it.Phantom dependency fixed:
frontend/scripts/env.js(run byyarn buildandyarn start) requiresdotenv, which was only ever installed transitively via@graphql-tools/prisma-loaderinside the codegen tree. Removing the cli broke the build untildotenv@^16.6.1(the version it was already resolving to) was declared explicitly.Verification (local, Node 24)
yarn install --frozen-lockfile: passyarn build(tsc + vite): passyarn run lint(prettier) andyarn run any:check:strict: passNoted, not changed
frontend/scripts/generate-brand-pngs.jsimportsplaywrightwithout declaring it;@playwright/teststill supplies it, so it is unaffected here. Worth declaring in a separate change.