Skip to content

Conversation

judicaelandria
Copy link
Contributor

This PR makes the TError default to Error instead of unknown, more info about this here

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 25, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 06a713b:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-vue-basic Configuration

@judicaelandria
Copy link
Contributor Author

judicaelandria commented Dec 28, 2022

close #4676

@judicaelandria judicaelandria changed the base branch from main to v5 December 28, 2022 13:49
@judicaelandria
Copy link
Contributor Author

@TkDodo done with this one too

Copy link
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

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

🚀

@TkDodo TkDodo linked an issue Dec 29, 2022 that may be closed by this pull request
@TkDodo
Copy link
Collaborator

TkDodo commented Jan 4, 2023

can you please resolve the conflicts? We've merged the big syntax change (object syntax) PR and sadly it causes quite some conflicts. Should be straight forward to solve though - sorry!

@judicaelandria
Copy link
Contributor Author

judicaelandria commented Jan 5, 2023

can you please resolve the conflicts? We've merged the big syntax change (object syntax) PR and sadly it causes quite some conflicts. Should be straight forward to solve though - sorry!

done

@TkDodo
Copy link
Collaborator

TkDodo commented Jan 5, 2023

formatting is failing:

> query@ prettier /home/runner/work/query/query
> prettier "{packages,examples}/**/src/**/*.{md,js,jsx,ts,tsx,json,vue}" "--check"

Checking formatting...
[warn] packages/solid-query/src/createQueries.ts
[warn] Code style issues found in the above file. Forgot to run Prettier?

@judicaelandria
Copy link
Contributor Author

formatting is failing:

> query@ prettier /home/runner/work/query/query
> prettier "{packages,examples}/**/src/**/*.{md,js,jsx,ts,tsx,json,vue}" "--check"

Checking formatting...
[warn] packages/solid-query/src/createQueries.ts
[warn] Code style issues found in the above file. Forgot to run Prettier?

ah yeah! sorry, forgot to run it, fixed

@TkDodo
Copy link
Collaborator

TkDodo commented Jan 5, 2023

seems like the same solid tests is always failing, and its one that was touched in this PR. do you maybe know why? Or should we ask @ardeora 😅

@judicaelandria
Copy link
Contributor Author

judicaelandria commented Jan 5, 2023

seems like the same solid tests is always failing, and its one that was touched in this PR. do you maybe know why? Or should we ask @ardeora 😅

oh that's odd!all the test are passing locally, I'll investigate

@judicaelandria
Copy link
Contributor Author

@TkDodo this a new error from the merge, it has something to do with the suspense
Screenshot 2023-01-05 at 9 17 52 PM

@TkDodo
Copy link
Collaborator

TkDodo commented Jan 8, 2023

@TkDodo this a new error from the merge, it has something to do with the suspense

I think it's because the ts-expects-error was spanning the whole line, and now it's two lines because of syntax changes, and the second line is not "covered" anymore. It only errors in the local IDE, not in the typecheck task. But yeah, this test is accessing private fields, which it shouldn't - but I've already re-written it in a different branch.

Anyways, this is not the problem here. The problem was that we still had some tests that rejected a promise with a string. I fixed that here: b2d62d9

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (v5@3b45591). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@          Coverage Diff          @@
##             v5    #4706   +/-   ##
=====================================
  Coverage      ?   90.73%           
=====================================
  Files         ?       89           
  Lines         ?     3487           
  Branches      ?      896           
=====================================
  Hits          ?     3164           
  Misses        ?      301           
  Partials      ?       22           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TkDodo TkDodo merged commit 12659f5 into TanStack:v5 Jan 8, 2023
@judicaelandria judicaelandria deleted the feat/makets-error-default-error branch April 2, 2023 17:56
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.

make TError default to Error instead of unknown
4 participants