Skip to content

Add explicit node types for TypeScript 6 compat#50

Closed
Raynos wants to merge 1 commit intomainfrom
fix/ts6-types-node
Closed

Add explicit node types for TypeScript 6 compat#50
Raynos wants to merge 1 commit intomainfrom
fix/ts6-types-node

Conversation

@Raynos
Copy link
Copy Markdown

@Raynos Raynos commented Apr 2, 2026

Summary

  • Adds "types": ["node"] to npm/socket-patch/tsconfig.json
  • TypeScript 6.0 changed default types behavior so node types are no longer auto-included
  • This fixes project reference builds in depscan (and any other consumer) after upgrading to TS 6

Note: This branch is based on v2.0.0 (6127887) so it can be consumed by depscan without lockfile changes. A separate branch (fix/ts6-types-node) targets latest main.

Context

SocketDev/depscan#18896 is upgrading depscan to TypeScript 6.0.2 and needed this fix.

Test plan

  • Verify tsc -b npm/socket-patch still builds successfully

TypeScript 6.0 changed the default types behavior
so node types are no longer auto-included. This
fixes builds in projects that use TS 6.

Made-with: Cursor
Copilot AI review requested due to automatic review settings April 2, 2026 13:32
Copy link
Copy Markdown

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

Updates the npm/socket-patch TypeScript project configuration to explicitly include Node.js type definitions, ensuring project-reference builds continue to work under TypeScript 6’s updated default types behavior.

Changes:

  • Add types: ["node"] to npm/socket-patch/tsconfig.json to explicitly include Node globals/types during compilation.

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

@Raynos
Copy link
Copy Markdown
Author

Raynos commented Apr 2, 2026

bugbot run

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings.

@Raynos
Copy link
Copy Markdown
Author

Raynos commented Apr 2, 2026

Superseded by a branch based on v2.0.0 to avoid lockfile issues in depscan. Opening new PR.

@Raynos Raynos closed this Apr 2, 2026
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.

2 participants