Skip to content

companion: port to TypeScript#6178

Closed
kvz wants to merge 14 commits intomainfrom
ts-companion
Closed

companion: port to TypeScript#6178
kvz wants to merge 14 commits intomainfrom
ts-companion

Conversation

@kvz
Copy link
Member

@kvz kvz commented Feb 10, 2026

Ports @uppy/companion to TypeScript while keeping runtime/packaging behavior stable for downstream consumers.

Key points:

  • Emits runnable JS into packages/@uppy/companion/dist/ (keeps src/ TS-only; avoids mixed .js/.ts sources).
  • Uses .ts import specifiers in source with TS extension rewriting on emit.
  • Adds central zod v3 schemas under packages/@uppy/companion/src/schemas/ and prefers unknown + guards.
  • Updates bin/dev/docker wiring to point at dist/.
  • Migration plan included: packages/@uppy/companion/TSPLAN.md.

Verification:

  • yarn workspace @uppy/companion build
  • yarn workspace @uppy/companion typecheck
  • yarn workspace @uppy/companion test

- Convert companion sources to .ts and emit runnable JS to dist/\n- Add zod schemas for options/boundaries and prefer unknown+guards\n- Keep package exports stable (now via dist/) and update dev/runtime scripts\n\nVerified: yarn workspace @uppy/companion build && typecheck && test
@kvz kvz self-assigned this Feb 10, 2026
@kvz kvz requested review from Murderlon and mifi February 10, 2026 16:41
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

⚠️ No Changeset found

Latest commit: da6733d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security
Copy link

socket-security bot commented Feb 10, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​mime-types@​2.1.41001006581100
Added@​types/​common-tags@​1.8.41001007280100
Added@​types/​validator@​13.15.101001007786100
Added@​types/​serialize-javascript@​5.0.41001008380100
Addedzod@​3.25.769810010095100

View full report

@kvz kvz marked this pull request as draft February 10, 2026 18:45
@kvz kvz removed request for Murderlon and mifi February 10, 2026 18:46
@socket-security
Copy link

socket-security bot commented Feb 10, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@kvz kvz requested review from Murderlon and mifi February 10, 2026 19:46
run:
corepack yarn install
- run: corepack yarn run typecheck
- run: corepack yarn workspace @uppy/companion lint:ts
Copy link
Member Author

Choose a reason for hiding this comment

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

This one is stricter, but it's lint-only, we don't change the typescript output as to be more in accordance with current outputs, but we can debate

@@ -1,3 +0,0 @@
#!/usr/bin/env node
Copy link
Member Author

Choose a reason for hiding this comment

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

CLI now points to built output via packages/@uppy/companion/package.json:35: bin: "./dist/bin/companion.js"

@kvz
Copy link
Member Author

kvz commented Feb 11, 2026

Superseded by #6179.\n\nThis replacement PR preserves the exact final content but splits history into a pure rename commit + content commit to make review easier.

@kvz kvz closed this Feb 11, 2026
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.

1 participant