Skip to main content

Quality and CI

The repository ships the same review posture as its sibling @nest-native packages, using node:test and c8.

Gates​

  • Package build, typecheck, and tests on Node.js 22 (the supported line).
  • NestJS compatibility matrix (nestjs-compat) — each end of the ^11.0.0 || ^12.0.0 peer range installed with --no-save on top of the 11 lockfile: 11.0.0 pinned exactly (with @nestjs/platform-fastify@11.0.2, the first fastify release whose peers admit 11 — the reason is written next to the pin), and ^12. Each leg requires every workspace to resolve exactly that version with every peer range in the NestJS ecosystem satisfied in the final tree (scripts/check-nestjs-resolution.mjs, which catches the peer conflicts npm merely warns about and also runs against the lockfile in release:check), then runs the suite and the full sample matrix against it. Both ends of the range are tested claims.
  • Coverage with c8, enforced at 100% for statements, branches, functions, and lines on the package source.
  • Cognitive complexity enforced with SonarJS at a threshold of 15 per source function.
  • Package tarball validation and README/docs link validation.
  • Sample version sync — every sample/* pins @nest-native/ai-sdk to the package version.
  • High-severity supply-chain audit.
  • Docusaurus site build.
  • Sample matrix — the showcase and every focused sample boot and assert behavior.

Running The Gate Locally​

npm run ci

This runs typecheck, coverage, complexity check and report, the release checks, the supply-chain audit, and the sample matrix. The docs build runs in CI via the docs-site job and can be run locally with:

npm run ci:docs

PR Reports​

Pull requests get sticky comments for:

  • Coverage — per-file coverage with a diff against the base branch.
  • Test performance — test-step duration against the base branch.
  • Cognitive complexity — per-function complexity against the base branch.

Coverage Philosophy​

100% is enforced, not aspirational. Every branch is covered — every ??, every option path, every error path. Coverage is never lowered to merge; tests are added instead. Complexity is never reduced by weakening enhancer integration, AbortSignal correctness, or test coverage.

Supply Chain​

The published package keeps "dependencies": {} empty. Every dependency change is reviewed for legitimacy, lifecycle scripts are inspected, and unpinned Git/URL dependencies are flagged. The AI SDK is a fast-moving peer; its changelog is reviewed at every bump. See Security.