Skip to content

Commit

Permalink
release: 4.0.13 [skip ci]
Browse files Browse the repository at this point in the history
### [4.0.13](v4.0.12...v4.0.13) (2024-10-22)

#### 🪄 Fixes

* **src:** add support for [email protected] release ([edfe781](edfe781))
  • Loading branch information
Xunnamius committed Oct 22, 2024
1 parent b5e8267 commit b632d27
Show file tree
Hide file tree
Showing 11 changed files with 592 additions and 609 deletions.
1,113 changes: 563 additions & 550 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/functions/testApiHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ in a Next-like testing environment.

## Defined in

[index.ts:297](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L297)
[index.ts:292](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L292)
4 changes: 2 additions & 2 deletions docs/interfaces/NtarhInit.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ false

#### Defined in

[index.ts:141](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L141)
[index.ts:137](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L137)

***

Expand All @@ -64,4 +64,4 @@ one destructured parameter: `fetch`, which is equivalent to

#### Defined in

[index.ts:147](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L147)
[index.ts:143](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L143)
50 changes: 10 additions & 40 deletions docs/interfaces/NtarhInitAppRouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,17 @@ The parameters expected by `testApiHandler` when using `appHandler`.

### appHandler

> **appHandler**: `Omit`\<`AppRouteUserlandModule`, `"GET"` \| `"HEAD"` \| `"OPTIONS"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"PATCH"`\> & `object`
> **appHandler**: `Partial`\<`Omit`\<`AppRouteUserlandModule`, `"GET"` \| `"HEAD"` \| `"OPTIONS"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"PATCH"`\> & `object`\>
The actual App Router route handler under test. It should be an object
containing one or more async functions named for valid HTTP methods and/or
a valid configuration option. See [the Next.js
documentation](https://nextjs.org/docs/app/building-your-application/routing/route-handlers)
for details.

#### Type declaration

##### DELETE

> **DELETE**: `undefined` \| (`req`, `context`?) => `any`
##### GET

> **GET**: `undefined` \| (`req`, `context`?) => `any`
##### HEAD

> **HEAD**: `undefined` \| (`req`, `context`?) => `any`
##### OPTIONS

> **OPTIONS**: `undefined` \| (`req`, `context`?) => `any`
##### PATCH

> **PATCH**: `undefined` \| (`req`, `context`?) => `any`
##### POST

> **POST**: `undefined` \| (`req`, `context`?) => `any`
##### PUT

> **PUT**: `undefined` \| (`req`, `context`?) => `any`
#### Defined in

[index.ts:164](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L164)
[index.ts:163](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L163)

***

Expand All @@ -70,7 +40,7 @@ for details.
#### Defined in

[index.ts:179](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L179)
[index.ts:174](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L174)

***

Expand All @@ -88,7 +58,7 @@ once.

#### Defined in

[index.ts:189](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L189)
[index.ts:184](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L184)

***

Expand All @@ -114,7 +84,7 @@ is handled by `Request` automatically.

#### Defined in

[index.ts:199](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L199)
[index.ts:194](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L194)

***

Expand Down Expand Up @@ -143,7 +113,7 @@ false

#### Defined in

[index.ts:141](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L141)
[index.ts:137](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L137)

***

Expand All @@ -169,7 +139,7 @@ NextRequest(returnedRequest, { ... })`.

#### Defined in

[index.ts:212](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L212)
[index.ts:207](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L207)

***

Expand All @@ -196,7 +166,7 @@ unhandled exception occurs _and_ `rejectOnHandlerError` is `true`.

#### Defined in

[index.ts:225](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L225)
[index.ts:220](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L220)

***

Expand Down Expand Up @@ -224,7 +194,7 @@ one destructured parameter: `fetch`, which is equivalent to

#### Defined in

[index.ts:147](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L147)
[index.ts:143](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L143)

***

Expand All @@ -237,4 +207,4 @@ NextRequest('your-url', request)`

#### Defined in

[index.ts:230](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L230)
[index.ts:225](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L225)
18 changes: 9 additions & 9 deletions docs/interfaces/NtarhInitPagesRouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The parameters expected by `testApiHandler` when using `pagesHandler`.
#### Defined in

[index.ts:248](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L248)
[index.ts:243](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L243)

***

Expand All @@ -42,7 +42,7 @@ will have a typed result.

#### Defined in

[index.ts:247](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L247)
[index.ts:242](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L242)

***

Expand All @@ -60,7 +60,7 @@ once.

#### Defined in

[index.ts:258](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L258)
[index.ts:253](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L253)

***

Expand All @@ -86,7 +86,7 @@ is handled automatically.

#### Defined in

[index.ts:268](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L268)
[index.ts:263](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L263)

***

Expand Down Expand Up @@ -115,7 +115,7 @@ false

#### Defined in

[index.ts:141](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L141)
[index.ts:137](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L137)

***

Expand All @@ -139,7 +139,7 @@ lowercase.**

#### Defined in

[index.ts:279](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L279)
[index.ts:274](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L274)

***

Expand All @@ -160,7 +160,7 @@ to edit the response _before_ it's injected into the handler.

#### Defined in

[index.ts:284](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L284)
[index.ts:279](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L279)

***

Expand Down Expand Up @@ -188,7 +188,7 @@ one destructured parameter: `fetch`, which is equivalent to

#### Defined in

[index.ts:147](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L147)
[index.ts:143](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L143)

***

Expand All @@ -201,4 +201,4 @@ one destructured parameter: `fetch`, which is equivalent to

#### Defined in

[index.ts:289](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L289)
[index.ts:284](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L284)
2 changes: 1 addition & 1 deletion docs/type-aliases/FetchReturnType.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

## Defined in

[index.ts:118](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L118)
[index.ts:114](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L114)
2 changes: 1 addition & 1 deletion docs/type-aliases/Promisable.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

## Defined in

[index.ts:113](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L113)
[index.ts:109](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L109)
2 changes: 1 addition & 1 deletion docs/variables/$isPatched.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

## Defined in

[index.ts:68](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L68)
[index.ts:68](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L68)
2 changes: 1 addition & 1 deletion docs/variables/$originalGlobalFetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

## Defined in

[index.ts:63](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L63)
[index.ts:63](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L63)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-test-api-route-handler",
"version": "4.0.12",
"version": "4.0.13",
"description": "Confidently unit and integration test your Next.js API routes/handlers in an isolated Next.js-like environment",
"keywords": [
"api",
Expand Down

0 comments on commit b632d27

Please sign in to comment.