@theholocron/holocron-config 7.28.0 → 7.28.1

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.
package/README.md CHANGED
@@ -82,7 +82,7 @@ Pre-built `compose()` calls for the most common combinations. Import and spread
82
82
 
83
83
  ### `nodeDocs()`
84
84
 
85
- = `compose(node(), typecheck(), docs(), audit())`. For TypeScript library repos that publish a docs site.
85
+ = `compose(node(), typecheck(), docs())` + `"audit / Conclusion"` required check. For TypeScript library repos that publish a docs site. The audit workflow is repo-specific — add it explicitly: `workflows: [...preset.workflows, "audit", ...]`.
86
86
 
87
87
  ```ts
88
88
  import { defineConfig } from "@theholocron/cli";
@@ -4,11 +4,16 @@ type NodeDocsPreset = ComposedPreset;
4
4
  type NodeDocsSitePreset = ComposedPreset;
5
5
  /**
6
6
  * Preset for theholocron repos that are TypeScript libraries AND publish a
7
- * documentation site (e.g. configs, utils, holocron). Includes typecheck and
8
- * audit in addition to the docs deploy.
7
+ * documentation site (e.g. configs, utils, holocron, clients).
9
8
  *
10
- * For repos that are docs-only sites without TypeScript source to check,
11
- * use nodeDocsSite() instead.
9
+ * Includes the "audit / Conclusion" required check so branch protection works
10
+ * for repos that add the audit workflow explicitly. The workflow itself is
11
+ * intentionally left repo-specific — add it with your own options:
12
+ * workflows: [...preset.workflows, "audit", ...]
13
+ * // or with overrides:
14
+ * workflows: [...preset.workflows, { name: "audit", with: { "run-knip": true } }, ...]
15
+ *
16
+ * For docs-only sites without TypeScript source, use nodeDocsSite() instead.
12
17
  *
13
18
  * @example
14
19
  * const preset = nodeDocs();
@@ -24,8 +29,7 @@ type NodeDocsSitePreset = ComposedPreset;
24
29
  declare function nodeDocs(): NodeDocsPreset;
25
30
  /**
26
31
  * Preset for theholocron repos that are documentation-only sites with no
27
- * TypeScript source to check (e.g. skills, themes). Identical to nodeDocs()
28
- * except typecheck and audit are not included.
32
+ * TypeScript source to check (e.g. skills, themes). No typecheck, no audit.
29
33
  *
30
34
  * @example
31
35
  * const preset = nodeDocsSite();
@@ -1,2 +1,2 @@
1
- import { n as nodeDocsSite, t as nodeDocs } from "../node-docs-ccjE0K8S.js";
1
+ import { n as nodeDocsSite, t as nodeDocs } from "../node-docs-BW6pdsNO.js";
2
2
  export { nodeDocs, nodeDocsSite };
package/dist/index.js CHANGED
@@ -1,11 +1,32 @@
1
1
  import { t as node } from "./node-3iHN9DIf.js";
2
2
  import { t as typecheck } from "./typecheck-epaimGtp.js";
3
- import { i as docs, n as nodeDocsSite, r as audit, t as nodeDocs } from "./node-docs-ccjE0K8S.js";
3
+ import { n as nodeDocsSite, r as docs, t as nodeDocs } from "./node-docs-BW6pdsNO.js";
4
4
  import { t as react } from "./react-Pm9PjGpV.js";
5
5
  import { n as nextjs$1, t as nextjs } from "./nextjs-D1E4Gf4-.js";
6
6
  import { react as react$1 } from "./configs/react.js";
7
7
  import { monorepo } from "./configs/monorepo.js";
8
8
  import { compose } from "@theholocron/cli";
9
+ //#region capabilities/audit.ts
10
+ /**
11
+ * Adds BundleWatch + optional Knip and Lighthouse auditing.
12
+ * Requires: node
13
+ */
14
+ function audit({ knip = false, performance = false, lighthouseConfig } = {}) {
15
+ const withBlock = {};
16
+ if (knip) withBlock["run-knip"] = true;
17
+ if (performance) withBlock["run-performance"] = true;
18
+ if (lighthouseConfig) withBlock["lighthouse-config"] = lighthouseConfig;
19
+ return {
20
+ id: "audit",
21
+ requires: ["node"],
22
+ workflows: [Object.keys(withBlock).length > 0 ? {
23
+ name: "audit",
24
+ with: withBlock
25
+ } : "audit"],
26
+ requiredChecks: ["audit / Conclusion"]
27
+ };
28
+ }
29
+ //#endregion
9
30
  //#region capabilities/monorepo.ts
10
31
  /**
11
32
  * Adjusts a repo to be a monorepo — sets uses_external_packages: true
@@ -33,35 +33,19 @@ function docs() {
33
33
  };
34
34
  }
35
35
  //#endregion
36
- //#region capabilities/audit.ts
37
- /**
38
- * Adds BundleWatch + optional Knip and Lighthouse auditing.
39
- * Requires: node
40
- */
41
- function audit({ knip = false, performance = false, lighthouseConfig } = {}) {
42
- const withBlock = {};
43
- if (knip) withBlock["run-knip"] = true;
44
- if (performance) withBlock["run-performance"] = true;
45
- if (lighthouseConfig) withBlock["lighthouse-config"] = lighthouseConfig;
46
- return {
47
- id: "audit",
48
- requires: ["node"],
49
- workflows: [Object.keys(withBlock).length > 0 ? {
50
- name: "audit",
51
- with: withBlock
52
- } : "audit"],
53
- requiredChecks: ["audit / Conclusion"]
54
- };
55
- }
56
- //#endregion
57
36
  //#region configs/node-docs.ts
58
37
  /**
59
38
  * Preset for theholocron repos that are TypeScript libraries AND publish a
60
- * documentation site (e.g. configs, utils, holocron). Includes typecheck and
61
- * audit in addition to the docs deploy.
39
+ * documentation site (e.g. configs, utils, holocron, clients).
62
40
  *
63
- * For repos that are docs-only sites without TypeScript source to check,
64
- * use nodeDocsSite() instead.
41
+ * Includes the "audit / Conclusion" required check so branch protection works
42
+ * for repos that add the audit workflow explicitly. The workflow itself is
43
+ * intentionally left repo-specific — add it with your own options:
44
+ * workflows: [...preset.workflows, "audit", ...]
45
+ * // or with overrides:
46
+ * workflows: [...preset.workflows, { name: "audit", with: { "run-knip": true } }, ...]
47
+ *
48
+ * For docs-only sites without TypeScript source, use nodeDocsSite() instead.
65
49
  *
66
50
  * @example
67
51
  * const preset = nodeDocs();
@@ -75,12 +59,15 @@ function audit({ knip = false, performance = false, lighthouseConfig } = {}) {
75
59
  * });
76
60
  */
77
61
  function nodeDocs() {
78
- return compose(node(), typecheck(), docs(), audit());
62
+ return compose(node(), typecheck(), docs(), {
63
+ id: "audit-check",
64
+ requires: ["node"],
65
+ requiredChecks: ["audit / Conclusion"]
66
+ });
79
67
  }
80
68
  /**
81
69
  * Preset for theholocron repos that are documentation-only sites with no
82
- * TypeScript source to check (e.g. skills, themes). Identical to nodeDocs()
83
- * except typecheck and audit are not included.
70
+ * TypeScript source to check (e.g. skills, themes). No typecheck, no audit.
84
71
  *
85
72
  * @example
86
73
  * const preset = nodeDocsSite();
@@ -96,4 +83,4 @@ function nodeDocsSite() {
96
83
  return compose(node(), docs());
97
84
  }
98
85
  //#endregion
99
- export { docs as i, nodeDocsSite as n, audit as r, nodeDocs as t };
86
+ export { nodeDocsSite as n, docs as r, nodeDocs as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-config",
3
- "version": "7.28.0",
3
+ "version": "7.28.1",
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.28.0",
27
- "@theholocron/vitest-config": "7.28.0"
26
+ "@theholocron/vitest-config": "7.28.1",
27
+ "@theholocron/tsconfig": "7.28.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@theholocron/cli": ">=2.0.0-alpha.1"