@webpresso/agent-config 0.1.4 → 0.2.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.
Files changed (48) hide show
  1. package/dist/esm/stryker/index.d.ts +0 -1
  2. package/dist/esm/stryker/index.js +0 -1
  3. package/dist/esm/vitest/bun-sqlite-shim.d.ts +0 -1
  4. package/dist/esm/vitest/bun-sqlite-shim.js +0 -1
  5. package/dist/esm/vitest/consumer-package.d.ts +0 -1
  6. package/dist/esm/vitest/consumer-package.js +0 -1
  7. package/dist/esm/vitest/flakiness-reporter.d.ts +0 -1
  8. package/dist/esm/vitest/flakiness-reporter.js +0 -1
  9. package/dist/esm/vitest/generated-runtime-aliases.d.ts +0 -1
  10. package/dist/esm/vitest/generated-runtime-aliases.js +0 -1
  11. package/dist/esm/vitest/node-setup.d.ts +0 -1
  12. package/dist/esm/vitest/node-setup.js +0 -1
  13. package/dist/esm/vitest/node.d.ts +21 -1
  14. package/dist/esm/vitest/node.js +11 -6
  15. package/dist/esm/vitest/pool-defaults.d.ts +0 -1
  16. package/dist/esm/vitest/pool-defaults.js +0 -1
  17. package/dist/esm/vitest/react-router.d.ts +0 -1
  18. package/dist/esm/vitest/react-router.js +0 -1
  19. package/dist/esm/vitest/react-setup.d.ts +0 -1
  20. package/dist/esm/vitest/react-setup.js +0 -1
  21. package/dist/esm/vitest/react.d.ts +0 -1
  22. package/dist/esm/vitest/react.js +0 -1
  23. package/dist/esm/vitest/source-conditions.d.ts +54 -0
  24. package/dist/esm/vitest/source-conditions.js +51 -0
  25. package/dist/esm/vitest/version-guard.d.ts +0 -1
  26. package/dist/esm/vitest/version-guard.js +0 -1
  27. package/dist/esm/vitest/workers.d.ts +0 -1
  28. package/dist/esm/vitest/workers.js +0 -1
  29. package/dist/esm/workers-test/cloudflare-types.d.ts +0 -1
  30. package/dist/esm/workers-test/cloudflare-types.js +0 -1
  31. package/dist/esm/workers-test/durable-objects.d.ts +3 -2
  32. package/dist/esm/workers-test/durable-objects.js +1 -4
  33. package/dist/esm/workers-test/env.d.ts +1 -2
  34. package/dist/esm/workers-test/env.js +0 -1
  35. package/dist/esm/workers-test/execution-context.d.ts +0 -1
  36. package/dist/esm/workers-test/execution-context.js +0 -1
  37. package/dist/esm/workers-test/index.d.ts +0 -1
  38. package/dist/esm/workers-test/index.js +0 -1
  39. package/dist/esm/workers-test/requests.d.ts +0 -1
  40. package/dist/esm/workers-test/requests.js +0 -1
  41. package/dist/esm/workers-test/setup.d.ts +0 -1
  42. package/dist/esm/workers-test/setup.js +0 -1
  43. package/package.json +40 -17
  44. package/tsconfig/base.json +0 -37
  45. package/tsconfig/cloudflare.json +0 -10
  46. package/tsconfig/library.json +0 -16
  47. package/tsconfig/react-library.json +0 -10
  48. package/tsconfig/react-router.json +0 -10
@@ -132,4 +132,3 @@ export declare const typescriptWorkersBaseConfig: {
132
132
  incrementalFile: string;
133
133
  };
134
134
  export default baseConfig;
135
- //# sourceMappingURL=index.d.ts.map
@@ -125,4 +125,3 @@ export const typescriptWorkersBaseConfig = {
125
125
  vitest: { configFile: 'vitest.stryker.config.ts' },
126
126
  };
127
127
  export default baseConfig;
128
- //# sourceMappingURL=index.js.map
@@ -11,4 +11,3 @@
11
11
  */
12
12
  import Database from 'better-sqlite3';
13
13
  export { Database };
14
- //# sourceMappingURL=bun-sqlite-shim.d.ts.map
@@ -11,4 +11,3 @@
11
11
  */
12
12
  import Database from 'better-sqlite3';
13
13
  export { Database };
14
- //# sourceMappingURL=bun-sqlite-shim.js.map
@@ -1,4 +1,3 @@
1
1
  export declare const consumerPackageRoot: string | undefined;
2
2
  export declare const requireFromConsumer: NodeJS.Require;
3
3
  export declare function readConsumerPackageJson<T>(): T | undefined;
4
- //# sourceMappingURL=consumer-package.d.ts.map
@@ -60,4 +60,3 @@ export function readConsumerPackageJson() {
60
60
  return undefined;
61
61
  }
62
62
  }
63
- //# sourceMappingURL=consumer-package.js.map
@@ -4,4 +4,3 @@ export interface FlakinessReporterOptions {
4
4
  }
5
5
  export declare function createFlakinessReporter(options?: FlakinessReporterOptions): Reporter;
6
6
  export default createFlakinessReporter;
7
- //# sourceMappingURL=flakiness-reporter.d.ts.map
@@ -50,4 +50,3 @@ export function createFlakinessReporter(options = {}) {
50
50
  };
51
51
  }
52
52
  export default createFlakinessReporter;
53
- //# sourceMappingURL=flakiness-reporter.js.map
@@ -3,4 +3,3 @@ export declare const generatedRuntimeAliases: Array<{
3
3
  find: RegExp | string;
4
4
  replacement: string;
5
5
  }>;
6
- //# sourceMappingURL=generated-runtime-aliases.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export const generatedRuntimeDedupe = [];
2
2
  export const generatedRuntimeAliases = [];
3
- //# sourceMappingURL=generated-runtime-aliases.js.map
@@ -3,4 +3,3 @@
3
3
  * Suppresses console output for clean test runs
4
4
  */
5
5
  export declare const __nodeSetupModule = true;
6
- //# sourceMappingURL=node-setup.d.ts.map
@@ -13,4 +13,3 @@ global.console.error = noop;
13
13
  global.console.warn = noop;
14
14
  global.console.log = noop;
15
15
  export const __nodeSetupModule = true;
16
- //# sourceMappingURL=node-setup.js.map
@@ -12,6 +12,10 @@
12
12
  * ```
13
13
  */
14
14
  import type { UserWorkspaceConfig, ViteUserConfigExport } from 'vite-plus/test/config';
15
+ export type ResolveAliasEntry = {
16
+ find: string | RegExp;
17
+ replacement: string;
18
+ };
15
19
  export interface CreateNodeProjectsOptions {
16
20
  unitInclude?: string[];
17
21
  unitExclude?: string[];
@@ -20,6 +24,23 @@ export interface CreateNodeProjectsOptions {
20
24
  fileParallelism?: boolean;
21
25
  isolate?: boolean;
22
26
  testTimeout?: number;
27
+ /**
28
+ * Extra resolve aliases appended (after the built-ins) to BOTH the unit and
29
+ * integration projects. Lets a consumer inject repo-specific module rewrites
30
+ * without copying the canonical node config.
31
+ */
32
+ extraAlias?: readonly ResolveAliasEntry[];
33
+ /**
34
+ * Extra `server.deps.inline` entries merged (after the built-in webpresso
35
+ * inline) into BOTH projects, so the consumer's aliases apply to additional
36
+ * packages imported from node_modules.
37
+ */
38
+ extraInline?: readonly (string | RegExp)[];
39
+ /**
40
+ * Extra setup files appended to BOTH projects (the integration project keeps
41
+ * its built-in node-setup; extras run after it).
42
+ */
43
+ extraSetupFiles?: readonly string[];
23
44
  }
24
45
  /**
25
46
  * Create vitest projects for unit/integration test split.
@@ -40,4 +61,3 @@ export interface CreateNodeProjectsOptions {
40
61
  export declare function createNodeProjects(name: string, options?: CreateNodeProjectsOptions): UserWorkspaceConfig[];
41
62
  export declare const nodeConfig: ViteUserConfigExport;
42
63
  export default nodeConfig;
43
- //# sourceMappingURL=node.d.ts.map
@@ -60,16 +60,21 @@ export function createNodeProjects(name, options = {}) {
60
60
  const projectFileParallelism = options.fileParallelism;
61
61
  const projectIsolate = options.isolate;
62
62
  const projectTestTimeout = options.testTimeout;
63
+ const extraAlias = options.extraAlias ?? [];
64
+ const extraSetupFiles = options.extraSetupFiles ?? [];
63
65
  const sharedResolve = {
64
- alias: [...generatedRuntimeAliases, ...bunSqliteAlias],
66
+ alias: [...generatedRuntimeAliases, ...bunSqliteAlias, ...extraAlias],
65
67
  tsconfigPaths: true,
66
68
  };
69
+ const projectInline = {
70
+ deps: { inline: [...webpressoInline.deps.inline, ...(options.extraInline ?? [])] },
71
+ };
67
72
  return [
68
73
  {
69
74
  resolve: sharedResolve,
70
- server: webpressoInline,
75
+ server: projectInline,
71
76
  test: {
72
- server: webpressoInline,
77
+ server: projectInline,
73
78
  name: `${name}/unit`,
74
79
  globals: true,
75
80
  restoreMocks: true,
@@ -79,6 +84,7 @@ export function createNodeProjects(name, options = {}) {
79
84
  fileParallelism: projectFileParallelism,
80
85
  isolate: projectIsolate,
81
86
  ...(projectTestTimeout !== undefined && { testTimeout: projectTestTimeout }),
87
+ ...(extraSetupFiles.length > 0 && { setupFiles: [...extraSetupFiles] }),
82
88
  include: unitInclude,
83
89
  exclude: [
84
90
  '**/*.integration.test.ts',
@@ -90,7 +96,7 @@ export function createNodeProjects(name, options = {}) {
90
96
  },
91
97
  {
92
98
  resolve: sharedResolve,
93
- server: webpressoInline,
99
+ server: projectInline,
94
100
  test: {
95
101
  name: `${name}/integration`,
96
102
  globals: true,
@@ -104,7 +110,7 @@ export function createNodeProjects(name, options = {}) {
104
110
  execArgv: resolvedExecArgv,
105
111
  onConsoleLog: () => false,
106
112
  silent: process.env.VITEST_CONSOLE === '1' ? false : 'passed-only',
107
- setupFiles: [join(configDir, 'node-setup.js')],
113
+ setupFiles: [join(configDir, 'node-setup.js'), ...extraSetupFiles],
108
114
  include: integrationInclude,
109
115
  exclude: ['**/.stryker-tmp/**', 'node_modules/**'],
110
116
  reporters: ['default', createFlakinessReporter()],
@@ -177,4 +183,3 @@ export const nodeConfig = defineConfig({
177
183
  },
178
184
  });
179
185
  export default nodeConfig;
180
- //# sourceMappingURL=node.js.map
@@ -8,4 +8,3 @@ export declare const resolvedPool: string;
8
8
  export declare const resolvedMaxWorkers: number;
9
9
  export declare const resolvedMinWorkers: number;
10
10
  export declare const resolvedExecArgv: string[];
11
- //# sourceMappingURL=pool-defaults.d.ts.map
@@ -40,4 +40,3 @@ export const resolvedMinWorkers = forcedMinWorkers ?? 1;
40
40
  export const resolvedExecArgv = disableExecArgv || resolvedPool === 'threads' || isStryker
41
41
  ? []
42
42
  : ['--max-old-space-size=1536', '--no-experimental-webstorage'];
43
- //# sourceMappingURL=pool-defaults.js.map
@@ -19,4 +19,3 @@
19
19
  import type { ViteUserConfigExport } from 'vite-plus/test/config';
20
20
  export declare const reactRouterConfig: ViteUserConfigExport;
21
21
  export default reactRouterConfig;
22
- //# sourceMappingURL=react-router.d.ts.map
@@ -80,4 +80,3 @@ export const reactRouterConfig = defineConfig({
80
80
  },
81
81
  });
82
82
  export default reactRouterConfig;
83
- //# sourceMappingURL=react-router.js.map
@@ -10,4 +10,3 @@
10
10
  * See: https://react.dev/blog/2022/03/08/react-18-upgrade-guide
11
11
  */
12
12
  export declare const __reactSetupModule = true;
13
- //# sourceMappingURL=react-setup.d.ts.map
@@ -24,4 +24,3 @@ global.console.error = noop;
24
24
  global.console.warn = noop;
25
25
  global.console.log = noop;
26
26
  export const __reactSetupModule = true;
27
- //# sourceMappingURL=react-setup.js.map
@@ -19,4 +19,3 @@
19
19
  import type { ViteUserConfigExport } from 'vite-plus/test/config';
20
20
  export declare const reactConfig: ViteUserConfigExport;
21
21
  export default reactConfig;
22
- //# sourceMappingURL=react.d.ts.map
@@ -82,4 +82,3 @@ export const reactConfig = defineConfig({
82
82
  },
83
83
  });
84
84
  export default reactConfig;
85
- //# sourceMappingURL=react.js.map
@@ -0,0 +1,54 @@
1
+ /**
2
+ * `@webpresso/source` resolve-condition helpers for vitest.
3
+ *
4
+ * Webpresso packages publish a `@webpresso/source` export condition that points
5
+ * at raw TypeScript source. Tests must opt into that condition so they exercise
6
+ * source rather than built `dist/`. This module is the single canonical
7
+ * definition consumers merge into their vitest config — keep it free of any
8
+ * consumer-specific aliases.
9
+ *
10
+ * Usage:
11
+ * ```ts
12
+ * import { nodeConfig } from '@webpresso/agent-config/vitest/node'
13
+ * import { createWebpressoSourceResolveConfig } from '@webpresso/agent-config/vitest/source-conditions'
14
+ * import { mergeConfig } from 'vite-plus/test/config'
15
+ *
16
+ * export default mergeConfig(nodeConfig, createWebpressoSourceResolveConfig({ tsconfigPaths: true }))
17
+ * ```
18
+ */
19
+ export type WebpressoSourceAlias = {
20
+ find: string | RegExp;
21
+ replacement: string;
22
+ } | Record<string, string>;
23
+ export declare const webpressoSourceCondition: "@webpresso/source";
24
+ /**
25
+ * Vite client environments use top-level resolve conditions. Keep this list
26
+ * deliberately narrow: Vite still applies the built-in import/default matches
27
+ * for matching module types.
28
+ */
29
+ export declare const webpressoSourceResolveConditions: readonly ["@webpresso/source"];
30
+ /**
31
+ * Vitest's default node environment runs through Vite's SSR resolver. Official
32
+ * Vitest guidance requires custom package export/import conditions here rather
33
+ * than only under top-level resolve.conditions.
34
+ */
35
+ export declare const webpressoSourceSsrResolveConditions: readonly ["@webpresso/source", "module", "node", "development|production"];
36
+ export interface WebpressoSourceResolveOptions {
37
+ alias?: WebpressoSourceAlias[] | Record<string, string>;
38
+ dedupe?: string[];
39
+ tsconfigPaths?: boolean;
40
+ }
41
+ export interface WebpressoSourceResolveConfig {
42
+ resolve: {
43
+ conditions: string[];
44
+ tsconfigPaths?: boolean;
45
+ alias?: WebpressoSourceAlias[] | Record<string, string>;
46
+ dedupe?: string[];
47
+ };
48
+ ssr: {
49
+ resolve: {
50
+ conditions: string[];
51
+ };
52
+ };
53
+ }
54
+ export declare function createWebpressoSourceResolveConfig(options?: WebpressoSourceResolveOptions): WebpressoSourceResolveConfig;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * `@webpresso/source` resolve-condition helpers for vitest.
3
+ *
4
+ * Webpresso packages publish a `@webpresso/source` export condition that points
5
+ * at raw TypeScript source. Tests must opt into that condition so they exercise
6
+ * source rather than built `dist/`. This module is the single canonical
7
+ * definition consumers merge into their vitest config — keep it free of any
8
+ * consumer-specific aliases.
9
+ *
10
+ * Usage:
11
+ * ```ts
12
+ * import { nodeConfig } from '@webpresso/agent-config/vitest/node'
13
+ * import { createWebpressoSourceResolveConfig } from '@webpresso/agent-config/vitest/source-conditions'
14
+ * import { mergeConfig } from 'vite-plus/test/config'
15
+ *
16
+ * export default mergeConfig(nodeConfig, createWebpressoSourceResolveConfig({ tsconfigPaths: true }))
17
+ * ```
18
+ */
19
+ export const webpressoSourceCondition = '@webpresso/source';
20
+ /**
21
+ * Vite client environments use top-level resolve conditions. Keep this list
22
+ * deliberately narrow: Vite still applies the built-in import/default matches
23
+ * for matching module types.
24
+ */
25
+ export const webpressoSourceResolveConditions = [webpressoSourceCondition];
26
+ /**
27
+ * Vitest's default node environment runs through Vite's SSR resolver. Official
28
+ * Vitest guidance requires custom package export/import conditions here rather
29
+ * than only under top-level resolve.conditions.
30
+ */
31
+ export const webpressoSourceSsrResolveConditions = [
32
+ webpressoSourceCondition,
33
+ 'module',
34
+ 'node',
35
+ 'development|production',
36
+ ];
37
+ export function createWebpressoSourceResolveConfig(options = {}) {
38
+ return {
39
+ resolve: {
40
+ conditions: [...webpressoSourceResolveConditions],
41
+ ...(options.tsconfigPaths === undefined ? {} : { tsconfigPaths: options.tsconfigPaths }),
42
+ ...(options.alias ? { alias: options.alias } : {}),
43
+ ...(options.dedupe ? { dedupe: options.dedupe } : {}),
44
+ },
45
+ ssr: {
46
+ resolve: {
47
+ conditions: [...webpressoSourceSsrResolveConditions],
48
+ },
49
+ },
50
+ };
51
+ }
@@ -4,4 +4,3 @@ export declare const assertVitest4: ({ caller }?: {
4
4
  export declare const assertNonWorkersVitest4: ({ caller }?: {
5
5
  caller?: string;
6
6
  }) => void;
7
- //# sourceMappingURL=version-guard.d.ts.map
@@ -39,4 +39,3 @@ export const assertVitest4 = ({ caller } = {}) => {
39
39
  export const assertNonWorkersVitest4 = ({ caller } = {}) => {
40
40
  assertVitest4({ caller: caller ?? 'Non-workers config' });
41
41
  };
42
- //# sourceMappingURL=version-guard.js.map
@@ -25,4 +25,3 @@ export declare const workersConfig: {
25
25
  };
26
26
  };
27
27
  export default workersConfig;
28
- //# sourceMappingURL=workers.d.ts.map
@@ -41,4 +41,3 @@ export const workersConfig = defineConfig({
41
41
  },
42
42
  });
43
43
  export default workersConfig;
44
- //# sourceMappingURL=workers.js.map
@@ -27,4 +27,3 @@ export interface ExecutionContext<Props = unknown> {
27
27
  passThroughOnException(): void;
28
28
  props: Props;
29
29
  }
30
- //# sourceMappingURL=cloudflare-types.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=cloudflare-types.js.map
@@ -34,7 +34,9 @@ export declare class MockContainer {
34
34
  fetch: ReturnType<typeof vi.fn>;
35
35
  destroy: ReturnType<typeof vi.fn>;
36
36
  startAndWaitForPorts: ReturnType<typeof vi.fn>;
37
- getState: ReturnType<typeof vi.fn>;
37
+ getState: import("vitest").Mock<() => Promise<{
38
+ status: string;
39
+ }>>;
38
40
  }
39
41
  /**
40
42
  * Creates mock Cloudflare Workers runtime modules.
@@ -57,4 +59,3 @@ export declare function createCloudflareRuntimeMocks(): {
57
59
  Container: typeof MockContainer;
58
60
  };
59
61
  };
60
- //# sourceMappingURL=durable-objects.d.ts.map
@@ -40,9 +40,7 @@ export class MockContainer {
40
40
  fetch = vi.fn();
41
41
  destroy = vi.fn();
42
42
  startAndWaitForPorts = vi.fn();
43
- getState = vi
44
- .fn()
45
- .mockResolvedValue({ status: 'running' });
43
+ getState = vi.fn().mockResolvedValue({ status: 'running' });
46
44
  }
47
45
  // ============================================================================
48
46
  // Mock Factories
@@ -70,4 +68,3 @@ export function createCloudflareRuntimeMocks() {
70
68
  },
71
69
  };
72
70
  }
73
- //# sourceMappingURL=durable-objects.js.map
@@ -54,5 +54,4 @@ export declare function createMockHyperdrive(overrides?: Partial<Hyperdrive>): H
54
54
  * const env = createMockEnv<MyWorkerEnv>({ MY_API_KEY: 'test-key' })
55
55
  * ```
56
56
  */
57
- export declare function createMockEnv<T extends BaseWorkerEnv>(overrides?: Partial<T>): T;
58
- //# sourceMappingURL=env.d.ts.map
57
+ export declare function createMockEnv<T extends BaseWorkerEnv>(overrides?: Partial<BaseWorkerEnv & T>): BaseWorkerEnv & T;
@@ -71,4 +71,3 @@ export function createMockEnv(overrides = {}) {
71
71
  ...overrides,
72
72
  };
73
73
  }
74
- //# sourceMappingURL=env.js.map
@@ -18,4 +18,3 @@ export type MockExecutionContext = ExecutionContext<unknown> & {
18
18
  * ```
19
19
  */
20
20
  export declare function createMockExecutionContext(): MockExecutionContext;
21
- //# sourceMappingURL=execution-context.d.ts.map
@@ -19,4 +19,3 @@ export function createMockExecutionContext() {
19
19
  props: {},
20
20
  };
21
21
  }
22
- //# sourceMappingURL=execution-context.js.map
@@ -13,4 +13,3 @@ export { MockDurableObject, MockContainer, createCloudflareRuntimeMocks, } from
13
13
  export { createAuthenticatedRequest, createUnauthenticatedRequest, createCorsRequest, } from './requests.js';
14
14
  export type { WorkerTestOptions } from './setup.js';
15
15
  export { setupWorkerTest, suppressConsole } from './setup.js';
16
- //# sourceMappingURL=index.d.ts.map
@@ -12,4 +12,3 @@ export { MockDurableObject, MockContainer, createCloudflareRuntimeMocks, } from
12
12
  // Request helpers
13
13
  export { createAuthenticatedRequest, createUnauthenticatedRequest, createCorsRequest, } from './requests.js';
14
14
  export { setupWorkerTest, suppressConsole } from './setup.js';
15
- //# sourceMappingURL=index.js.map
@@ -41,4 +41,3 @@ export declare function createUnauthenticatedRequest(path: string, options?: Req
41
41
  * ```
42
42
  */
43
43
  export declare function createCorsRequest(path: string, origin: string, options?: RequestInit, baseUrl?: string): Request;
44
- //# sourceMappingURL=requests.d.ts.map
@@ -68,4 +68,3 @@ export function createCorsRequest(path, origin, options = {}, baseUrl = 'https:/
68
68
  ...options,
69
69
  });
70
70
  }
71
- //# sourceMappingURL=requests.js.map
@@ -60,4 +60,3 @@ export declare function setupWorkerTest<T extends BaseWorkerEnv>(envOverrides?:
60
60
  export declare function suppressConsole(): {
61
61
  restore: () => void;
62
62
  };
63
- //# sourceMappingURL=setup.d.ts.map
@@ -83,4 +83,3 @@ export function suppressConsole() {
83
83
  },
84
84
  };
85
85
  }
86
- //# sourceMappingURL=setup.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpresso/agent-config",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,24 +14,48 @@
14
14
  "registry": "https://registry.npmjs.org/",
15
15
  "access": "public"
16
16
  },
17
- "description": "Shared vitest, tsconfig, stryker, and workers-test config for webpresso consumers. Binary-free \u2014 pure test/config tooling.",
17
+ "description": "Shared vitest, tsconfig, stryker, and workers-test config for webpresso consumers. Binary-free pure test/config tooling.",
18
18
  "license": "Elastic-2.0",
19
19
  "type": "module",
20
20
  "sideEffects": false,
21
21
  "files": [
22
22
  "dist/esm",
23
- "tsconfig",
24
23
  "!dist/**/*.map",
25
24
  "!dist/**/*.test.*",
26
25
  "LICENSE",
27
26
  "README.md"
28
27
  ],
29
28
  "exports": {
30
- "./tsconfig/base.json": "./tsconfig/base.json",
31
- "./tsconfig/cloudflare.json": "./tsconfig/cloudflare.json",
32
- "./tsconfig/library.json": "./tsconfig/library.json",
33
- "./tsconfig/react-library.json": "./tsconfig/react-library.json",
34
- "./tsconfig/react-router.json": "./tsconfig/react-router.json",
29
+ "./tsconfig/base.json": {
30
+ "import": {
31
+ "types": "./dist/esm/tsconfig/base.json",
32
+ "default": "./dist/esm/tsconfig/base.json"
33
+ }
34
+ },
35
+ "./tsconfig/cloudflare.json": {
36
+ "import": {
37
+ "types": "./dist/esm/tsconfig/cloudflare.json",
38
+ "default": "./dist/esm/tsconfig/cloudflare.json"
39
+ }
40
+ },
41
+ "./tsconfig/library.json": {
42
+ "import": {
43
+ "types": "./dist/esm/tsconfig/library.json",
44
+ "default": "./dist/esm/tsconfig/library.json"
45
+ }
46
+ },
47
+ "./tsconfig/react-library.json": {
48
+ "import": {
49
+ "types": "./dist/esm/tsconfig/react-library.json",
50
+ "default": "./dist/esm/tsconfig/react-library.json"
51
+ }
52
+ },
53
+ "./tsconfig/react-router.json": {
54
+ "import": {
55
+ "types": "./dist/esm/tsconfig/react-router.json",
56
+ "default": "./dist/esm/tsconfig/react-router.json"
57
+ }
58
+ },
35
59
  "./vitest/node": {
36
60
  "import": {
37
61
  "types": "./dist/esm/vitest/node.d.ts",
@@ -74,6 +98,12 @@
74
98
  "default": "./dist/esm/vitest/flakiness-reporter.js"
75
99
  }
76
100
  },
101
+ "./vitest/source-conditions": {
102
+ "import": {
103
+ "types": "./dist/esm/vitest/source-conditions.d.ts",
104
+ "default": "./dist/esm/vitest/source-conditions.js"
105
+ }
106
+ },
77
107
  "./stryker": {
78
108
  "import": {
79
109
  "types": "./dist/esm/stryker/index.d.ts",
@@ -91,7 +121,7 @@
91
121
  "build": "tshy",
92
122
  "prepublishOnly": "vp run build",
93
123
  "typecheck": "tsc --noEmit",
94
- "lint:pkg": "publint && attw --pack ."
124
+ "lint:pkg": "publint && attw --pack . --profile esm-only"
95
125
  },
96
126
  "dependencies": {
97
127
  "@vitejs/plugin-react": "^6.0.2",
@@ -131,14 +161,6 @@
131
161
  "optional": true
132
162
  }
133
163
  },
134
- "devDependencies": {
135
- "@arethetypeswrong/cli": "catalog:",
136
- "@types/node": "catalog:",
137
- "better-sqlite3": "catalog:",
138
- "publint": "catalog:",
139
- "tshy": "catalog:",
140
- "typescript": "catalog:"
141
- },
142
164
  "tshy": {
143
165
  "dialects": [
144
166
  "esm"
@@ -160,6 +182,7 @@
160
182
  "./vitest/react-setup": "./src/vitest/react-setup.ts",
161
183
  "./vitest/react-setup.ts": "./src/vitest/react-setup.ts",
162
184
  "./vitest/flakiness-reporter": "./src/vitest/flakiness-reporter.ts",
185
+ "./vitest/source-conditions": "./src/vitest/source-conditions.ts",
163
186
  "./stryker": "./src/stryker/index.ts",
164
187
  "./workers-test": "./src/workers-test/index.ts"
165
188
  },
@@ -1,37 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Base",
4
- "compilerOptions": {
5
- "target": "ES2024",
6
- "lib": [
7
- "ES2024"
8
- ],
9
- "module": "ESNext",
10
- "moduleResolution": "Bundler",
11
- "resolveJsonModule": true,
12
- "allowImportingTsExtensions": true,
13
- "declaration": true,
14
- "declarationMap": true,
15
- "sourceMap": true,
16
- "strict": true,
17
- "noImplicitAny": true,
18
- "noUncheckedIndexedAccess": true,
19
- "noEmit": true,
20
- "esModuleInterop": true,
21
- "skipLibCheck": true,
22
- "forceConsistentCasingInFileNames": true,
23
- "allowSyntheticDefaultImports": true,
24
- "isolatedModules": true,
25
- "verbatimModuleSyntax": true,
26
- "types": [
27
- "node"
28
- ]
29
- },
30
- "exclude": [
31
- "node_modules",
32
- "dist",
33
- "build",
34
- ".next",
35
- ".react-router"
36
- ]
37
- }
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Cloudflare Workers",
4
- "extends": "@webpresso/agent-config/tsconfig/base.json",
5
- "compilerOptions": {
6
- "target": "ES2024",
7
- "lib": ["ES2024"],
8
- "moduleResolution": "Bundler"
9
- }
10
- }
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Library",
4
- "extends": "@webpresso/agent-config/tsconfig/base.json",
5
- "compilerOptions": {
6
- "declaration": true,
7
- "declarationMap": true,
8
- "outDir": "./dist",
9
- "rootDir": "./src",
10
- "paths": {
11
- "#*": ["./src/*"]
12
- }
13
- },
14
- "include": ["src/**/*.ts", "src/**/*.tsx"],
15
- "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
16
- }
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "React Library",
4
- "extends": "@webpresso/agent-config/tsconfig/library.json",
5
- "compilerOptions": {
6
- "lib": ["ES2024", "DOM", "DOM.Iterable"],
7
- "jsx": "react-jsx",
8
- "types": ["react", "react-dom"]
9
- }
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "React Router v7",
4
- "extends": "@webpresso/agent-config/tsconfig/react-library.json",
5
- "compilerOptions": {
6
- "lib": ["ES2024", "DOM", "DOM.Iterable"],
7
- "jsx": "react-jsx",
8
- "types": ["vite/client"]
9
- }
10
- }