Skip to content

Update TypeScript to 6.x in bicep-types-radius generator #11530

@brooke-hamilton

Description

@brooke-hamilton

Summary

The hack/bicep-types-radius/src/generator package currently uses TypeScript 5.x. TypeScript 6.0 has been released but we are not yet ready to upgrade.

Why it's not done yet

TypeScript 6 introduces breaking changes to CJS/ESM module interop that affect our code:

  • The default import of yargs is resolved differently under TS 6, requiring a change from yargs to yargs(process.argv.slice(2)) in src/cmd/generate.ts.
  • The @typescript-eslint/* packages we depend on declare peerDependencies of typescript: '>=4.8.4 <6.0.0', meaning TS 6 is outside their supported range. We need to wait for @typescript-eslint to release versions that support TS 6.

Current state

Dependabot has been configured to ignore the TypeScript 6.x major version bump (@dependabot ignore this major version for typescript) so it will not attempt to include this upgrade in grouped dependency PRs.

Action items

  • Wait for @typescript-eslint/eslint-plugin and @typescript-eslint/parser to support TypeScript 6
  • Update yargs usage in src/cmd/generate.ts from yargs to yargs(process.argv.slice(2)) (or update yargs types)
  • Test make generate end-to-end with TypeScript 6
  • Remove the dependabot ignore rule for typescript once the upgrade is complete

References

Metadata

Metadata

Labels

triagedThis issue has been reviewed and triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions