feat(pnpm-policy-graphile): publish the Graphile allowlist as data - #117
Merged
Conversation
A second inventory package, so a workspace consuming Graphile can pair it
with @constructive-io/pnpm-policy instead of naming an npm account.
Why not an account: `maintainers` exempts everything an account ever
publishes, and the account behind the Graphile stack also co-maintains
`graphql` — the reference implementation — plus graphiql,
monaco-graphql and graphql-language-service. Those were swept into our
exemption list, so the most depended-upon package in the ecosystem was
skipping the quarantine, and `graphql` has six maintainers, meaning a
compromise of any one of them shipped a release we installed instantly.
An account is a delegation as wide as everything that account will ever
touch. Fine for accounts we control; wrong for anyone who also maintains
popular upstream software. So this enumerates names.
Derivation, reproducible rather than curated by taste:
1. every package the workspaces resolve, read from lockfiles, so
transitive dependencies count, not just direct ones
2. keep those whose npm `repository` is Graphile-owned
(github.com/graphile/*, github.com/graphile-contrib/*)
3. drop the rest
`constructive` and `constructive-db` independently resolve the same 16.
graphql, graphiql, monaco-graphql, graphql-language-service, @graphiql/*,
graphql-tag, graphql-upload and graphql-ws all fail step 2 and now wait
like any other third-party dependency.
No scope globs: `@graphile/*` would exempt whatever is published into
that scope next, which is the same open-ended delegation as a maintainer
entry, only smaller.
test.js guards the boundary with plain node asserts — no framework, runs
anywhere — failing if a forbidden name appears, if scopes or maintainers
stop being empty, or if the list is unsorted or has duplicates.
Needs the multi-inventory support in the tool (#116) to be paired with
@constructive-io/pnpm-policy; usable on its own before that.
CI installs with --frozen-lockfile, so adding a workspace package without its lockfile entry fails the build before anything runs: ERR_PNPM_OUTDATED_LOCKFILE pnpm-lock.yaml is not up to date with <ROOT>/packages/graphile-pnpm-policy/package.json Adds the importer stanza by hand rather than regenerating. Regenerating rewrites 7897 lines: the committed lockfile was written by a different pnpm major, so any write reformats the whole file, which would bury a data-only PR in unrelated churn and risk dropping entries. Verified with the version CI uses — `pnpm@10.12.2 install --frozen-lockfile --lockfile-only` resolves all 40 workspace projects with no outdated-lockfile error. That command reformats the file as a side effect, so the reformat is discarded and only the 7-line stanza is committed.
pyramation
force-pushed
the
feat/graphile-inventory
branch
from
August 6, 2026 09:33
2802918 to
0d82589
Compare
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.
A second inventory package —
@constructive-io/pnpm-policy-graphile— so a workspace that consumes Graphile can pair it with@constructive-io/pnpm-policyinstead of naming an npm account anywhere.The bug this closes
constructivecurrently lists an upstream npm account undermaintainers. That account publishes the Graphile stack — and also co-maintainsgraphql, the reference implementation, plusgraphiql,monaco-graphqlandgraphql-language-service.All of them were swept into the exemption list.
constructive/pnpm-workspace.yamlline 51 reads:So the most depended-upon package in the JavaScript ecosystem is skipping our quarantine today. And
graphqlhas six maintainers — a compromise of any one of those accounts publishes a release we install immediately, with no wait.maintainersis a delegation as wide as everything that account will ever touch. That is fine for accounts we control and wrong for anyone who also maintains popular upstream software. The tool's own README warns about exactly this.Derivation — reproducible, not curated by taste
repositoryis Graphile-owned —github.com/graphile/*orgithub.com/graphile-contrib/*. Checkable withnpm view <pkg> repository.url.constructiveandconstructive-dbindependently resolve the same 16 packages:Failing step 2 and therefore now waiting like any other third-party dependency:
graphql,graphiql,monaco-graphql,graphql-language-service,@graphiql/*,graphql-tag,graphql-upload,graphql-ws.Worth noting a name-pattern sweep would have missed
@graphile-contrib/pg-many-to-manyand wrongly kept the GraphiQL packages. Deriving from lockfile + repository is what got this right.No scope globs
@graphile/*or@dataplan/*would exempt whatever is published into those scopes next — the same open-ended delegation as a maintainer entry, just smaller. Names cost a line each and say exactly what was decided. npm'sscope:search is also unreliable, so "is this scope exclusively theirs?" is not a question I could answer, let alone keep answered.Guard
test.js— plain node asserts, no framework, runs with no install — fails if a forbidden name appears, ifscopesormaintainersstop being empty, or if the list is unsorted or contains duplicates.Also verified end-to-end against the real tool: pointing a config at this inventory emits
grafastandpostgraphileintominimumReleaseAgeExcludeand leavesgraphqlandgraphiqlout.Order
Pairing this with
@constructive-io/pnpm-policyneeds the multi-inventory support in #116, so land that first. This package is usable on its own before then.Once both are published I will send the
constructivePR: list both inventories, delete the 1024-entry localpnpm-policy.inventory.json, and remove the account name entirely — which also closes thegraphqlexposure.🤖 Generated with Claude Code
https://claude.ai/code/session_01CEswUi4ANuB58rva48aHge