Migrate vercel-node-mongo to pnpm with supply-chain safe configs#37
Merged
Conversation
Same template as #35: pnpm 11.1.1, default-deny postinstall scripts, 7-day minimum release age. No allowBuilds needed - no native deps with postinstall. Project has no vercel.json - Vercel auto-detects pnpm-lock.yaml.
This was referenced May 15, 2026
Gabrielpanga
added a commit
that referenced
this pull request
May 17, 2026
) PR #37 landed the initial pnpm migration for this project with a minimal config (no preinstall audit, no full safety stack). This PR brings it in line with the same hardening every other migrated project ships with, then adds CI. pnpm setup brought up to standard: package.json - engines.node >=22.11.0 -> >=24.0.0 - engines.pnpm >=11.0.0 added - devEngines.runtime with onFail: error - scripts.preinstall: pnpm audit && pnpm audit signatures - scripts.lint:lockfile: pnpm install --frozen-lockfile pnpm-workspace.yaml - full safety stack: - minimumReleaseAge 10080 -> 20160 (7d -> 14d) - minimumReleaseAgeIgnoreMissingTime: true - engineStrict: true - trustPolicy: no-downgrade + trustPolicyIgnoreAfter 90d - blockExoticSubdeps: true - savePrefix: "" - resolutionMode: highest - minimumReleaseAgeExclude: '@pluggyai/*' - allowBuilds: {} - overrides: {} .gitignore - block package-lock.json and yarn.lock .npmrc removed (workspace.yaml is the single source of truth) Dependency bump required to make preinstall audit pass: - mongodb 3.6.6 -> 3.6.10 (same minor, patches GHSA-vxvm-qww3-2fh7: driver may publish events containing auth data) Source fixes surfaced by tsc --noEmit in strict mode: - api/notifications.ts now lazy-constructs PluggyClient inside the handler and guards both env vars (was throwing at module import time when env was missing, and passing string | undefined into PluggyClient which strictly requires string). - lib/db.ts now guards MONGO_URI before passing it to MongoClient. Plumbing for CI: - new tsconfig.json (ES2022, NodeNext, strict, isolatedModules, noEmit; includes api/** and lib/**) - typescript 5.9.3 devDependency - typecheck / lint / test / build scripts (all -> tsc --noEmit) CI workflow (.github/workflows/vercel-mongo-ci.yml): - path-filtered on examples/vercel-node-mongo/** + the workflow - concurrency-cancels older runs on the same ref - Node 24, pnpm 11.1.1, install --frozen-lockfile, then lint / test / build
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.
Summary
Same pattern as #35 applied to
examples/vercel-node-mongo.package-lock.json→pnpm-lock.yamlpnpm-workspace.yaml(minimumReleaseAge: 10080,autoInstallPeers: true).npmrcreduced to npm-compatible safe configspackage.json:engines.node >=22.11.0,packageManager: pnpm@11.1.1allowBuildsentries neededvercel.jsonpresent — Vercel auto-detects pnpm from lock + packageManagerVerification
pnpm installsucceeds with no warningsTest plan