@quilted/create 0.2.27 → 0.2.28

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 (28) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.esnext +3 -3
  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 +3 -3
  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 +1 -1
  12. package/templates/app-basic/features/start/{Start → tests}/Start.test.tsx +1 -1
  13. package/templates/app-basic/features/start.ts +1 -3
  14. package/templates/app-basic/server.tsx +5 -1
  15. package/templates/app-basic/tsconfig.json +3 -1
  16. package/templates/app-empty/tsconfig.json +5 -1
  17. package/templates/app-graphql/features/start/{Start → tests}/Start.test.tsx +2 -2
  18. package/templates/app-graphql/features/start.ts +1 -3
  19. package/templates/app-graphql/tsconfig.json +3 -1
  20. package/templates/app-trpc/features/start/{Start → tests}/Start.test.tsx +1 -1
  21. package/templates/app-trpc/tsconfig.json +3 -1
  22. /package/templates/app-basic/features/start/{Start/Start.module.css → Start.module.css} +0 -0
  23. /package/templates/app-basic/features/start/{Start/Start.tsx → Start.tsx} +0 -0
  24. /package/templates/app-graphql/features/start/{Start/Start.module.css → Start.module.css} +0 -0
  25. /package/templates/app-graphql/features/start/{Start/Start.tsx → Start.tsx} +0 -0
  26. /package/templates/app-graphql/features/start/{Start/StartQuery.graphql → StartQuery.graphql} +0 -0
  27. /package/templates/app-trpc/features/start/{Start/Start.module.css → Start.module.css} +0 -0
  28. /package/templates/app-trpc/features/start/{Start/Start.tsx → Start.tsx} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @quilted/create
2
2
 
3
+ ## 0.2.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [`55d5fee`](https://github.com/lemonmade/quilt/commit/55d5fee9235e2625adb8826e367d70fbc0925908) Thanks [@lemonmade](https://github.com/lemonmade)! - Simplify directory structure for template apps
8
+
9
+ - [`7119a8c`](https://github.com/lemonmade/quilt/commit/7119a8c9464bffe18fc37155fed9fd2188e24c78) Thanks [@lemonmade](https://github.com/lemonmade)! - Add type aliases for React and React DOM to app templates
10
+
11
+ - [`eaa1110`](https://github.com/lemonmade/quilt/commit/eaa1110d0ce583b3ca904e11cbf9bf098a820f1d) Thanks [@lemonmade](https://github.com/lemonmade)! - Make app context required in basic app template
12
+
3
13
  ## 0.2.27
4
14
 
5
15
  ### Patch Changes
@@ -2,9 +2,9 @@ import { __exports as out } from '../../../../../../../_virtual/index5.esnext';
2
2
  import './providers/async.esnext';
3
3
  import './providers/sync.esnext';
4
4
  import './settings.esnext';
5
- import { __exports as settings } from '../../../../../../../_virtual/settings3.esnext';
6
- import { __exports as async$1 } from '../../../../../../../_virtual/async4.esnext';
7
- import { __exports as sync$1 } from '../../../../../../../_virtual/sync4.esnext';
5
+ import { __exports as settings } from '../../../../../../../_virtual/settings2.esnext';
6
+ import { __exports as async$1 } from '../../../../../../../_virtual/async3.esnext';
7
+ import { __exports as sync$1 } from '../../../../../../../_virtual/sync3.esnext';
8
8
 
9
9
  Object.defineProperty(out, "__esModule", { value: true });
10
10
  out.statSync = out.stat = out.Settings = void 0;
@@ -1,4 +1,4 @@
1
- import { __exports as async } from '../../../../../../../../_virtual/async4.esnext';
1
+ import { __exports as async } from '../../../../../../../../_virtual/async3.esnext';
2
2
 
3
3
  Object.defineProperty(async, "__esModule", { value: true });
4
4
  async.read = void 0;
@@ -1,4 +1,4 @@
1
- import { __exports as sync } from '../../../../../../../../_virtual/sync4.esnext';
1
+ import { __exports as sync } from '../../../../../../../../_virtual/sync3.esnext';
2
2
 
3
3
  Object.defineProperty(sync, "__esModule", { value: true });
4
4
  sync.read = void 0;
@@ -1,4 +1,4 @@
1
- import { __exports as settings } from '../../../../../../../_virtual/settings3.esnext';
1
+ import { __exports as settings } from '../../../../../../../_virtual/settings2.esnext';
2
2
  import './adapters/fs.esnext';
3
3
  import { __exports as fs$1 } from '../../../../../../../_virtual/fs2.esnext';
4
4
 
@@ -3,10 +3,10 @@ import './providers/async.esnext';
3
3
  import './providers/stream.esnext';
4
4
  import './providers/sync.esnext';
5
5
  import './settings.esnext';
6
- import { __exports as settings } from '../../../../../../../_virtual/settings2.esnext';
7
- import { __exports as async } from '../../../../../../../_virtual/async3.esnext';
6
+ import { __exports as settings } from '../../../../../../../_virtual/settings3.esnext';
7
+ import { __exports as async } from '../../../../../../../_virtual/async4.esnext';
8
8
  import { __exports as stream } from '../../../../../../../_virtual/stream4.esnext';
9
- import { __exports as sync } from '../../../../../../../_virtual/sync3.esnext';
9
+ import { __exports as sync } from '../../../../../../../_virtual/sync4.esnext';
10
10
 
11
11
  Object.defineProperty(out, "__esModule", { value: true });
12
12
  out.Settings = out.walkStream = out.walkSync = out.walk = void 0;
@@ -1,4 +1,4 @@
1
- import { __exports as async } from '../../../../../../../../_virtual/async3.esnext';
1
+ import { __exports as async } from '../../../../../../../../_virtual/async4.esnext';
2
2
  import '../readers/async.esnext';
3
3
  import { __exports as async$1 } from '../../../../../../../../_virtual/async5.esnext';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as sync } from '../../../../../../../../_virtual/sync3.esnext';
1
+ import { __exports as sync } from '../../../../../../../../_virtual/sync4.esnext';
2
2
  import '../readers/sync.esnext';
3
3
  import { __exports as sync$1 } from '../../../../../../../../_virtual/sync5.esnext';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as settings } from '../../../../../../../_virtual/settings2.esnext';
1
+ import { __exports as settings } from '../../../../../../../_virtual/settings3.esnext';
2
2
  import path__default from 'node:path';
3
3
  import '../../../../../@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.esnext';
4
4
  import { __exports as out } from '../../../../../../../_virtual/index6.esnext';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quilted/create",
3
3
  "type": "module",
4
- "version": "0.2.27",
4
+ "version": "0.2.28",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -14,7 +14,7 @@ import {
14
14
  } from './shared/context.ts';
15
15
 
16
16
  export interface AppProps {
17
- context?: AppContextType;
17
+ context: AppContextType;
18
18
  }
19
19
 
20
20
  // The root component for your application. You will typically render any
@@ -2,7 +2,7 @@ import {describe, it, expect} from 'vitest';
2
2
 
3
3
  import {renderApp} from '~/tests/render.ts';
4
4
 
5
- import Start from './Start.tsx';
5
+ import Start from '../Start.tsx';
6
6
 
7
7
  describe('<Start />', () => {
8
8
  it('includes a welcome message', async () => {
@@ -1,5 +1,3 @@
1
1
  import {AsyncComponent} from '@quilted/quilt/async';
2
2
 
3
- export const Start = AsyncComponent.from(
4
- () => import('./start/Start/Start.tsx'),
5
- );
3
+ export const Start = AsyncComponent.from(() => import('./start/Start.tsx'));
@@ -3,6 +3,8 @@ import {RequestRouter} from '@quilted/quilt/request-router';
3
3
  import {renderToResponse} from '@quilted/quilt/server';
4
4
  import {BrowserAssets} from 'quilt:module/assets';
5
5
 
6
+ import type {AppContext} from '~/shared/context.ts';
7
+
6
8
  import {App} from './App.tsx';
7
9
 
8
10
  const router = new RequestRouter();
@@ -10,7 +12,9 @@ const assets = new BrowserAssets();
10
12
 
11
13
  // For all GET requests, render our React application.
12
14
  router.get(async (request) => {
13
- const response = await renderToResponse(<App />, {
15
+ const context = {} satisfies AppContext;
16
+
17
+ const response = await renderToResponse(<App context={context} />, {
14
18
  request,
15
19
  assets,
16
20
  });
@@ -5,7 +5,9 @@
5
5
  "jsxImportSource": "preact",
6
6
  "paths": {
7
7
  "~/shared/*": ["./shared/*"],
8
- "~/tests/*": ["./tests/*"]
8
+ "~/tests/*": ["./tests/*"],
9
+ "react": ["./node_modules/preact/compat"],
10
+ "react-dom": ["./node_modules/preact/compat"]
9
11
  }
10
12
  },
11
13
  "include": ["**/*"],
@@ -2,7 +2,11 @@
2
2
  "extends": "@quilted/typescript/tsconfig.project.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "build/typescript",
5
- "jsxImportSource": "preact"
5
+ "jsxImportSource": "preact",
6
+ "paths": {
7
+ "react": ["./node_modules/preact/compat"],
8
+ "react-dom": ["./node_modules/preact/compat"]
9
+ }
6
10
  },
7
11
  "include": ["**/*"],
8
12
  "exclude": ["build"],
@@ -3,8 +3,8 @@ import {describe, it, expect} from 'vitest';
3
3
  import {renderApp} from '~/tests/render.ts';
4
4
  import {fillGraphQL, GraphQLController} from '~/tests/graphql.ts';
5
5
 
6
- import Start from './Start.tsx';
7
- import startQuery from './StartQuery.graphql';
6
+ import Start from '../Start.tsx';
7
+ import startQuery from '../StartQuery.graphql';
8
8
 
9
9
  describe('<Start />', () => {
10
10
  it('welcomes the user with their name', async () => {
@@ -1,5 +1,3 @@
1
1
  import {AsyncComponent} from '@quilted/quilt/async';
2
2
 
3
- export const Start = AsyncComponent.from(
4
- () => import('./start/Start/Start.tsx'),
5
- );
3
+ export const Start = AsyncComponent.from(() => import('./start/Start.tsx'));
@@ -5,7 +5,9 @@
5
5
  "jsxImportSource": "preact",
6
6
  "paths": {
7
7
  "~/shared/*": ["./shared/*"],
8
- "~/tests/*": ["./tests/*"]
8
+ "~/tests/*": ["./tests/*"],
9
+ "react": ["./node_modules/preact/compat"],
10
+ "react-dom": ["./node_modules/preact/compat"]
9
11
  }
10
12
  },
11
13
  "include": ["**/*"],
@@ -2,7 +2,7 @@ import {describe, it, expect} from 'vitest';
2
2
 
3
3
  import {renderApp} from '~/tests/render.ts';
4
4
 
5
- import Start from './Start.tsx';
5
+ import Start from '../Start.tsx';
6
6
 
7
7
  describe('<Start />', () => {
8
8
  it('includes a welcome message', async () => {
@@ -5,7 +5,9 @@
5
5
  "jsxImportSource": "preact",
6
6
  "paths": {
7
7
  "~/shared/*": ["./shared/*"],
8
- "~/tests/*": ["./tests/*"]
8
+ "~/tests/*": ["./tests/*"],
9
+ "react": ["./node_modules/preact/compat"],
10
+ "react-dom": ["./node_modules/preact/compat"]
9
11
  }
10
12
  },
11
13
  "include": ["**/*"],