-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
V9 refactoring and cleanup #732
Merged
Merged
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
24c1a96
remove deprecated httpErrors
KATT 85bcf60
remove deprecated stuff
KATT b8c6668
wip
KATT 7198eab
remove httpError
KATT 743cac2
tweak
KATT d08bd12
remove `METHOD_NOT_FOUND`
KATT 033c460
Merge branch 'feature/not-found' into feature/next-major
KATT ae7a779
`PATH_NOT_FOUND` -> `NOT_FOUND`
KATT e9dce96
Merge branch 'main' into feature/next-major
KATT 099a5c7
align serialization between input/output
KATT dc68060
fix posting
KATT acc41b5
add little comment
KATT 53b2443
Merge branch 'main' into feature/next-major
KATT ded68ab
Merge branch 'main' into feature/next-major
KATT f8e7439
Merge branch 'main' into feature/next-major
kodiakhq[bot] f5f08eb
Merge branch 'main' into feature/next-major
kodiakhq[bot] fc6a9f9
Merge branch 'main' into feature/next-major
kodiakhq[bot] 60f8e6c
Merge branch 'main' into feature/next-major
kodiakhq[bot] 56c73eb
Merge branch 'main' into feature/next-major
kodiakhq[bot] 217479d
Merge branch 'main' into feature/next-major
kodiakhq[bot] 5ffe60b
remove useless `input`, add commnet
KATT 7370eac
Merge remote-tracking branch 'origin/main' into feature/next-major
KATT 50ad4eb
v9.0.0-alpha.2
KATT File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
/* eslint-disable @typescript-eslint/no-non-null-assertion */ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { assertNotBrowser } from '../assertNotBrowser'; | ||
export * from './errors'; | ||
export * from './requestHandler'; | ||
assertNotBrowser(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import { createWSClient, wsLink } from '../../client/src/links/wsLink'; | |
import { z } from 'zod'; | ||
import { TRPCClientError } from '../../client/src'; | ||
import * as trpc from '../src'; | ||
import { CreateHttpContextOptions, Maybe } from '../src'; | ||
import { CreateHttpContextOptions, Maybe, TRPCError } from '../src'; | ||
import { routerToServerAndClient } from './_testHelpers'; | ||
import WebSocket from 'ws'; | ||
import { waitFor } from '@testing-library/react'; | ||
|
@@ -270,7 +270,7 @@ describe('integration tests', () => { | |
trpc.router<Context>().query('whoami', { | ||
async resolve({ ctx }) { | ||
if (!ctx.user) { | ||
throw trpc.httpError.unauthorized(); | ||
throw new TRPCError({ code: 'UNAUTHORIZED' }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likimng this syntax 👍🏻 |
||
} | ||
return ctx.user; | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why no 405 METHOD_NOT_ALLOWED?
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.
It's removed now anyway :)