@storybook/nextjs 9.0.13 → 9.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Mock } from '../../index.d-
|
|
1
|
+
import { M as Mock } from '../../index.d-ff220430.js';
|
|
2
2
|
import { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache';
|
|
3
3
|
export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache';
|
|
4
4
|
import { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Mock } from '../../index.d-
|
|
1
|
+
import { M as Mock } from '../../index.d-ff220430.js';
|
|
2
2
|
import { draftMode as draftMode$1 } from 'next/dist/server/request/draft-mode';
|
|
3
3
|
export * from 'next/dist/server/request/headers';
|
|
4
4
|
import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers';
|
|
@@ -135,8 +135,21 @@ interface MockContext<T extends Procedure> {
|
|
|
135
135
|
lastCall: Parameters<T> | undefined;
|
|
136
136
|
}
|
|
137
137
|
type Procedure = (...args: any[]) => any;
|
|
138
|
+
// pick a single function type from function overloads, unions, etc...
|
|
138
139
|
type NormalizedProcedure<T extends Procedure> = (...args: Parameters<T>) => ReturnType<T>;
|
|
139
|
-
|
|
140
|
+
/*
|
|
141
|
+
cf. https://typescript-eslint.io/rules/method-signature-style/
|
|
142
|
+
|
|
143
|
+
Typescript assignability is different between
|
|
144
|
+
{ foo: (f: T) => U } (this is "method-signature-style")
|
|
145
|
+
and
|
|
146
|
+
{ foo(f: T): U }
|
|
147
|
+
|
|
148
|
+
Jest uses the latter for `MockInstance.mockImplementation` etc... and it allows assignment such as:
|
|
149
|
+
const boolFn: Jest.Mock<() => boolean> = jest.fn<() => true>(() => true)
|
|
150
|
+
*/
|
|
151
|
+
/* eslint-disable ts/method-signature-style */
|
|
152
|
+
interface MockInstance<T extends Procedure = Procedure> extends Disposable {
|
|
140
153
|
/**
|
|
141
154
|
* Use it to return the name assigned to the mock with the `.mockName(name)` method. By default, it will return `vi.fn()`.
|
|
142
155
|
* @see https://vitest.dev/api/mock#getmockname
|
|
@@ -288,6 +301,7 @@ interface MockInstance<T extends Procedure = Procedure> {
|
|
|
288
301
|
*/
|
|
289
302
|
mockRejectedValueOnce(error: unknown): this;
|
|
290
303
|
}
|
|
304
|
+
/* eslint-enable ts/method-signature-style */
|
|
291
305
|
interface Mock<T extends Procedure = Procedure> extends MockInstance<T> {
|
|
292
306
|
new (...args: Parameters<T>): ReturnType<T>;
|
|
293
307
|
(...args: Parameters<T>): ReturnType<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/nextjs",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.14",
|
|
4
4
|
"description": "Storybook for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -143,9 +143,9 @@
|
|
|
143
143
|
"@babel/preset-typescript": "^7.24.1",
|
|
144
144
|
"@babel/runtime": "^7.24.4",
|
|
145
145
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
146
|
-
"@storybook/builder-webpack5": "9.0.
|
|
147
|
-
"@storybook/preset-react-webpack": "9.0.
|
|
148
|
-
"@storybook/react": "9.0.
|
|
146
|
+
"@storybook/builder-webpack5": "9.0.14",
|
|
147
|
+
"@storybook/preset-react-webpack": "9.0.14",
|
|
148
|
+
"@storybook/react": "9.0.14",
|
|
149
149
|
"@types/semver": "^7.3.4",
|
|
150
150
|
"babel-loader": "^9.1.3",
|
|
151
151
|
"css-loader": "^6.7.3",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"next": "^14.1.0 || ^15.0.0",
|
|
180
180
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
|
|
181
181
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
|
|
182
|
-
"storybook": "^9.0.
|
|
182
|
+
"storybook": "^9.0.14",
|
|
183
183
|
"webpack": "^5.0.0"
|
|
184
184
|
},
|
|
185
185
|
"peerDependenciesMeta": {
|