@theholocron/holocron-config 7.25.5 → 7.26.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.
@@ -0,0 +1,28 @@
1
+ import { HolocronPreset } from "./node.js";
2
+ //#region configs/monorepo.d.ts
3
+ /**
4
+ * Extension that wraps any base preset with monorepo-specific overrides.
5
+ * Not a standalone preset — always takes a base (e.g. `monorepo(nextjs())`).
6
+ *
7
+ * Overrides: `uses_external_packages: true` (workspaces pull in many deps).
8
+ * Per-repo still provides: storybook-projects array, chromatic project
9
+ * definitions, workspace-specific required checks.
10
+ *
11
+ * @example
12
+ * const { repo, workflows, providers, org, domain } = monorepo(nextjs());
13
+ * export default defineConfig({
14
+ * org,
15
+ * domain,
16
+ * repo: { ...repo, name: "theholocron/my-monorepo" },
17
+ * workflows: [
18
+ * ...workflows,
19
+ * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "WEB", workingDir: "apps/web" }] } } },
20
+ * "sync",
21
+ * { name: "deploy", with: { docs: true, "storybook-projects": [{ name: "web", workingDir: "apps/web" }] } },
22
+ * ],
23
+ * providers,
24
+ * });
25
+ */
26
+ declare function monorepo<T extends HolocronPreset>(base: T): T;
27
+ //#endregion
28
+ export { monorepo };
@@ -0,0 +1,38 @@
1
+ //#region configs/monorepo.ts
2
+ /**
3
+ * Extension that wraps any base preset with monorepo-specific overrides.
4
+ * Not a standalone preset — always takes a base (e.g. `monorepo(nextjs())`).
5
+ *
6
+ * Overrides: `uses_external_packages: true` (workspaces pull in many deps).
7
+ * Per-repo still provides: storybook-projects array, chromatic project
8
+ * definitions, workspace-specific required checks.
9
+ *
10
+ * @example
11
+ * const { repo, workflows, providers, org, domain } = monorepo(nextjs());
12
+ * export default defineConfig({
13
+ * org,
14
+ * domain,
15
+ * repo: { ...repo, name: "theholocron/my-monorepo" },
16
+ * workflows: [
17
+ * ...workflows,
18
+ * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "WEB", workingDir: "apps/web" }] } } },
19
+ * "sync",
20
+ * { name: "deploy", with: { docs: true, "storybook-projects": [{ name: "web", workingDir: "apps/web" }] } },
21
+ * ],
22
+ * providers,
23
+ * });
24
+ */
25
+ function monorepo(base) {
26
+ return {
27
+ ...base,
28
+ repo: {
29
+ ...base.repo,
30
+ properties: {
31
+ ...base.repo.properties,
32
+ uses_external_packages: true
33
+ }
34
+ }
35
+ };
36
+ }
37
+ //#endregion
38
+ export { monorepo };
@@ -0,0 +1,29 @@
1
+ import { HolocronPreset } from "./node.js";
2
+ //#region configs/nextjs.d.ts
3
+ /**
4
+ * Preset for single-package Next.js application repos. Includes Vercel
5
+ * deployment, Lighthouse audit, Storybook + interaction + user-flow tests,
6
+ * and the Conclusion required checks. Per-repo still provides: chromatic
7
+ * project config, wait-on-url, storybook deploy config, sync workflow.
8
+ *
9
+ * @example
10
+ * const { repo, workflows, providers, org, domain } = nextjs();
11
+ * export default defineConfig({
12
+ * org,
13
+ * domain,
14
+ * repo: { ...repo, name: "theholocron/my-app", topics: ["nextjs"] },
15
+ * workflows: [
16
+ * ...workflows,
17
+ * { name: "test", with: { "run-chromatic": true, "wait-on-url": "http://localhost:3000" } },
18
+ * "sync",
19
+ * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
20
+ * ],
21
+ * providers,
22
+ * });
23
+ */
24
+ declare function nextjs(): HolocronPreset & {
25
+ org: string;
26
+ domain: string;
27
+ };
28
+ //#endregion
29
+ export { nextjs };
@@ -0,0 +1,79 @@
1
+ import { node } from "./node.js";
2
+ //#region configs/nextjs.ts
3
+ const REQUIRED_CHECKS = [
4
+ "Lint / Conclusion",
5
+ "Test / Conclusion",
6
+ "Typecheck / Conclusion",
7
+ "audit / Conclusion",
8
+ "codecov/patch",
9
+ "codecov/project",
10
+ "Storybook Publish",
11
+ "UI Review",
12
+ "UI Tests",
13
+ "lhci/url/"
14
+ ];
15
+ /**
16
+ * Preset for single-package Next.js application repos. Includes Vercel
17
+ * deployment, Lighthouse audit, Storybook + interaction + user-flow tests,
18
+ * and the Conclusion required checks. Per-repo still provides: chromatic
19
+ * project config, wait-on-url, storybook deploy config, sync workflow.
20
+ *
21
+ * @example
22
+ * const { repo, workflows, providers, org, domain } = nextjs();
23
+ * export default defineConfig({
24
+ * org,
25
+ * domain,
26
+ * repo: { ...repo, name: "theholocron/my-app", topics: ["nextjs"] },
27
+ * workflows: [
28
+ * ...workflows,
29
+ * { name: "test", with: { "run-chromatic": true, "wait-on-url": "http://localhost:3000" } },
30
+ * "sync",
31
+ * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
32
+ * ],
33
+ * providers,
34
+ * });
35
+ */
36
+ function nextjs() {
37
+ const base = node();
38
+ return {
39
+ ...base,
40
+ org: "theholocron",
41
+ domain: "theholocron.dev",
42
+ providers: {
43
+ ...base.providers,
44
+ deployment: "vercel",
45
+ secrets: "github"
46
+ },
47
+ repo: {
48
+ ...base.repo,
49
+ properties: {
50
+ ...base.repo.properties,
51
+ runtime_environment: "browser",
52
+ uses_external_packages: false
53
+ },
54
+ requiredChecks: REQUIRED_CHECKS
55
+ },
56
+ workflows: [
57
+ ...base.workflows,
58
+ {
59
+ name: "audit",
60
+ with: {
61
+ "run-knip": true,
62
+ "run-performance": true,
63
+ "lighthouse-config": "lighthouse.config.cjs"
64
+ }
65
+ },
66
+ {
67
+ name: "test",
68
+ with: {
69
+ "run-unit": false,
70
+ "run-storybook": true,
71
+ "run-interaction": true,
72
+ "run-user-flow": true
73
+ }
74
+ }
75
+ ]
76
+ };
77
+ }
78
+ //#endregion
79
+ export { nextjs };
@@ -0,0 +1,37 @@
1
+ import { HolocronPreset } from "./node.js";
2
+ import { HolocronConfig } from "@theholocron/cli";
3
+ //#region configs/node-docs.d.ts
4
+ interface NodeDocsPreset extends HolocronPreset {
5
+ org: string;
6
+ domain: string;
7
+ docs: NonNullable<HolocronConfig["docs"]>;
8
+ repo: HolocronPreset["repo"] & {
9
+ requiredChecks: string[];
10
+ };
11
+ }
12
+ /**
13
+ * Extends `node()` for repos that publish a documentation site and deploy
14
+ * previews via Cloudflare Pages. Adds org/domain, Cloudflare providers,
15
+ * deploy+preview workflow, and the Conclusion required checks.
16
+ *
17
+ * @example
18
+ * const { repo, workflows, providers, org, domain, docs } = nodeDocs();
19
+ * export default defineConfig({
20
+ * description: "...",
21
+ * homepage: "https://docs.theholocron.dev/my-lib/",
22
+ * org,
23
+ * domain,
24
+ * docs,
25
+ * repo: {
26
+ * ...repo,
27
+ * name: "theholocron/my-lib",
28
+ * topics: ["typescript"],
29
+ * requiredChecks: [...repo.requiredChecks, "codecov/patch/my-pkg"],
30
+ * },
31
+ * workflows: [...workflows, "audit", { name: "release", with: { "run-build": true } }, "sync"],
32
+ * providers: { ...providers, secrets: "github" },
33
+ * });
34
+ */
35
+ declare function nodeDocs(): NodeDocsPreset;
36
+ //#endregion
37
+ export { NodeDocsPreset, nodeDocs };
@@ -0,0 +1,63 @@
1
+ import { node } from "./node.js";
2
+ //#region configs/node-docs.ts
3
+ const REQUIRED_CHECKS = [
4
+ "Lint / Conclusion",
5
+ "Test / Conclusion",
6
+ "Typecheck / Conclusion",
7
+ "audit / Conclusion",
8
+ "codecov/patch",
9
+ "codecov/project"
10
+ ];
11
+ /**
12
+ * Extends `node()` for repos that publish a documentation site and deploy
13
+ * previews via Cloudflare Pages. Adds org/domain, Cloudflare providers,
14
+ * deploy+preview workflow, and the Conclusion required checks.
15
+ *
16
+ * @example
17
+ * const { repo, workflows, providers, org, domain, docs } = nodeDocs();
18
+ * export default defineConfig({
19
+ * description: "...",
20
+ * homepage: "https://docs.theholocron.dev/my-lib/",
21
+ * org,
22
+ * domain,
23
+ * docs,
24
+ * repo: {
25
+ * ...repo,
26
+ * name: "theholocron/my-lib",
27
+ * topics: ["typescript"],
28
+ * requiredChecks: [...repo.requiredChecks, "codecov/patch/my-pkg"],
29
+ * },
30
+ * workflows: [...workflows, "audit", { name: "release", with: { "run-build": true } }, "sync"],
31
+ * providers: { ...providers, secrets: "github" },
32
+ * });
33
+ */
34
+ function nodeDocs() {
35
+ const base = node();
36
+ return {
37
+ ...base,
38
+ org: "theholocron",
39
+ domain: "theholocron.dev",
40
+ docs: {
41
+ build: "workflow",
42
+ https: true
43
+ },
44
+ providers: {
45
+ ...base.providers,
46
+ deployment: "cloudflare",
47
+ dns: "cloudflare"
48
+ },
49
+ repo: {
50
+ ...base.repo,
51
+ requiredChecks: REQUIRED_CHECKS
52
+ },
53
+ workflows: [...base.workflows, {
54
+ name: "deploy",
55
+ with: {
56
+ docs: true,
57
+ preview: true
58
+ }
59
+ }]
60
+ };
61
+ }
62
+ //#endregion
63
+ export { nodeDocs };
@@ -2,8 +2,13 @@ import { HolocronConfig, RepoConfig } from "@theholocron/cli";
2
2
  //#region configs/node.d.ts
3
3
  interface HolocronPreset {
4
4
  providers: HolocronConfig["providers"];
5
- repo: Omit<RepoConfig, "name" | "requiredChecks">;
5
+ repo: Omit<RepoConfig, "name"> & {
6
+ requiredChecks?: string[];
7
+ };
6
8
  workflows: NonNullable<HolocronConfig["workflows"]>;
9
+ org?: string;
10
+ domain?: string;
11
+ docs?: HolocronConfig["docs"];
7
12
  }
8
13
  /**
9
14
  * Shared defaults for theholocron Node.js repositories.
@@ -0,0 +1,29 @@
1
+ import { HolocronPreset } from "./node.js";
2
+ //#region configs/react.d.ts
3
+ /**
4
+ * Preset for single-package React/Vite application repos. Identical to
5
+ * `nextjs()` except: no Vercel deployment (deploy target is per-repo) and
6
+ * no `run-user-flow` (Cypress not assumed). Per-repo still provides: chromatic
7
+ * project config, storybook deploy config, sync workflow.
8
+ *
9
+ * @example
10
+ * const { repo, workflows, providers, org, domain } = react();
11
+ * export default defineConfig({
12
+ * org,
13
+ * domain,
14
+ * repo: { ...repo, name: "theholocron/my-app", topics: ["react", "vite"] },
15
+ * workflows: [
16
+ * ...workflows,
17
+ * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: ".", buildScript: "build:storybook:chromatic" }] } } },
18
+ * "sync",
19
+ * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
20
+ * ],
21
+ * providers,
22
+ * });
23
+ */
24
+ declare function react(): HolocronPreset & {
25
+ org: string;
26
+ domain: string;
27
+ };
28
+ //#endregion
29
+ export { react };
@@ -0,0 +1,77 @@
1
+ import { node } from "./node.js";
2
+ //#region configs/react.ts
3
+ const REQUIRED_CHECKS = [
4
+ "Lint / Conclusion",
5
+ "Test / Conclusion",
6
+ "Typecheck / Conclusion",
7
+ "audit / Conclusion",
8
+ "codecov/patch",
9
+ "codecov/project",
10
+ "Storybook Publish",
11
+ "UI Review",
12
+ "UI Tests",
13
+ "lhci/url/"
14
+ ];
15
+ /**
16
+ * Preset for single-package React/Vite application repos. Identical to
17
+ * `nextjs()` except: no Vercel deployment (deploy target is per-repo) and
18
+ * no `run-user-flow` (Cypress not assumed). Per-repo still provides: chromatic
19
+ * project config, storybook deploy config, sync workflow.
20
+ *
21
+ * @example
22
+ * const { repo, workflows, providers, org, domain } = react();
23
+ * export default defineConfig({
24
+ * org,
25
+ * domain,
26
+ * repo: { ...repo, name: "theholocron/my-app", topics: ["react", "vite"] },
27
+ * workflows: [
28
+ * ...workflows,
29
+ * { name: "test", with: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: ".", buildScript: "build:storybook:chromatic" }] } } },
30
+ * "sync",
31
+ * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
32
+ * ],
33
+ * providers,
34
+ * });
35
+ */
36
+ function react() {
37
+ const base = node();
38
+ return {
39
+ ...base,
40
+ org: "theholocron",
41
+ domain: "theholocron.dev",
42
+ providers: {
43
+ ...base.providers,
44
+ secrets: "github"
45
+ },
46
+ repo: {
47
+ ...base.repo,
48
+ properties: {
49
+ ...base.repo.properties,
50
+ runtime_environment: "browser",
51
+ uses_external_packages: false
52
+ },
53
+ requiredChecks: REQUIRED_CHECKS
54
+ },
55
+ workflows: [
56
+ ...base.workflows,
57
+ {
58
+ name: "audit",
59
+ with: {
60
+ "run-knip": true,
61
+ "run-performance": true,
62
+ "lighthouse-config": "lighthouse.config.cjs"
63
+ }
64
+ },
65
+ {
66
+ name: "test",
67
+ with: {
68
+ "run-unit": false,
69
+ "run-storybook": true,
70
+ "run-interaction": true
71
+ }
72
+ }
73
+ ]
74
+ };
75
+ }
76
+ //#endregion
77
+ export { react };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,6 @@
1
1
  import { HolocronPreset, node } from "./configs/node.js";
2
- export { type HolocronPreset, node };
2
+ import { monorepo } from "./configs/monorepo.js";
3
+ import { nextjs } from "./configs/nextjs.js";
4
+ import { NodeDocsPreset, nodeDocs } from "./configs/node-docs.js";
5
+ import { react } from "./configs/react.js";
6
+ export { type HolocronPreset, type NodeDocsPreset, monorepo, nextjs, node, nodeDocs, react };
package/dist/index.js CHANGED
@@ -1,2 +1,6 @@
1
+ import { monorepo } from "./configs/monorepo.js";
1
2
  import { node } from "./configs/node.js";
2
- export { node };
3
+ import { nextjs } from "./configs/nextjs.js";
4
+ import { nodeDocs } from "./configs/node-docs.js";
5
+ import { react } from "./configs/react.js";
6
+ export { monorepo, nextjs, node, nodeDocs, react };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-config",
3
- "version": "7.25.5",
3
+ "version": "7.26.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/tsconfig": "7.25.5",
27
- "@theholocron/vitest-config": "7.25.5"
26
+ "@theholocron/tsconfig": "7.26.0",
27
+ "@theholocron/vitest-config": "7.26.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@theholocron/cli": ">=2.0.0-alpha.1"
@@ -40,6 +40,26 @@
40
40
  "import": "./dist/configs/node.js",
41
41
  "default": "./dist/configs/node.js"
42
42
  },
43
+ "./node-docs": {
44
+ "types": "./dist/configs/node-docs.d.ts",
45
+ "import": "./dist/configs/node-docs.js",
46
+ "default": "./dist/configs/node-docs.js"
47
+ },
48
+ "./nextjs": {
49
+ "types": "./dist/configs/nextjs.d.ts",
50
+ "import": "./dist/configs/nextjs.js",
51
+ "default": "./dist/configs/nextjs.js"
52
+ },
53
+ "./react": {
54
+ "types": "./dist/configs/react.d.ts",
55
+ "import": "./dist/configs/react.js",
56
+ "default": "./dist/configs/react.js"
57
+ },
58
+ "./monorepo": {
59
+ "types": "./dist/configs/monorepo.d.ts",
60
+ "import": "./dist/configs/monorepo.js",
61
+ "default": "./dist/configs/monorepo.js"
62
+ },
43
63
  "./package.json": "./package.json"
44
64
  },
45
65
  "files": [