@theholocron/holocron-config 7.28.1 → 7.29.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.
@@ -1,2 +1,2 @@
1
- import { t as nextjs } from "../nextjs-D1E4Gf4-.js";
1
+ import { t as nextjs } from "../nextjs-DfhjuPT3.js";
2
2
  export { nextjs };
@@ -1,23 +1,2 @@
1
- import { ComposedPreset } from "@theholocron/cli";
2
- //#region configs/react.d.ts
3
- /**
4
- * Preset for single-package React/Vite application repos. Includes Storybook,
5
- * interaction tests, Knip + Lighthouse audit, and UI required checks.
6
- * Does NOT include Vercel deployment or Cypress user-flow — add nextjs() for those.
7
- *
8
- * @example
9
- * const preset = react();
10
- * export default defineConfig({
11
- * ...preset,
12
- * repo: { ...preset.repo, name: "theholocron/my-app", topics: ["react", "vite"] },
13
- * workflows: [
14
- * ...preset.workflows,
15
- * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } } },
16
- * "sync",
17
- * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
18
- * ],
19
- * });
20
- */
21
- declare function react(): ComposedPreset;
22
- //#endregion
23
- export { react };
1
+ import { n as ReactOptions, t as react } from "../react-DKXFl0ZG.js";
2
+ export { type ReactOptions, react };
@@ -1,28 +1,27 @@
1
1
  import { t as node } from "../node-3iHN9DIf.js";
2
2
  import { t as typecheck } from "../typecheck-epaimGtp.js";
3
- import { t as react$1 } from "../react-Pm9PjGpV.js";
3
+ import { t as react$1 } from "../react-hLw4lgas.js";
4
4
  import { compose } from "@theholocron/cli";
5
5
  //#region configs/react.ts
6
6
  /**
7
7
  * Preset for single-package React/Vite application repos. Includes Storybook,
8
8
  * interaction tests, Knip + Lighthouse audit, and UI required checks.
9
- * Does NOT include Vercel deployment or Cypress user-flow — add nextjs() for those.
9
+ *
10
+ * Pass `test` overrides to merge repo-specific options (e.g. run-chromatic)
11
+ * into the single test workflow entry so the sync tool sees one complete entry:
10
12
  *
11
13
  * @example
12
- * const preset = react();
14
+ * const preset = react({
15
+ * test: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } },
16
+ * });
13
17
  * export default defineConfig({
14
18
  * ...preset,
15
- * repo: { ...preset.repo, name: "theholocron/my-app", topics: ["react", "vite"] },
16
- * workflows: [
17
- * ...preset.workflows,
18
- * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } } },
19
- * "sync",
20
- * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
21
- * ],
19
+ * repo: { ...preset.repo, name: "theholocron/my-app" },
20
+ * workflows: [...preset.workflows, "sync", { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } }],
22
21
  * });
23
22
  */
24
- function react() {
25
- return compose(node(), typecheck(), react$1());
23
+ function react(options) {
24
+ return compose(node(), typecheck(), react$1(options));
26
25
  }
27
26
  //#endregion
28
27
  export { react };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { monorepo } from "./configs/monorepo.js";
2
2
  import { n as NextjsOptions, r as nextjs$1, t as nextjs } from "./nextjs-CaFUxEzC.js";
3
3
  import { NodeDocsPreset, NodeDocsSitePreset, nodeDocs, nodeDocsSite } from "./configs/node-docs.js";
4
4
  import { HolocronPreset as ComposedPreset$1 } from "./configs/node.js";
5
- import { react as react$1 } from "./configs/react.js";
5
+ import { n as ReactOptions, r as react$1, t as react } from "./react-DKXFl0ZG.js";
6
6
  import { Capability, Capability as Capability$1, ComposedPreset, compose } from "@theholocron/cli";
7
7
  //#region capabilities/node.d.ts
8
8
  /**
@@ -44,15 +44,6 @@ interface AuditOptions {
44
44
  */
45
45
  declare function audit({ knip, performance, lighthouseConfig }?: AuditOptions): Capability$1;
46
46
  //#endregion
47
- //#region capabilities/react.d.ts
48
- /**
49
- * Adds React/Storybook UI testing and browser runtime config.
50
- * Contributes: secrets provider, browser runtime property, Storybook + interaction
51
- * test jobs, audit with Knip + Lighthouse, and UI required checks.
52
- * Requires: node, typecheck
53
- */
54
- declare function react(): Capability$1;
55
- //#endregion
56
47
  //#region capabilities/monorepo.d.ts
57
48
  /**
58
49
  * Adjusts a repo to be a monorepo — sets uses_external_packages: true
@@ -64,4 +55,4 @@ declare function react(): Capability$1;
64
55
  */
65
56
  declare function monorepo$1(): Capability$1;
66
57
  //#endregion
67
- export { type AuditOptions, type Capability, type ComposedPreset, type ComposedPreset$1 as HolocronPreset, type NextjsOptions, type NodeDocsPreset, type NodeDocsSitePreset, audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactPreset, typecheck };
58
+ export { type AuditOptions, type Capability, type ComposedPreset, type ComposedPreset$1 as HolocronPreset, type NextjsOptions, type NodeDocsPreset, type NodeDocsSitePreset, type ReactOptions, audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactCapability, typecheck };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { t as node } from "./node-3iHN9DIf.js";
2
2
  import { t as typecheck } from "./typecheck-epaimGtp.js";
3
3
  import { n as nodeDocsSite, r as docs, t as nodeDocs } from "./node-docs-BW6pdsNO.js";
4
- import { t as react } from "./react-Pm9PjGpV.js";
5
- import { n as nextjs$1, t as nextjs } from "./nextjs-D1E4Gf4-.js";
6
- import { react as react$1 } from "./configs/react.js";
4
+ import { t as react$1 } from "./react-hLw4lgas.js";
5
+ import { n as nextjs$1, t as nextjs } from "./nextjs-DfhjuPT3.js";
6
+ import { react } from "./configs/react.js";
7
7
  import { monorepo } from "./configs/monorepo.js";
8
8
  import { compose } from "@theholocron/cli";
9
9
  //#region capabilities/audit.ts
@@ -44,4 +44,4 @@ function monorepo$1() {
44
44
  };
45
45
  }
46
46
  //#endregion
47
- export { audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactPreset, typecheck };
47
+ export { audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactCapability, typecheck };
@@ -1,6 +1,6 @@
1
1
  import { t as node } from "./node-3iHN9DIf.js";
2
2
  import { t as typecheck } from "./typecheck-epaimGtp.js";
3
- import { t as react } from "./react-Pm9PjGpV.js";
3
+ import { t as react } from "./react-hLw4lgas.js";
4
4
  import { compose } from "@theholocron/cli";
5
5
  //#region capabilities/nextjs.ts
6
6
  /**
@@ -0,0 +1,42 @@
1
+ import { Capability, ComposedPreset } from "@theholocron/cli";
2
+ //#region capabilities/react.d.ts
3
+ interface ReactOptions {
4
+ /** Extra `with:` inputs merged into the `test` workflow entry (e.g. run-chromatic). */
5
+ test?: Record<string, unknown>;
6
+ }
7
+ /**
8
+ * Adds React/Storybook UI testing and browser runtime config.
9
+ * Contributes: secrets provider, browser runtime property, Storybook + interaction
10
+ * test jobs, audit with Knip + Lighthouse, and UI required checks.
11
+ * Requires: node, typecheck
12
+ *
13
+ * Pass `test` overrides to merge repo-specific options into the single test
14
+ * workflow entry so the sync tool sees one complete entry rather than two
15
+ * conflicting ones:
16
+ *
17
+ * @example
18
+ * compose(node(), typecheck(), react({ test: { "run-chromatic": { projects: [...] } } }))
19
+ */
20
+ declare function react$1({ test: testOverrides }?: ReactOptions): Capability;
21
+ //#endregion
22
+ //#region configs/react.d.ts
23
+ /**
24
+ * Preset for single-package React/Vite application repos. Includes Storybook,
25
+ * interaction tests, Knip + Lighthouse audit, and UI required checks.
26
+ *
27
+ * Pass `test` overrides to merge repo-specific options (e.g. run-chromatic)
28
+ * into the single test workflow entry so the sync tool sees one complete entry:
29
+ *
30
+ * @example
31
+ * const preset = react({
32
+ * test: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } },
33
+ * });
34
+ * export default defineConfig({
35
+ * ...preset,
36
+ * repo: { ...preset.repo, name: "theholocron/my-app" },
37
+ * workflows: [...preset.workflows, "sync", { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } }],
38
+ * });
39
+ */
40
+ declare function react(options?: ReactOptions): ComposedPreset;
41
+ //#endregion
42
+ export { ReactOptions as n, react$1 as r, react as t };
@@ -4,8 +4,15 @@
4
4
  * Contributes: secrets provider, browser runtime property, Storybook + interaction
5
5
  * test jobs, audit with Knip + Lighthouse, and UI required checks.
6
6
  * Requires: node, typecheck
7
+ *
8
+ * Pass `test` overrides to merge repo-specific options into the single test
9
+ * workflow entry so the sync tool sees one complete entry rather than two
10
+ * conflicting ones:
11
+ *
12
+ * @example
13
+ * compose(node(), typecheck(), react({ test: { "run-chromatic": { projects: [...] } } }))
7
14
  */
8
- function react() {
15
+ function react({ test: testOverrides = {} } = {}) {
9
16
  return {
10
17
  id: "react",
11
18
  requires: ["node", "typecheck"],
@@ -26,7 +33,8 @@ function react() {
26
33
  with: {
27
34
  "run-unit": false,
28
35
  "run-storybook": true,
29
- "run-interaction": true
36
+ "run-interaction": true,
37
+ ...testOverrides
30
38
  }
31
39
  }],
32
40
  requiredChecks: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-config",
3
- "version": "7.28.1",
3
+ "version": "7.29.0",
4
4
  "description": "Shareable holocron configuration presets for theholocron repositories.",
5
5
  "homepage": "https://github.com/theholocron/configs/tree/main/packages/holocron-config#readme",
6
6
  "bugs": "https://github.com/theholocron/configs/issues",
@@ -23,8 +23,8 @@
23
23
  "typescript": "^5.9.3",
24
24
  "vitest": "^4.1.10",
25
25
  "@vitest/coverage-v8": "^4.1.10",
26
- "@theholocron/vitest-config": "7.28.1",
27
- "@theholocron/tsconfig": "7.28.1"
26
+ "@theholocron/tsconfig": "7.29.0",
27
+ "@theholocron/vitest-config": "7.29.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@theholocron/cli": ">=2.0.0-alpha.1"