8000 Fix type check ci by mifi · Pull Request #5714 · transloadit/uppy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 6 commits into from
Apr 9, 2025
Merged

Fix type check ci #5714

merged 6 commits into from
Apr 9, 2025

Conversation

mifi
Copy link
Contributor
@mifi mifi commented Apr 8, 2025

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

mifi added 2 commits April 8, 2025 16:27
it doesn't actually check types in all files
because it used tsconfig.build.json
hence some type errors go unnoticed
Copy link
Contributor
github-actions bot commented Apr 8, 2025
Diff output files
No diff

"files": [],
"references": [
{
"path": "./packages/@uppy/audio/tsconfig.build.json"
Copy link
Member
@Murderlon Murderlon Apr 8, 2025

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.

Copy link
Contributor Author
@mifi mifi Apr 8, 2025

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

Copy link
Member

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?

Copy link
Contributor Author

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)

Copy link
Member

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.

@Murderlon Murderlon requested a review from remcohaszing April 9, 2025 11:17
@mifi mifi merged commit d49e01a into main Apr 9, 2025
15 checks passed
@mifi mifi deleted the fix-type-check-ci branch April 9, 2025 12:56
@github-actions github-actions bot mentioned this pull request Apr 14, 2025
github-actions bot added a commit that referenced this pull request Apr 14, 2025
| 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)
Murderlon added a commit that referenced this pull request Apr 15, 2025
* 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)
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
0