chore: consume published inventories, and stop exempting graphql - #1673
Merged
Conversation
This workspace listed an upstream npm account under `maintainers` to
exempt the graphile v5 stack. That account also co-maintains `graphql`,
so the exemption reached further than intended — `pnpm-workspace.yaml`
carried:
minimumReleaseAgeExclude:
- graphql
along with graphiql, monaco-graphql, graphql-language-service and the
four @graphiql/* packages. `graphql` has six maintainers, so a compromise
of any one of those accounts published a release this workspace installed
immediately, with no wait. `maintainers` is a delegation as wide as
everything an account will ever publish; that is fine for accounts we
control and wrong for anyone who also maintains popular upstream code.
Two published inventories replace it, merged by pnpm-policy:
inventory:
- "@constructive-io/pnpm-policy/inventory.json"
- "@constructive-io/pnpm-policy-graphile/inventory.json"
The graphile one enumerates 16 package names, derived from what the
lockfiles resolve and filtered to packages published from Graphile-owned
repositories. All 16 are still exempt. The eight above are not, and now
wait like any other third-party dependency — we upgrade graphql rarely,
so the wait costs nothing.
Deletes the local 1041-line pnpm-policy.inventory.json. The list lived in
two places, went stale independently, and had to be reviewed by hand;
both sources are now pinned packages, so a change to what skips the wait
arrives as a version bump. Drops `policy:refresh` with it — refreshing
happens where the inventories are published.
No npm account is named anywhere in this repo now.
Verified: policy check matches, generate is byte-identical on a second
run, and the exemption list goes from 49 first-party names to 41 with all
16 graphile packages retained and none of the eight.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Switches this workspace to the two published inventories and closes an exemption that reached further than intended.
The problem
To exempt the graphile v5 stack from the release-age wait, this repo listed an upstream npm account under
maintainers. That account also co-maintainsgraphql— the reference implementation — sopnpm-workspace.yamlonmaincarries:along with
graphiql,monaco-graphql,graphql-language-serviceand the four@graphiql/*packages.graphqlhas six maintainers. A compromise of any one of those accounts published a release this workspace installed immediately, with no wait — which is the exact scenariominimumReleaseAgeexists to prevent, on one of the most depended-upon packages in the ecosystem.maintainersis a delegation as wide as everything an account will ever publish. Fine for accounts we control; wrong for anyone who also maintains popular upstream software.The change
pnpm-policymerges them (constructive-io/dev-utils#116). The graphile one (constructive-io/dev-utils#117) enumerates 16 package names, derived from what the lockfiles actually resolve and filtered to packages published from Graphile-owned repositories — not from an account.No npm account is named anywhere in this repo now.
What actually changed in the generated file
All 16 graphile packages remain exempt —
grafast,grafserv,postgraphile,graphile-build,graphile-build-pg,graphile-config,graphile-utils,pg-sql2,pg-introspection,tamedevil,ruru,ruru-types,@dataplan/json,@dataplan/pg,@graphile/lru,@graphile-contrib/pg-many-to-many. Nothing about upgrading Graphile gets slower.The eight above now wait two days like any other third-party dependency. We upgrade
graphqlrarely, so that costs nothing.Deletes the local inventory
pnpm-policy.inventory.json(1041 lines) is gone. The list lived in two places, went stale independently of the published one, and had to be reviewed by hand. Both sources are pinned packages now, so a change to what skips the wait arrives as a version bump you can review rather than an edit to a thousand-line file in this repo.policy:refreshgoes with it — refreshing happens where the inventories are published.Verification
Note on the lockfile
The 32-line lockfile diff is hand-spliced: the two new packages plus the
pnpm-policybump, with pnpm's own integrity hashes. Regenerating rewrote 10,283 lines and changed 59 resolutions — the committed lockfile was written by a different pnpm major, so any write re-resolves peer permutations. That churn does not belong in a policy PR. CI runs plainpnpm install, which will reconcile anything it needs to.Pinned:
@constructive-io/pnpm-policy@0.3.1,@constructive-io/pnpm-policy-graphile@0.2.0,pnpm-policy@^0.4.0.Refs constructive-io/constructive-planning#1464
🤖 Generated with Claude Code
https://claude.ai/code/session_01CEswUi4ANuB58rva48aHge