Skip to content

chore: update dependencies and improve compatibility with NestJS 11 a…#14

Closed
yuval-hazaz wants to merge 2 commits intomainfrom
chore/upgrade-support-for-nest-and-otel
Closed

chore: update dependencies and improve compatibility with NestJS 11 a…#14
yuval-hazaz wants to merge 2 commits intomainfrom
chore/upgrade-support-for-nest-and-otel

Conversation

@yuval-hazaz
Copy link
Copy Markdown
Member

@yuval-hazaz yuval-hazaz commented Jan 3, 2026

Summary

This PR releases @amplication/opentelemetry-nestjs version 6.0.1 with refreshed peer/dev dependencies that align with NestJS 11, OpenTelemetry 1.30, and a minimum Node.js 20 runtime. It also updates the README with a detailed compatibility matrix and requirements, and tweaks the default HTTP instrumentation to emit incoming spans even when no parent context exists.

Changes

  • Dependencies: Bumped the package version to 6.0.1, enforced Node.js >= 20 engines, refreshed peer and dev dependencies (NestJS 11, OpenTelemetry 0.55/1.30, TypeScript 5.7), and synced the lockfile plus OpenTelemetry overrides.
  • Documentation: Expanded the README compatibility table to cover NestJS/OpenTelemetry/Node combinations, listed explicit requirements, and added guidance on installing peer dependencies.
  • Configuration: Retargeted the TypeScript configuration to ES2022 and added the corresponding lib entry to match modern runtime expectations.
  • Features: Updated the HTTP auto-instrumentation defaults to allow incoming spans without a parent so that inbound requests are still traced.

Commits

  • 55a4d5c chore: update dependencies and improve compatibility with NestJS 11 and Node.js 20
  • dbc91a6 chore: update @nestjs/event-emitter to version 3.0.0

Testing

  • Build the library with Node.js 20 to ensure the ES2022 TypeScript settings compile cleanly.
  • Run a sample NestJS 11 application with the library to verify the upgraded dependencies work together.
  • Exercise HTTP endpoints to confirm incoming requests produce spans even without an existing parent context.
  • Validate the README’s installation instructions by installing the documented peer dependencies in a clean project.

@overcut-ai
Copy link
Copy Markdown

overcut-ai Bot commented Jan 3, 2026

Completed Working on "Auto PR Description"

✅ Workflow completed successfully.


👉 View complete log

@overcut-ai
Copy link
Copy Markdown

overcut-ai Bot commented Jan 3, 2026

Completed Working on "Auto PR Description"

✅ Workflow completed successfully.


👉 View complete log

Copy link
Copy Markdown

@overcut-ai overcut-ai Bot left a comment

Choose a reason for hiding this comment

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

Summary: 3 MAJOR findings — peer/dev dependency ranges for @nestjs/event-emitter still cap at v2 so NestJS 11 installs fail, and the README’s compatibility table points to OpenTelemetry 0.55.x even though the package still peers on 0.54.x. Key themes: (1) dependency ranges don’t yet cover the NestJS 11 stack despite the claim of compatibility, (2) documentation diverges from the actual peer requirements, which will confuse adopters. Next steps: expand the peer/dev dependency ranges to include the NestJS 11-supported versions (and regenerate the lockfile) and align the README compatibility matrix with the actual OpenTelemetry version accepted by the package.

Comment thread package.json
"peerDependencies": {
"@nestjs/core": " ^8.0.0 || ^9.0.0 || ^10.0.0",
"@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0",
"@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MAJOR]: The PR claims NestJS 11 compatibility, but peerDependencies['@nestjs/event-emitter'] still only allows ^1 or ^2. Nest 11 projects must use @nestjs/event-emitter@3, whose own peer deps require @nestjs/common/core ^10 || ^11 (see the lockfile entry resolving to 3.0.1). As written, consumers on Nest 11 will hit peer-dependency conflicts when installing this package.

Suggested fix: Extend the peer dependency range to include ^3.0.0 (and regenerate the lockfile) so Nest 11 users can satisfy the requirement without errors.

Comment thread package.json
"@nestjs/cli": "^11.0.0",
"@nestjs/common": "^11.0.0",
"@nestjs/core": "^11.0.0",
"@nestjs/event-emitter": "^3.0.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MAJOR]: devDependencies['@nestjs/event-emitter'] is pinned to ^2.0.0 even though the rest of the dev stack (e.g., @nestjs/common/core ^11) requires the 3.x line. Installing from a clean tree will therefore try to fetch 2.x, which does not accept Nest 11 peers and causes npm install failures; the lockfile currently only works because it still pins 3.0.1.

Suggested fix: Bump the dev dependency to ^3.0.0 and rerun npm install so the lockfile reflects the Nest 11-compatible version.

Comment thread README.md
| 8.x | 2.x.x |
| Nestjs | Nestjs-OpenTelemetry | Node.js | OpenTelemetry |
| ------ | -------------------- | ------- | ------------- |
| 11.x | 6.x.x | >=20 | 0.55.x / 1.30.x |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MAJOR]: The NestJS 11 / 6.x row claims you must pair this library with OpenTelemetry 0.55.x/1.30.x, but the package peerDependencies still pin @opentelemetry/auto-instrumentations-node to ^0.54.0 (see package.json line 111). Following the docs would force users to install a version range your package actively rejects.

Suggested fix: Update the compatibility table to list 0.54.x / 1.30.x (or bump the peer dependency to ^0.55.0 so the documentation is accurate).

@yuval-hazaz yuval-hazaz closed this Jan 7, 2026
@yuval-hazaz yuval-hazaz deleted the chore/upgrade-support-for-nest-and-otel branch January 7, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant