Conversation
- 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
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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. |
Use .ts relative import specifiers in src/test, enable TS extension imports in build, and post-process emitted d.ts to reference .js.
| run: | ||
| corepack yarn install | ||
| - run: corepack yarn run typecheck | ||
| - run: corepack yarn workspace @uppy/companion lint:ts |
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
CLI now points to built output via packages/@uppy/companion/package.json:35: bin: "./dist/bin/companion.js"
|
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. |
Ports
@uppy/companionto TypeScript while keeping runtime/packaging behavior stable for downstream consumers.Key points:
packages/@uppy/companion/dist/(keepssrc/TS-only; avoids mixed.js/.tssources)..tsimport specifiers in source with TS extension rewriting on emit.packages/@uppy/companion/src/schemas/and prefersunknown+ guards.dist/.packages/@uppy/companion/TSPLAN.md.Verification:
yarn workspace @uppy/companion buildyarn workspace @uppy/companion typecheckyarn workspace @uppy/companion test