Skip to content

fix(common): make ts-node an optional peer dependency (fixes #1638)#2194

Open
just-jeb wants to merge 1 commit into
masterfrom
fix/1638-optional-ts-node
Open

fix(common): make ts-node an optional peer dependency (fixes #1638)#2194
just-jeb wants to merge 1 commit into
masterfrom
fix/1638-optional-ts-node

Conversation

@just-jeb
Copy link
Copy Markdown
Owner

Description

Makes ts-node an optional peer dependency since it is only required when loading TypeScript configuration files. This change allows users with JavaScript/MJS-only configs to avoid installing ts-node unnecessarily.

Changes

  • Move ts-node from dependencies to peerDependencies in @angular-builders/common
  • Mark ts-node as optional via peerDependenciesMeta
  • Add ts-node as optional peerDependency to dependent packages:
    • @angular-builders/custom-esbuild
    • @angular-builders/custom-webpack
    • @angular-builders/jest

Benefits

  • Reduces installation size for users who don't need TypeScript config loading
  • Improves installation time for JavaScript-only projects
  • ts-node is only used when loading .ts config files (via common/loadModule)
  • All existing tests pass with the changes

Testing

✓ All unit and integration tests pass
✓ Builds succeed for all affected packages
✓ TypeScript compilation verified

@just-jeb just-jeb added bug Something isn't working builders:common tech-debt labels May 11, 2026
@just-jeb just-jeb force-pushed the fix/1638-optional-ts-node branch 2 times, most recently from c8ac0ba to c08fac0 Compare May 12, 2026 02:30
ts-node is only required when loading TypeScript configuration files.
Users with only JavaScript/MJS configs no longer need to install ts-node.

Changes:
- Move ts-node from dependencies to peerDependencies in @angular-builders/common
- Mark ts-node as optional via peerDependenciesMeta
- Add ts-node as optional peerDependency to dependent packages:
  @angular-builders/custom-esbuild
  @angular-builders/custom-webpack
  @angular-builders/jest

This allows users to omit ts-node from their installations when not needed,
reducing bundle size and installation time for projects using only JS configs.

Fixes #1638
@just-jeb just-jeb force-pushed the fix/1638-optional-ts-node branch from c08fac0 to 9d5803f Compare May 12, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working builders:common tech-debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant