@quilted/create 0.3.3 → 0.3.5

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +230 -0
  2. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.esnext +1 -1
  3. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.esnext +1 -1
  4. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.esnext +1 -1
  5. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.esnext +1 -1
  6. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.esnext +1 -1
  7. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.esnext +1 -1
  8. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.esnext +1 -1
  9. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.esnext +1 -1
  10. package/package.json +1 -1
  11. package/templates/app-basic/App.tsx +8 -13
  12. package/templates/app-basic/browser.tsx +1 -1
  13. package/templates/app-basic/context/browser.ts +7 -3
  14. package/templates/app-basic/context/navigation.ts +6 -13
  15. package/templates/app-basic/context/preact.ts +9 -0
  16. package/templates/app-basic/context/server.ts +10 -3
  17. package/templates/app-basic/context/types.ts +20 -1
  18. package/templates/app-basic/package.json +1 -1
  19. package/templates/app-basic/tests/render/render.tsx +17 -22
  20. package/templates/app-basic/tests/render/types.ts +17 -13
  21. package/templates/app-basic/tests/render.ts +1 -1
  22. package/templates/app-empty/package.json +1 -1
  23. package/templates/app-graphql/App.tsx +10 -16
  24. package/templates/app-graphql/browser.tsx +1 -1
  25. package/templates/app-graphql/context/browser.ts +9 -13
  26. package/templates/app-graphql/context/navigation.ts +6 -13
  27. package/templates/app-graphql/context/preact.ts +9 -0
  28. package/templates/app-graphql/context/server.ts +13 -12
  29. package/templates/app-graphql/context/types.ts +23 -6
  30. package/templates/app-graphql/package.json +1 -1
  31. package/templates/app-graphql/tests/render/render.tsx +17 -37
  32. package/templates/app-graphql/tests/render/types.ts +20 -45
  33. package/templates/app-graphql/tests/render.ts +1 -1
  34. package/templates/app-trpc/App.tsx +15 -17
  35. package/templates/app-trpc/browser.tsx +1 -1
  36. package/templates/app-trpc/context/browser.ts +8 -4
  37. package/templates/app-trpc/context/navigation.ts +6 -13
  38. package/templates/app-trpc/context/preact.ts +9 -0
  39. package/templates/app-trpc/context/server.ts +11 -4
  40. package/templates/app-trpc/context/types.ts +27 -3
  41. package/templates/app-trpc/package.json +1 -1
  42. package/templates/app-trpc/tests/render/render.tsx +25 -29
  43. package/templates/app-trpc/tests/render/types.ts +17 -16
  44. package/templates/app-trpc/tests/render.ts +1 -1
@@ -1,39 +1,40 @@
1
- import type {TestRouter} from '@quilted/quilt/navigation/testing';
2
- import type {BrowserTestMock} from '@quilted/quilt/browser/testing';
1
+ import type {TestNavigation} from '@quilted/quilt/navigation/testing';
2
+ import type {TestBrowser} from '@quilted/quilt/browser/testing';
3
+ import type {Localization} from '@quilted/quilt/localize';
3
4
  import type {QueryClient} from '@tanstack/react-query';
4
5
 
5
- import type {AppContext} from '~/context/types.ts';
6
-
7
6
  export interface RenderOptions {
8
7
  /**
9
- * A custom router to use for this component test. You can use a
10
- * custom router to simulate a particular URL, and you can spy on
11
- * its navigation method to check that components navigate as
12
- * you expect.
8
+ * A custom navigation to use for this component test.
13
9
  */
14
- readonly router?: TestRouter;
10
+ readonly navigation?: TestNavigation;
15
11
 
16
12
  /**
17
13
  * A custom environment for this component test.
18
14
  */
19
- readonly browser?: BrowserTestMock;
15
+ readonly browser?: TestBrowser;
20
16
 
21
17
  /**
22
- * A custom locale to use for this component test.
18
+ * A custom localization instance to use for this component test.
23
19
  */
24
- readonly locale?: string;
20
+ readonly localization?: Localization;
25
21
  }
26
22
 
27
- export interface RenderContext extends AppContext {
23
+ export interface RenderContext {
28
24
  /**
29
- * The router used for this component test.
25
+ * The navigation used for this component test.
30
26
  */
31
- readonly navigation: {router: TestRouter};
27
+ readonly navigation: TestNavigation;
32
28
 
33
29
  /**
34
30
  * The browser environment for this component test.
35
31
  */
36
- readonly browser: BrowserTestMock;
32
+ readonly browser: TestBrowser;
33
+
34
+ /**
35
+ * The localization used for this component test.
36
+ */
37
+ readonly localization: Localization;
37
38
 
38
39
  /**
39
40
  * The react-query client used for this component test.
@@ -1,6 +1,6 @@
1
1
  import '@quilted/quilt/testing';
2
2
 
3
- export {TestRouter} from '@quilted/quilt/navigation/testing';
3
+ export {TestNavigation} from '@quilted/quilt/navigation/testing';
4
4
 
5
5
  export * from './render/types.ts';
6
6
  export {renderApp} from './render/render.tsx';