Skip to content

Conversation

@wladyslawczyzewski
Copy link
Contributor

Description

When building the OpenTelemetry Lambda collector and wrapper as a submodule of other repositories (for example as part of AWS CDK infrastructure repository) mocha types may conflict with jest types. Therefore some additional changes required to explicitly set the type roots for nodejs's lambda wrapper.

…ther types in repositories with this repo as submodule
Copilot AI review requested due to automatic review settings November 26, 2025 08:51
@wladyslawczyzewski wladyslawczyzewski requested a review from a team as a code owner November 26, 2025 08:51
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 26, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

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

This PR aims to prevent type conflicts between mocha and jest types when the OpenTelemetry Lambda repository is used as a submodule in other repositories (e.g., AWS CDK infrastructure repositories) by explicitly setting typeRoots in the TypeScript configuration.

Key Changes

  • Added typeRoots configuration to tsconfig.base.json to restrict TypeScript to only load types from the local node_modules/@types directory
  • This prevents TypeScript from searching parent directories for type definitions when used as a submodule

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

@wpessers wpessers added the javascript Pull requests that update Javascript code label Nov 27, 2025
@wpessers wpessers merged commit 3360e50 into open-telemetry:main Nov 27, 2025
12 checks passed
@wladyslawczyzewski wladyslawczyzewski deleted the fix-building-nodejs-package-as-submodule-in-other-repositories branch November 27, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants