Skip to content

Add explicit node types for TypeScript 6 compat#51

Merged
Raynos merged 1 commit intomainfrom
fix/ts6-types-node-v2
Apr 3, 2026
Merged

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

Conversation

@Raynos
Copy link
Copy Markdown
Contributor

@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.

@Raynos Raynos merged commit 5960fb5 into main Apr 3, 2026
23 checks passed
@Raynos Raynos deleted the fix/ts6-types-node-v2 branch April 3, 2026 09:14
Raynos added a commit that referenced this pull request Apr 6, 2026
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
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