Skip to content

scripts: convert JavaScript to TypeScript - #156

Merged
philiptaron merged 6 commits into
mainfrom
typescript
Oct 22, 2026
Merged

philiptaron merged 6 commits into
mainfrom
typescript

Conversation

@mdaniels5757

@mdaniels5757 mdaniels5757 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Tested locally.

  • scripts: setup TypeScript
  • scripts: convert all JavaScript scripts to TypeScript

Comment thread scripts/retire.ts
@@ -415,7 +447,10 @@ module.exports = async function retire({ github, options }) {
if (pr) {
await effect(
() =>
github.request(`POST /repos/${org}/${memberRepo}/issues/${pr.data.number}/labels`, {

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.

Seems like actual code changes like this should be at least in a separate commit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Late, but the reason I didn't do this was that the original code didn't type-check.

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.

I figured about as much, but AFAICT there's no reason that the code change couldn't have been made while it remained JS, then be moved to TS. This is moot now that it's merged anyway.

@actions/artifact, bottleneck and commander aren't imported by any script.
Removing them shrinks the lockfile from 196 to 50 packages.
Without this, type errors in the scripts are only caught when someone
runs `npm test` locally.
Terminate type aliases and members with semicolons like the rest of the code,
fix the indentation of the downloadArtifact call, and drop a trailing space
in shell.nix.
TypeScript 7 always enables it and no longer allows turning it off.
@philiptaron
philiptaron merged commit bb418cc into main Oct 22, 2026
2 checks passed
@philiptaron
philiptaron deleted the typescript branch October 22, 2026 16:44
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