Add CI + bring vercel-node-mongo pnpm setup up to repo standard#45
Merged
Conversation
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
#37 landed the initial pnpm migration for `examples/vercel-node-mongo` 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 the CI workflow.
Bundled because: adding CI on top of the weak pnpm setup would either skip the supply-chain guarantees or have CI fail on day one. Doing both together keeps the project in a consistent state.
pnpm setup brought up to standard
`package.json`
`pnpm-workspace.yaml` — full skill template:
`.gitignore` — blocks `package-lock.json` and `yarn.lock`. `.npmrc` removed.
Required bump
Source fixes from strict typecheck
CI plumbing
Workflow
`.github/workflows/vercel-mongo-ci.yml` — path-filtered, concurrency-cancelled. Node 24, pnpm 11.1.1, `pnpm install --frozen-lockfile`, then `lint` / `test` / `build`. Same shape as #41–#44.
Verification