@@ -10,11 +10,14 @@ Server code shared by `apps/web` and `apps/ai-gateway`, consumed from source.
1010 Storybook webpack alias map that specifier. There is no ` exports ` map:
1111 specifiers are extensionless, so resolution relies on those mappings.
1212- ` @/ ` in a consumer means that consumer's own ` src ` ; it never resolves here.
13- - Runtime code here must only import from this package. `pnpm --filter
14- @kilocode/web-shared typecheck` enforces that with ` tsconfig.lib.json`, which
15- excludes tests and does not map ` @/ ` at all.
16- - Tests run under the ` apps/web ` Jest config and may import ` apps/web ` modules
17- and test helpers through ` @/ ` , which ` tsconfig.json ` maps to ` apps/web/src ` .
13+ - Nothing here, tests included, imports from ` apps/web ` . `pnpm --filter
14+ @kilocode/web-shared typecheck` checks runtime code with ` tsconfig.lib.json`
15+ (no tests, no Jest types) and everything with ` tsconfig.json ` ; neither maps
16+ ` @/ ` . An oxlint rule also rejects ` @/ ` and relative ` apps/web ` imports.
17+ - Tests run under the ` apps/web ` Jest config, which provides the database
18+ setup. Shared test helpers live in ` src/tests/helpers ` and ` apps/web ` tests
19+ import them as ` @kilocode/web-shared/tests/helpers/<name> ` . A test case that
20+ needs ` apps/web ` code belongs in ` apps/web ` , next to that code.
1821- Declare every npm import in ` package.json ` with the same version as
1922 ` apps/web ` , including the optional peers that make pnpm resolve the same
2023 ` next ` and ` @sentry/nextjs ` instances as ` apps/web ` . Two instances of ` next `
0 commit comments