Skip to content

Add explicit node types for TypeScript 6 compat#51

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

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

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 after upgrading to TS 6

Based on v2.0.0 so depscan can consume it without lockfile changes.

Context

SocketDev/depscan#18896 is upgrading depscan to TypeScript 6.0.2.

Test plan

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

Made with Cursor

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:54
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 @socketsecurity/socket-patch TypeScript project config to explicitly include Node.js ambient type definitions, aligning the package with TypeScript 6’s changed default behavior for automatic @types/* inclusion and keeping project-reference builds working for depscan.

Changes:

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

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

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.

3 participants