Skip to content

Migrate typespec-python scripts from tsx to native node - #5068

Open
timotheeguerin wants to merge 3 commits into
Azure:mainfrom
timotheeguerin:timotheeguerin/migrate-python-scripts-to-node
Open

Migrate typespec-python scripts from tsx to native node#5068
timotheeguerin wants to merge 3 commits into
Azure:mainfrom
timotheeguerin:timotheeguerin/migrate-python-scripts-to-node

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Follow-up to the tsx→native-node migration, covering the Python emitter (@azure-tools/typespec-python) which was intentionally left out of the first PR.

Changes

  • Replace tsx script.ts invocations with node script.ts in package.json scripts (relies on Node's native TypeScript type-stripping).
  • Fix sibling relative imports to use explicit .ts extensions (native Node does not remap .js.ts).
  • Mark type-only imports with type so native Node strips them instead of trying to resolve them as runtime values.
  • Remove the now-unused tsx dependency and the tsx catalog entry in pnpm-workspace.yaml; reconcile the lockfile.

This mirrors the core submodule migration (Migrate build/dev scripts from tsx to native node).

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @azure-tools/typespec-python
Show changes

@azure-tools/typespec-python - internal ✏️

Migrate the Python emitter's build/dev scripts from tsx to native Node.js TypeScript execution. tsx script.ts invocations are now node script.ts (relying on Node's built-in type-stripping), sibling relative imports use explicit .ts extensions, and type-only imports are marked with type. The unused tsx dependency was removed.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:python Issues for @azure-tools/typespec-python emitter label Jul 27, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@azure-tools/typespec-python@5068

commit: 887ce01

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:python Issues for @azure-tools/typespec-python emitter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant