create-rsc-kit 0.47.0 → 0.49.0
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.
- package/dist/templates.d.ts +1 -4
- package/dist/templates.js +0 -8
- package/package.json +1 -1
package/dist/templates.d.ts
CHANGED
|
@@ -91,11 +91,8 @@ export declare const bunfig = "[test]\npreload = [\"./tests/preload.ts\"]\n";
|
|
|
91
91
|
* nothing on the server. Under bun test it is the real package, which throws
|
|
92
92
|
* on import, so an action or a route that carries the line would not be a
|
|
93
93
|
* function a test can call. Stubbed here, once.
|
|
94
|
-
*
|
|
95
|
-
* next/headers is answered the way the build answers it, so a flag read in
|
|
96
|
-
* an action or a page evaluates in a test as it does in the app.
|
|
97
94
|
*/
|
|
98
|
-
export declare const testPreload = "import { mock } from 'bun:test'\n\n// The build honours this import and resolves it to nothing on the server;\n// the real package throws when imported, which is what a test would hit.\nmock.module('server-only', () => ({}))\nmock.module('client-only', () => ({}))\n
|
|
95
|
+
export declare const testPreload = "import { mock } from 'bun:test'\n\n// The build honours this import and resolves it to nothing on the server;\n// the real package throws when imported, which is what a test would hit.\nmock.module('server-only', () => ({}))\nmock.module('client-only', () => ({}))\n";
|
|
99
96
|
export declare function smokeTest(o: Options): string;
|
|
100
97
|
export declare function page(o: Options): string;
|
|
101
98
|
export declare function counter(o: Options): string;
|
package/dist/templates.js
CHANGED
|
@@ -406,9 +406,6 @@ preload = ["./tests/preload.ts"]
|
|
|
406
406
|
* nothing on the server. Under bun test it is the real package, which throws
|
|
407
407
|
* on import, so an action or a route that carries the line would not be a
|
|
408
408
|
* function a test can call. Stubbed here, once.
|
|
409
|
-
*
|
|
410
|
-
* next/headers is answered the way the build answers it, so a flag read in
|
|
411
|
-
* an action or a page evaluates in a test as it does in the app.
|
|
412
409
|
*/
|
|
413
410
|
export const testPreload = `import { mock } from 'bun:test'
|
|
414
411
|
|
|
@@ -416,11 +413,6 @@ export const testPreload = `import { mock } from 'bun:test'
|
|
|
416
413
|
// the real package throws when imported, which is what a test would hit.
|
|
417
414
|
mock.module('server-only', () => ({}))
|
|
418
415
|
mock.module('client-only', () => ({}))
|
|
419
|
-
|
|
420
|
-
// The build answers next/headers with @rsc-kit/core/request, so a library
|
|
421
|
-
// written for Next - Vercel's flags/next - runs without Next. A test is not
|
|
422
|
-
// built: without this it finds Next's own, or nothing, and throws.
|
|
423
|
-
mock.module('next/headers', () => import('@rsc-kit/core/request'))
|
|
424
416
|
`;
|
|
425
417
|
export function smokeTest(o) {
|
|
426
418
|
const runner = o.host === 'node'
|