Skip to content

Commit b632d27

Browse files
committed
release: 4.0.13 [skip ci]
### [4.0.13](v4.0.12...v4.0.13) (2024-10-22) #### 🪄 Fixes * **src:** add support for [email protected] release ([edfe781](edfe781))
1 parent b5e8267 commit b632d27

File tree

11 files changed

+592
-609
lines changed

11 files changed

+592
-609
lines changed

CHANGELOG.md

Lines changed: 563 additions & 550 deletions
Large diffs are not rendered by default.

docs/functions/testApiHandler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ in a Next-like testing environment.
2626

2727
## Defined in
2828

29-
[index.ts:297](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L297)
29+
[index.ts:292](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L292)

docs/interfaces/NtarhInit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ false
4040

4141
#### Defined in
4242

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

4545
***
4646

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

6565
#### Defined in
6666

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

docs/interfaces/NtarhInitAppRouter.md

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,47 +20,17 @@ The parameters expected by `testApiHandler` when using `appHandler`.
2020

2121
### appHandler
2222

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

31-
#### Type declaration
32-
33-
##### DELETE
34-
35-
> **DELETE**: `undefined` \| (`req`, `context`?) => `any`
36-
37-
##### GET
38-
39-
> **GET**: `undefined` \| (`req`, `context`?) => `any`
40-
41-
##### HEAD
42-
43-
> **HEAD**: `undefined` \| (`req`, `context`?) => `any`
44-
45-
##### OPTIONS
46-
47-
> **OPTIONS**: `undefined` \| (`req`, `context`?) => `any`
48-
49-
##### PATCH
50-
51-
> **PATCH**: `undefined` \| (`req`, `context`?) => `any`
52-
53-
##### POST
54-
55-
> **POST**: `undefined` \| (`req`, `context`?) => `any`
56-
57-
##### PUT
58-
59-
> **PUT**: `undefined` \| (`req`, `context`?) => `any`
60-
6131
#### Defined in
6232

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

6535
***
6636

@@ -70,7 +40,7 @@ for details.
7040
7141
#### Defined in
7242

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

7545
***
7646

@@ -88,7 +58,7 @@ once.
8858

8959
#### Defined in
9060

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

9363
***
9464

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

11585
#### Defined in
11686

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

11989
***
12090

@@ -143,7 +113,7 @@ false
143113

144114
#### Defined in
145115

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

148118
***
149119

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

170140
#### Defined in
171141

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

174144
***
175145

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

197167
#### Defined in
198168

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

201171
***
202172

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

225195
#### Defined in
226196

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

229199
***
230200

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

238208
#### Defined in
239209

240-
[index.ts:230](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L230)
210+
[index.ts:225](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L225)

docs/interfaces/NtarhInitPagesRouter.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The parameters expected by `testApiHandler` when using `pagesHandler`.
2424
2525
#### Defined in
2626

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

2929
***
3030

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

4343
#### Defined in
4444

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

4747
***
4848

@@ -60,7 +60,7 @@ once.
6060

6161
#### Defined in
6262

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

6565
***
6666

@@ -86,7 +86,7 @@ is handled automatically.
8686

8787
#### Defined in
8888

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

9191
***
9292

@@ -115,7 +115,7 @@ false
115115

116116
#### Defined in
117117

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

120120
***
121121

@@ -139,7 +139,7 @@ lowercase.**
139139

140140
#### Defined in
141141

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

144144
***
145145

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

161161
#### Defined in
162162

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

165165
***
166166

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

189189
#### Defined in
190190

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

193193
***
194194

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

202202
#### Defined in
203203

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

docs/type-aliases/FetchReturnType.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616

1717
## Defined in
1818

19-
[index.ts:118](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L118)
19+
[index.ts:114](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L114)

docs/type-aliases/Promisable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616

1717
## Defined in
1818

19-
[index.ts:113](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L113)
19+
[index.ts:109](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L109)

docs/variables/$isPatched.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
## Defined in
1414

15-
[index.ts:68](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L68)
15+
[index.ts:68](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L68)

docs/variables/$originalGlobalFetch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
## Defined in
1414

15-
[index.ts:63](https://github.com/Xunnamius/next-test-api-route-handler/blob/3ef95f397021fadbf81b84daebcae192d5538bf2/src/index.ts#L63)
15+
[index.ts:63](https://github.com/Xunnamius/next-test-api-route-handler/blob/b5e826765efbbaf76eed548502c7b8c0b1bfcc0d/src/index.ts#L63)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)