-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix type check ci #5714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix type check ci #5714
Conversation
it doesn't actually check types in all files because it used tsconfig.build.json hence some type errors go unnoticed
Diff output filesNo diff |
"files": [], | ||
"references": [ | ||
{ | ||
"path": "./packages/@uppy/audio/tsconfig.build.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this new file? We only need tsconfig.json
at the root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tsconfig.json is used by editors like vscode and yarn test:ts
in order to check types on all files. tsconfig.build.json is used by yarn build:ts
because we don't want to spit out dist for test files etc. I don't know any other way to do this without having two tsconfig files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn build:ts
worked for me before without new new file? What didn't it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build:ts doesn't typecheck everything (for example *.test.ts files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance it looks like @mifi is right. Tests aren’t type-checked without this change.
I would normally recommend this:
// tsconfig.json
{
"files": [],
"references": [
{ "path": "./packages/some-pkg/tsconfig.json" },
// etc…
]
}
// packages/some-pkg/tsconfig.json
{
"include": ["test"],
"references": [
{ "path": "./tsconfig.build.json" },
],
"compilerOptions": {
"noEmit": true
}
}
// packages/some-pkg/tsconfig.build.json
{
"include": ["src"],
"references": [
{ "path": "../dependency/tsconfig.build.json" },
// etc…
],
"compilerOptions": {
"composite": true,
// etc…
}
}
It would be possible to add a top-level tsconfig.build.json
solution file that references all builds only. There’s no technically correct answer here. I wouldn’t add it personally, but it can definitely be added if any contributor deems it useful.
I recall from helping earlier however, that this repo has some weird circular dependencies. I see how the addition of tsconfig.build.json
now could help work around that situation.
| Package | Version | Package | Version | | -------------------- | ------- | -------------------- | ------- | | @uppy/angular | 0.8.0 | uppy | 4.15.0 | | @uppy/provider-views | 4.4.3 | | | - @uppy/provider-views: Fix google photos picker (Mikael Finstad / #5717) - meta: build(deps): bump nanoid from 3.3.7 to 5.1.2 (dependabot[bot] / #5664) - examples: build(deps-dev): bump vite from 5.4.16 to 5.4.17 (dependabot[bot] / #5707) - @uppy/utils: Fix type check ci (Mikael Finstad / #5714) - @uppy/angular: Support Angular 19 (#5709) (Arnaud Flaesch / #5715) - meta: simplify e2e (Mikael Finstad / #5711) - meta: fix ready to commit (Mikael Finstad / #5713)
* main: Fix google photos picker (#5717) build(deps): bump nanoid from 3.3.7 to 5.1.2 (#5664) build(deps-dev): bump vite from 5.4.16 to 5.4.17 (#5707) Fix type check ci (#5714) Support Angular 19 (#5709) (#5715) simplify e2e (#5711) fix ready to commit (#5713) Release: uppy@4.14.0 (#5712) dry retryAll() and upload() (#5691) Revert "Support Angular 19" (#5710) Support Angular 19 (#5709) implement dropbox business teams (#5708)
it doesn't actually check types in all files
because it used tsconfig.build.json (which excludes some files)
hence some type errors go unnoticed