Skip to content

Remove ts-node in favor of native Node.js TypeScript support#821

Draft
Copilot wants to merge 5 commits intov3from
copilot/remove-ts-node-native-ts-support
Draft

Remove ts-node in favor of native Node.js TypeScript support#821
Copilot wants to merge 5 commits intov3from
copilot/remove-ts-node-native-ts-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

  • Remove enableTypeScript.ts (ts-node loader) from just-task package
  • Remove getTsNodeEnv.ts ts-node env helper from just-scripts package
  • Update config.ts to remove ts-node registration — Node 22.18+ handles .ts/.cts natively
  • Update config.ts to add support for .mjs and .mts config file extensions
  • Remove --esm CLI option from cli.ts (no longer needed with native TS)
  • Update nodeExecTask.ts to remove ts-node options (enableTypeScript, tsconfig, transpileOnly)
  • Update webpack task files to remove ts-node imports, env setup, and related options
  • Remove ts-node from just-example-lib devDependencies
  • Update example code (customTask.ts) to use import.meta.dirname for ESM compatibility
  • Update docs (docs/tasks/index.md) to reference native Node.js TS support and link to Node docs
  • Add tests for .mjs and .mts config file extensions in resolve.spec.ts
  • Update API reports (just-scripts.api.md)
  • Keep parameterized JS/TS tests for nodeExecTask, remove only ts-node specific checks
  • Create beachball change file for just-task (major)
  • Create beachball change file for just-scripts (major)
  • Run full test suite, build, lint, and format check — all passing

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Remove ts-node in favor of native TypeScript support Remove ts-node in favor of native Node.js TypeScript support Mar 26, 2026
Copilot AI requested a review from ecraig12345 March 26, 2026 01:33
Copy link
Copy Markdown
Member

@ecraig12345 ecraig12345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

/** Wrap a test that should be successful with extra logging in case it fails */
async function wrapCallTask(task: TaskFunction, options?: { expectError?: boolean }) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this helper back to this location in the file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved wrapCallTask back inside the describe.each block. Commit: 7da8b82

Copy link
Copy Markdown
Member

@ecraig12345 ecraig12345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs manual testing but generally good

Copilot AI and others added 5 commits March 26, 2026 05:45
- Remove enableTypeScript.ts and getTsNodeEnv.ts modules
- Update config.ts to remove ts-node registration (Node 22.18+ handles TS natively)
- Add support for detecting just.config.mjs and just.config.mts
- Remove --esm CLI option (no longer needed with native TS)
- Update nodeExecTask to remove ts-node options (enableTypeScript, tsconfig, transpileOnly)
- Update webpack tasks to remove ts-node env setup and related options
- Remove ts-node from just-example-lib devDependencies
- Update example code to use import.meta.dirname instead of __dirname
- Update docs to reference native Node.js TS support instead of ts-node
- Add tests for new .mjs and .mts config file extensions
- Update API reports

Co-authored-by: ecraig12345 <5864305+ecraig12345@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/just/sessions/b13c48b9-2eb7-4f77-a0eb-52587b449842
…de checks

Keep describe.each over javascript/typescript with wrapCallTask helper
inside the block. Remove ts-node specific checks: maybeTsAutoArgs,
enableTypeScript options, TS_NODE_ env assertions, and wrapNodeExecTask.

Co-authored-by: ecraig12345 <5864305+ecraig12345@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/just/sessions/2f3975bc-8c32-4e48-ab85-65c99e19c89d
Co-authored-by: Elizabeth Craig <ecraig12345@gmail.com>
@ecraig12345 ecraig12345 force-pushed the copilot/remove-ts-node-native-ts-support branch from 495becf to 702b53e Compare March 26, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove ts-node in favor of native TS support just-task config.ts should support ESM configs

2 participants