query icon indicating copy to clipboard operation
query copied to clipboard

feat(TError) : Make TError default to Error instead of unknown

Open judicaelandria opened this issue 2 years ago • 1 comments

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

judicaelandria avatar Dec 25 '22 13:12 judicaelandria

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 06a713bb0fa8465dd9a826646b82d87df135e3f9:

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

codesandbox-ci[bot] avatar Dec 25 '22 13:12 codesandbox-ci[bot]

close https://github.com/TanStack/query/issues/4676

judicaelandria avatar Dec 28 '22 13:12 judicaelandria

@TkDodo done with this one too

judicaelandria avatar Dec 29 '22 02:12 judicaelandria

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!

TkDodo avatar Jan 04 '23 19:01 TkDodo

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

judicaelandria avatar Jan 05 '23 06:01 judicaelandria

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?

TkDodo avatar Jan 05 '23 09:01 TkDodo

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

judicaelandria avatar Jan 05 '23 11:01 judicaelandria

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 😅

TkDodo avatar Jan 05 '23 12:01 TkDodo

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 avatar Jan 05 '23 16:01 judicaelandria

@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

judicaelandria avatar Jan 05 '23 18:01 judicaelandria

@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: b2d62d9266ac75d88606e889f4b5eac38cb0b76a

TkDodo avatar Jan 08 '23 20:01 TkDodo

Codecov Report

:exclamation: 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.

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

codecov-commenter avatar Jan 08 '23 20:01 codecov-commenter