Skip to content

feat: add NestJS support#141

Merged
HugoRCD merged 4 commits intomainfrom
claude/gifted-bhaskara
Mar 7, 2026
Merged

feat: add NestJS support#141
HugoRCD merged 4 commits intomainfrom
claude/gifted-bhaskara

Conversation

@HugoRCD
Copy link
Copy Markdown
Owner

@HugoRCD HugoRCD commented Mar 7, 2026

Summary

  • Add evlog/nestjs integration with Express-compatible middleware, useLogger() via AsyncLocalStorage, and full pipeline support (drain, enrich, keep)
  • Add example app, documentation, tests (22 passing), and all CI/PR config updates

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evlog-docs Ready Ready Preview, Comment, Open in v0 Mar 7, 2026 3:26pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 7, 2026

Thank you for following the naming conventions! 🙏

@HugoRCD HugoRCD changed the title feat(nestjs): add NestJS support feat: add NestJS support Mar 7, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 7, 2026

npm i https://pkg.pr.new/evlog@141
npm i https://pkg.pr.new/@evlog/nuxthub@141

commit: 9856298

Replace Express-style middleware export with proper NestJS module:
- EvlogModule.forRoot() / forRootAsync() dynamic module pattern
- NestModule.configure() for middleware registration
- Type-only @nestjs/common imports (no runtime dependency)
- NestJS example with controllers, decorators, exception filters
- Updated all documentation for new API

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class NestJS support to the evlog package, aligning it with existing framework integrations (Express/Fastify/Elysia/etc.) and extending the docs/examples/CI metadata to include the new scope.

Changes:

  • Added evlog/nestjs integration with EvlogModule + useLogger() powered by AsyncLocalStorage.
  • Added comprehensive NestJS tests, plus a runnable example app and docs pages.
  • Updated package exports/build config and repo metadata (changeset, PR scopes, docs landing/framework tabs).

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
skills/evlog/SKILL.md Updates skill description to include NestJS among supported setups.
packages/evlog/tsdown.config.ts Adds NestJS entrypoint and externalizes Nest deps for bundling.
packages/evlog/test/nestjs.test.ts Adds test suite validating middleware pipeline + useLogger() behavior for NestJS integration.
packages/evlog/src/nestjs/index.ts Implements EvlogModule, NestJS middleware, and useLogger() API.
packages/evlog/package.json Adds ./nestjs export + typesVersions mapping and peer/dev dependency updates.
packages/evlog/README.md Documents NestJS usage and links to the new example.
package.json Adds example:nestjs script for running the example from the monorepo root.
examples/nestjs/tsconfig.json Adds TS config for the NestJS example project.
examples/nestjs/src/ui.ts Adds interactive UI HTML for exercising example routes.
examples/nestjs/src/main.ts Adds Nest bootstrap entrypoint for the example app.
examples/nestjs/src/app.module.ts Wires EvlogModule.forRoot() into the example app (with PostHog drain).
examples/nestjs/src/app.controller.ts Adds example routes + exception filter demonstrating structured errors + logging.
examples/nestjs/package.json Defines the NestJS example package and its dependencies.
examples/nestjs/README.md Adds instructions for running the NestJS example.
bun.lock Locks new NestJS-related dependencies for the repo and example package.
apps/docs/content/6.examples/7.nestjs.md Adds a full NestJS example guide in the docs.
apps/docs/content/1.getting-started/2.installation.md Adds NestJS section to the installation/getting-started docs.
apps/docs/content/0.landing.md Adds NestJS tab snippet to the landing page framework examples.
apps/docs/app/components/features/FeatureFrameworks.vue Adds NestJS to the frameworks tab UI and shifts tab indices accordingly.
AGENTS.md Adds NestJS integration guidance for internal agent/docs patterns.
.github/workflows/semantic-pull-request.yml Adds nestjs to allowed semantic PR scopes.
.github/pull_request_template.md Adds nestjs to the scope list in the PR template.
.changeset/nestjs-integration.md Declares a minor release for adding the NestJS integration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Make `req.log` optional in module augmentation (undefined when skipped)
- Add `express-serve-static-core` augmentation for NestJS Express adapter
- Read options lazily at request time to fix forRootAsync timing

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@HugoRCD HugoRCD marked this pull request as ready for review March 7, 2026 15:28
@HugoRCD HugoRCD merged commit 91f8ceb into main Mar 7, 2026
11 checks passed
@HugoRCD HugoRCD deleted the claude/gifted-bhaskara branch March 7, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants