Repository navigation
fix(deps): declare @graphql-codegen/typed-document-node devDependency - #3450
Merged
Merged
Conversation
graphql-codegen resolves plugin names from the project root, so the typed-document-node plugin declared in codegen.ts must be a declared dependency. It was previously reachable only through the removed hoisted pnpm layout, which broke pnpm codegen under the default isolated linker. OpenSpec change: fix-graphql-codegen-plugin-resolution
|
Contributor
|
🎉 This pull request is included in Gitify v7.10.0! 🎉 Downloads for macOS, Windows, and Linux are available on the release page. Thanks for helping make Gitify better! |
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.



Why
pnpm codegenfails withUnable to find template plugin matching 'typed-document-node', which also breakspnpm dev(it runscodegen:watch).codegen.tsdeclares thetyped-document-nodeplugin, but@graphql-codegen/typed-document-nodewas never declared as a dependency. graphql-codegen resolves plugin names from the project root, so the plugin was only reachable through the hoisted pnpm layout the repo used to use (.npmrchadnode-linker=hoisted+shamefully-hoist=true). That.npmrcwas removed, and installs now use pnpm's default isolatednode_modules— so the plugin only exists as an unreachable transitive dependency.What changed
@graphql-codegen/typed-document-node@7.2.0todevDependencies(same major as@graphql-codegen/cli7.4.6, exact pin to match repo convention).codegen.tsis unchanged.Verification
pnpm codegen(withGITHUB_TOKEN): resolves both plugins, completes without the error, and regeneratesgraphql.tswith zero diff..npmrc/ hoisting config;node_modules/.modules.yamlreportsnodeLinker: isolated.pnpm checkpasses (format + lint + types, 445 files).pnpm testpasses (191 files, 1917 tests).Diff is limited to
package.jsonandpnpm-lock.yaml.OpenSpec change:
fix-graphql-codegen-plugin-resolution