Skip to content

fix: declare grafast as peer dependency for pg-many-to-many via packageExtensions#877

Open
pyramation wants to merge 1 commit intomainfrom
devin/1774067033-fix-grafast-peer-dep
Open

fix: declare grafast as peer dependency for pg-many-to-many via packageExtensions#877
pyramation wants to merge 1 commit intomainfrom
devin/1774067033-fix-grafast-peer-dep

Conversation

@pyramation
Copy link
Contributor

Summary

@graphile-contrib/pg-many-to-many does require("grafast") at runtime but doesn't declare it as a dependency or peerDependency. Under pnpm's strict module resolution, this can cause Cannot find module 'grafast' errors when node_modules is in a stale state (e.g. after switching branches or partial installs).

Adds a pnpm.packageExtensions entry to the root package.json declaring grafast as a peer dependency of @graphile-contrib/pg-many-to-many, ensuring pnpm always links it correctly.

Note: The lockfile was regenerated from scratch, so the diff includes YAML formatting normalization (multi-line resolution: blocks → single-line). No intentional version changes.

Review & Testing Checklist for Human

  • Verify lockfile regeneration didn't silently change dependency versions. The diff is large due to YAML formatting normalization. Spot-check a few key packages (grafast, postgraphile, graphile-build, graphql) to confirm versions are unchanged.
  • Test the fix locally: rm -rf node_modules && pnpm install, then run pnpm run generate in sdk/constructive-sdk to confirm grafast resolves. This was the original error path.
  • Verify CI build passes — the build is the primary signal that nothing broke.

Notes

  • On a clean install, grafast is already hoisted to .pnpm/node_modules/ by default and resolves fine. The packageExtensions entry is a defensive measure to make the dependency relationship explicit and prevent resolution failures in edge cases (stale caches, different pnpm versions, etc.).
  • The packageExtensionsChecksum in the lockfile changed as expected due to the new entry.

Link to Devin session: https://app.devin.ai/sessions/5d550def7a314c97854ec12fa09dd4ca
Requested by: @pyramation

…geExtensions

@graphile-contrib/pg-many-to-many requires grafast at runtime but doesn't
declare it as a dependency or peerDependency. In pnpm's strict module
resolution, this can cause 'Cannot find module grafast' errors when
node_modules is in a stale state.

Add a pnpm packageExtensions entry to declare grafast as a peer dependency
of @graphile-contrib/pg-many-to-many, ensuring pnpm always links it
correctly regardless of cache state.
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant