@limenet-ch/baseline 2.9.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 (105) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +272 -0
  3. package/js/dist/bin.d.ts +2 -0
  4. package/js/dist/bin.js +59 -0
  5. package/js/dist/bin.js.map +1 -0
  6. package/js/dist/checks/allows-tooling-in-claude-settings-check.d.ts +11 -0
  7. package/js/dist/checks/allows-tooling-in-claude-settings-check.js +14 -0
  8. package/js/dist/checks/allows-tooling-in-claude-settings-check.js.map +1 -0
  9. package/js/dist/checks/biome-uses-local-schema-check.d.ts +21 -0
  10. package/js/dist/checks/biome-uses-local-schema-check.js +78 -0
  11. package/js/dist/checks/biome-uses-local-schema-check.js.map +1 -0
  12. package/js/dist/checks/calls-baseline-check.d.ts +11 -0
  13. package/js/dist/checks/calls-baseline-check.js +34 -0
  14. package/js/dist/checks/calls-baseline-check.js.map +1 -0
  15. package/js/dist/checks/check.d.ts +37 -0
  16. package/js/dist/checks/check.js +54 -0
  17. package/js/dist/checks/check.js.map +1 -0
  18. package/js/dist/checks/ci-sets-node-version-check.d.ts +10 -0
  19. package/js/dist/checks/ci-sets-node-version-check.js +43 -0
  20. package/js/dist/checks/ci-sets-node-version-check.js.map +1 -0
  21. package/js/dist/checks/claude-settings-check.d.ts +30 -0
  22. package/js/dist/checks/claude-settings-check.js +43 -0
  23. package/js/dist/checks/claude-settings-check.js.map +1 -0
  24. package/js/dist/checks/denies-env-reads-in-claude-settings-check.d.ts +13 -0
  25. package/js/dist/checks/denies-env-reads-in-claude-settings-check.js +25 -0
  26. package/js/dist/checks/denies-env-reads-in-claude-settings-check.js.map +1 -0
  27. package/js/dist/checks/does-not-have-copilot-or-junie-agent-files-check.d.ts +5 -0
  28. package/js/dist/checks/does-not-have-copilot-or-junie-agent-files-check.js +25 -0
  29. package/js/dist/checks/does-not-have-copilot-or-junie-agent-files-check.js.map +1 -0
  30. package/js/dist/checks/does-not-use-both-baseline-runners-check.d.ts +13 -0
  31. package/js/dist/checks/does-not-use-both-baseline-runners-check.js +30 -0
  32. package/js/dist/checks/does-not-use-both-baseline-runners-check.js.map +1 -0
  33. package/js/dist/checks/hardens-npm-supply-chain-check.d.ts +5 -0
  34. package/js/dist/checks/hardens-npm-supply-chain-check.js +68 -0
  35. package/js/dist/checks/hardens-npm-supply-chain-check.js.map +1 -0
  36. package/js/dist/checks/has-ci-jobs-check.d.ts +9 -0
  37. package/js/dist/checks/has-ci-jobs-check.js +14 -0
  38. package/js/dist/checks/has-ci-jobs-check.js.map +1 -0
  39. package/js/dist/checks/has-editorconfig-check.d.ts +6 -0
  40. package/js/dist/checks/has-editorconfig-check.js +42 -0
  41. package/js/dist/checks/has-editorconfig-check.js.map +1 -0
  42. package/js/dist/checks/has-npm-scripts-check.d.ts +5 -0
  43. package/js/dist/checks/has-npm-scripts-check.js +20 -0
  44. package/js/dist/checks/has-npm-scripts-check.js.map +1 -0
  45. package/js/dist/checks/has-trivy-config-check.d.ts +26 -0
  46. package/js/dist/checks/has-trivy-config-check.js +179 -0
  47. package/js/dist/checks/has-trivy-config-check.js.map +1 -0
  48. package/js/dist/checks/is-ci-lint-complete-check.d.ts +10 -0
  49. package/js/dist/checks/is-ci-lint-complete-check.js +25 -0
  50. package/js/dist/checks/is-ci-lint-complete-check.js.map +1 -0
  51. package/js/dist/checks/node-version-check.d.ts +5 -0
  52. package/js/dist/checks/node-version-check.js +77 -0
  53. package/js/dist/checks/node-version-check.js.map +1 -0
  54. package/js/dist/checks/periodic-check.d.ts +16 -0
  55. package/js/dist/checks/periodic-check.js +34 -0
  56. package/js/dist/checks/periodic-check.js.map +1 -0
  57. package/js/dist/checks/registry.d.ts +10 -0
  58. package/js/dist/checks/registry.js +56 -0
  59. package/js/dist/checks/registry.js.map +1 -0
  60. package/js/dist/checks/runs-ci-lint-hook-in-claude-settings-check.d.ts +6 -0
  61. package/js/dist/checks/runs-ci-lint-hook-in-claude-settings-check.js +26 -0
  62. package/js/dist/checks/runs-ci-lint-hook-in-claude-settings-check.js.map +1 -0
  63. package/js/dist/checks/updates-dependencies-check.d.ts +5 -0
  64. package/js/dist/checks/updates-dependencies-check.js +8 -0
  65. package/js/dist/checks/updates-dependencies-check.js.map +1 -0
  66. package/js/dist/checks/uses-release-it-check.d.ts +12 -0
  67. package/js/dist/checks/uses-release-it-check.js +40 -0
  68. package/js/dist/checks/uses-release-it-check.js.map +1 -0
  69. package/js/dist/commands/check.d.ts +7 -0
  70. package/js/dist/commands/check.js +59 -0
  71. package/js/dist/commands/check.js.map +1 -0
  72. package/js/dist/commands/install-skills.d.ts +16 -0
  73. package/js/dist/commands/install-skills.js +47 -0
  74. package/js/dist/commands/install-skills.js.map +1 -0
  75. package/js/dist/commands/periodic.d.ts +6 -0
  76. package/js/dist/commands/periodic.js +40 -0
  77. package/js/dist/commands/periodic.js.map +1 -0
  78. package/js/dist/index.d.ts +8 -0
  79. package/js/dist/index.js +9 -0
  80. package/js/dist/index.js.map +1 -0
  81. package/js/dist/policy.d.ts +45 -0
  82. package/js/dist/policy.js +145 -0
  83. package/js/dist/policy.js.map +1 -0
  84. package/js/dist/project.d.ts +26 -0
  85. package/js/dist/project.js +64 -0
  86. package/js/dist/project.js.map +1 -0
  87. package/js/dist/state.d.ts +21 -0
  88. package/js/dist/state.js +36 -0
  89. package/js/dist/state.js.map +1 -0
  90. package/js/dist/support/ci-jobs.d.ts +13 -0
  91. package/js/dist/support/ci-jobs.js +42 -0
  92. package/js/dist/support/ci-jobs.js.map +1 -0
  93. package/js/dist/support/npmrc.d.ts +10 -0
  94. package/js/dist/support/npmrc.js +36 -0
  95. package/js/dist/support/npmrc.js.map +1 -0
  96. package/js/dist/support/versions.d.ts +10 -0
  97. package/js/dist/support/versions.js +34 -0
  98. package/js/dist/support/versions.js.map +1 -0
  99. package/js/skills/creating-a-release/SKILL.md +45 -0
  100. package/js/skills/updating-dependencies/SKILL.md +104 -0
  101. package/package.json +67 -0
  102. package/policy/policy.json +131 -0
  103. package/policy/policy.schema.json +284 -0
  104. package/policy/templates/editorconfig +18 -0
  105. package/policy/templates/trivy.yaml +19 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Parse an .npmrc into a key => value map. Comments (# and ;) and lines without
3
+ * an `=` are skipped, mirroring AbstractCheck::getNpmrc() in the PHP runner.
4
+ */
5
+ export declare function parseNpmrc(contents: string | null): Record<string, string>;
6
+ /**
7
+ * Set each key, updating an existing line in place or appending it, so all other
8
+ * lines and comments survive.
9
+ */
10
+ export declare function upsertNpmrc(contents: string | null, entries: Record<string, string>): string;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Parse an .npmrc into a key => value map. Comments (# and ;) and lines without
3
+ * an `=` are skipped, mirroring AbstractCheck::getNpmrc() in the PHP runner.
4
+ */
5
+ export function parseNpmrc(contents) {
6
+ const config = {};
7
+ for (const rawLine of (contents ?? '').split('\n')) {
8
+ const line = rawLine.trim();
9
+ if (line === '' || line.startsWith('#') || line.startsWith(';') || !line.includes('=')) {
10
+ continue;
11
+ }
12
+ const separator = line.indexOf('=');
13
+ config[line.slice(0, separator).trim()] = line.slice(separator + 1).trim();
14
+ }
15
+ return config;
16
+ }
17
+ /**
18
+ * Set each key, updating an existing line in place or appending it, so all other
19
+ * lines and comments survive.
20
+ */
21
+ export function upsertNpmrc(contents, entries) {
22
+ const existing = contents ?? '';
23
+ const lines = existing === '' ? [] : existing.replace(/\n+$/, '').split('\n');
24
+ for (const [key, value] of Object.entries(entries)) {
25
+ const line = `${key}=${value}`;
26
+ const index = lines.findIndex((candidate) => new RegExp(`^\\s*${key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s*=`).test(candidate));
27
+ if (index === -1) {
28
+ lines.push(line);
29
+ }
30
+ else {
31
+ lines[index] = line;
32
+ }
33
+ }
34
+ return `${lines.join('\n')}\n`;
35
+ }
36
+ //# sourceMappingURL=npmrc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npmrc.js","sourceRoot":"","sources":["../../src/support/npmrc.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,QAAuB;IAC9C,MAAM,MAAM,GAA2B,EAAE,CAAA;IAEzC,KAAK,MAAM,OAAO,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;QAE3B,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACrF,SAAQ;QACZ,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAEnC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAC9E,CAAC;IAED,OAAO,MAAM,CAAA;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,QAAuB,EAAE,OAA+B;IAChF,MAAM,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAA;IAC/B,MAAM,KAAK,GAAG,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAE7E,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,GAAG,GAAG,GAAG,IAAI,KAAK,EAAE,CAAA;QAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,EAAE,CACxC,IAAI,MAAM,CAAC,QAAQ,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CACxF,CAAA;QAED,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACpB,CAAC;aAAM,CAAC;YACJ,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;QACvB,CAAC;IACL,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;AAClC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * True when every version the constraint allows is >= the floor — i.e. it never
3
+ * intersects "< floor". Unparseable input is treated as not guaranteeing it,
4
+ * matching the PHP runner's handling of Composer\Semver's UnexpectedValueException.
5
+ */
6
+ export declare function guaranteesAtLeast(constraint: string, floor: string): boolean;
7
+ /** True when the two constraints have at least one version in common. */
8
+ export declare function compatible(a: string, b: string): boolean;
9
+ /** The major of a constraint's lowest allowed version, or null if unparseable. */
10
+ export declare function lowestMajor(constraint: string): string | null;
@@ -0,0 +1,34 @@
1
+ import semver from 'semver';
2
+ /**
3
+ * True when every version the constraint allows is >= the floor — i.e. it never
4
+ * intersects "< floor". Unparseable input is treated as not guaranteeing it,
5
+ * matching the PHP runner's handling of Composer\Semver's UnexpectedValueException.
6
+ */
7
+ export function guaranteesAtLeast(constraint, floor) {
8
+ try {
9
+ return !semver.intersects(constraint, `<${floor}`, { loose: true });
10
+ }
11
+ catch {
12
+ return false;
13
+ }
14
+ }
15
+ /** True when the two constraints have at least one version in common. */
16
+ export function compatible(a, b) {
17
+ try {
18
+ return semver.intersects(a, b, { loose: true });
19
+ }
20
+ catch {
21
+ return false;
22
+ }
23
+ }
24
+ /** The major of a constraint's lowest allowed version, or null if unparseable. */
25
+ export function lowestMajor(constraint) {
26
+ try {
27
+ const lowest = semver.minVersion(constraint, { loose: true });
28
+ return lowest === null ? null : String(lowest.major);
29
+ }
30
+ catch {
31
+ return null;
32
+ }
33
+ }
34
+ //# sourceMappingURL=versions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/support/versions.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB,EAAE,KAAa;IAC/D,IAAI,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACvE,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAA;IAChB,CAAC;AACL,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,CAAS,EAAE,CAAS;IAC3C,IAAI,CAAC;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACnD,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAA;IAChB,CAAC;AACL,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,WAAW,CAAC,UAAkB;IAC1C,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAE7D,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACxD,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,IAAI,CAAA;IACf,CAAC;AACL,CAAC"}
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: creating-a-release
3
+ description: Cut, tag, and publish a new release of this project using release-it. Use when asked to create, cut, tag, or publish a release, or bump the project version.
4
+ ---
5
+
6
+ # Creating a release
7
+
8
+ This project (per the [@limenet-ch/baseline](https://github.com/limenet/laravel-baseline)
9
+ standards) releases with [release-it](https://github.com/release-it/release-it). Versioning is
10
+ semantic and the canonical version lives in `package.json`.
11
+
12
+ ## When to use this skill
13
+
14
+ Use this when the task is to create, cut, tag, or publish a new release — or otherwise bump the
15
+ project's version.
16
+
17
+ ## How to release
18
+
19
+ Run the release script — it drives release-it interactively (choose the next version, then it
20
+ tags, commits, and publishes):
21
+
22
+ ```bash
23
+ npm run release
24
+ ```
25
+
26
+ `release-it` handles the version bump, git tag, commit, and (if configured) the remote release.
27
+
28
+ ## Conventions
29
+
30
+ - **Semantic versioning.** Pick the next version per semver (patch / minor / major) based on the
31
+ changes since the last tag.
32
+ - **`package.json` `version` is authoritative.** Do not hand-edit it for a release — let
33
+ `npm run release` set it.
34
+ - **No `@release-it/bumper`.** release-it already writes `package.json` itself, so the bumper
35
+ plugin is redundant here. It is only needed when a *different* file holds the canonical version
36
+ (as in the Laravel projects, where `composer.json` does). The `usesReleaseIt` baseline check
37
+ fails if it is configured.
38
+
39
+ ## Configuration reference
40
+
41
+ The relevant config the baseline enforces:
42
+
43
+ - `package.json` → `scripts.release` = `"release-it"`
44
+ - `package.json` → `devDependencies` includes `release-it`
45
+ - `.release-it.json` → no `plugins['@release-it/bumper']` entry
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: updating-dependencies
3
+ description: Update the project's npm dependencies, review changelogs for their impact on this project, and report majors blocked by semver. Use when asked to update or upgrade dependencies, run the monthly dependency update, or when prompted by the `updatesDependencies` periodic baseline check.
4
+ ---
5
+
6
+ # Updating dependencies
7
+
8
+ This project (per the [@limenet-ch/baseline](https://github.com/limenet/laravel-baseline)
9
+ standards) keeps its npm dependencies current on a monthly cadence. This skill drives that routine:
10
+ it surveys what is outdated, applies the safe in-constraint updates, reviews each meaningful bump's
11
+ changelog against how this project actually uses the package, and reports the majors that are
12
+ blocked by the version constraints so they can be tackled deliberately.
13
+
14
+ ## When to use this skill
15
+
16
+ Use this when the task is to update or upgrade dependencies, run the monthly dependency update, or
17
+ bring npm packages current. This is the skill the `updatesDependencies` periodic check points
18
+ developers to — run it when that check prompts you.
19
+
20
+ The routine is **agent-driven, not interactive**: run the survey commands non-interactively,
21
+ present the findings, and apply only the upgrades the developer approves. Do not run interactive
22
+ TUIs (e.g. `npm-check-updates --interactive`) — you drive the selection yourself.
23
+
24
+ ## How to update
25
+
26
+ ### 1. Survey what is outdated (no changes yet)
27
+
28
+ Group the available upgrades by patch / minor / major, without changing anything:
29
+
30
+ ```bash
31
+ npx npm-check-updates --format group
32
+ ```
33
+
34
+ ### 2. Apply the in-constraint updates
35
+
36
+ Update everything that fits the existing constraints and refresh the lock file:
37
+
38
+ ```bash
39
+ npm update
40
+ ```
41
+
42
+ If `biome` moved (here or in step 4), sync the `$schema` in `biome.json` to the new version — see
43
+ the Biome convention below.
44
+
45
+ ### 3. Review changelogs against this project
46
+
47
+ For each package with a meaningful bump (from the survey and from step 2), fetch its changelog or
48
+ GitHub release notes for the version delta and assess the concrete impact on *this* project:
49
+
50
+ - Call out breaking changes, deprecations, and any required migration steps.
51
+ - Distinguish changes that actually affect this project's usage from cosmetic or internal ones —
52
+ check how the package is used in the app code before claiming impact.
53
+
54
+ ### 4. Handle the majors blocked by semver
55
+
56
+ Present the grouped major upgrades from `npm-check-updates` and recommend per package based on the
57
+ changelog review. Apply **only the upgrades the developer approves**, one at a time:
58
+
59
+ ```bash
60
+ npx npm-check-updates -u <package>
61
+ ```
62
+
63
+ ```bash
64
+ npm install
65
+ ```
66
+
67
+ Watch for `engines` conflicts: this project sets `engine-strict=true`, so a package requiring a
68
+ newer Node than `engines.node` allows will refuse to install rather than warn.
69
+
70
+ ### 5. Verify (always)
71
+
72
+ Run the lint suite and fix every issue before considering the update complete:
73
+
74
+ ```bash
75
+ npm run ci-lint
76
+ ```
77
+
78
+ ## What to report
79
+
80
+ Produce a written summary:
81
+
82
+ - **Updated in-constraint** — packages that moved, each as `old → new`.
83
+ - **Changelog impact** — per package, what changed and whether it affects this project (with the
84
+ migration step, if any).
85
+ - **Blocked by semver** — the majors / upgrades held back by the constraints, each with a
86
+ recommendation: bump now, defer, or skip, and why.
87
+ - **Lint fixes** — anything the `ci-lint` run required you to fix.
88
+
89
+ ## Conventions
90
+
91
+ - **`ci-lint` is the gate.** Always run `npm run ci-lint` after updating, and fix every issue
92
+ before finishing.
93
+ - **Assess impact against real usage.** Judge changelog impact by how the project actually uses the
94
+ package — do not assume a change is relevant or irrelevant without looking.
95
+ - **Recommend, then apply approved.** Survey and recommend beyond-constraint bumps; apply only the
96
+ ones the developer approves. Never cross a version constraint automatically.
97
+ - **Respect the install cooldown.** `.npmrc` sets `min-release-age`, so a version published within
98
+ that window is deliberately skipped. Do not lower or bypass it to pull in a fresh release.
99
+ - **Keep Biome's `$schema` in sync.** If `biome` is installed and its version changed, update the
100
+ `$schema` URL in `biome.json` to match the new version (e.g.
101
+ `https://biomejs.dev/schemas/<new-version>/schema.json`). Skip this if there is no `biome.json` or
102
+ Biome was not bumped.
103
+ - **Plain commit messages.** If asked to commit, write a plain, descriptive message in the
104
+ imperative mood (this project does not use Conventional Commits).
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@limenet-ch/baseline",
3
+ "version": "2.9.0",
4
+ "description": "A highly opinionated baseline for JS/TS projects.",
5
+ "keywords": [
6
+ "baseline",
7
+ "conformance",
8
+ "lint",
9
+ "standards"
10
+ ],
11
+ "homepage": "https://github.com/limenet/laravel-baseline",
12
+ "bugs": "https://github.com/limenet/laravel-baseline/issues",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/limenet/laravel-baseline.git"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Linus Metzler <hi@linusmetzler.me>",
19
+ "type": "module",
20
+ "engines": {
21
+ "node": ">=24"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "bin": {
27
+ "baseline": "js/dist/bin.js"
28
+ },
29
+ "exports": {
30
+ ".": {
31
+ "types": "./js/dist/index.d.ts",
32
+ "default": "./js/dist/index.js"
33
+ },
34
+ "./policy.json": "./policy/policy.json",
35
+ "./package.json": "./package.json"
36
+ },
37
+ "files": [
38
+ "js/dist",
39
+ "js/skills",
40
+ "policy"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsc -p tsconfig.build.json",
44
+ "typecheck": "tsc -p tsconfig.json --noEmit",
45
+ "lint": "biome check js policy",
46
+ "format": "biome check --write js policy",
47
+ "test": "vitest run",
48
+ "ci-lint": "biome ci js policy && tsc -p tsconfig.json --noEmit",
49
+ "prepack": "npm run build",
50
+ "release": "GITHUB_TOKEN=$(gh auth token) release-it"
51
+ },
52
+ "dependencies": {
53
+ "semver": "^7.8.5",
54
+ "yaml": "^2.9.0"
55
+ },
56
+ "devDependencies": {
57
+ "@biomejs/biome": "^2.5.10",
58
+ "@release-it/bumper": "^8.0.0",
59
+ "@release-it/conventional-changelog": "^12.0.0",
60
+ "@types/node": "^24.10.1",
61
+ "@types/semver": "^7.8.0",
62
+ "conventional-changelog-conventionalcommits": "^10.4.0",
63
+ "release-it": "^21.0.2",
64
+ "typescript": "^7.0.2",
65
+ "vitest": "^4.1.11"
66
+ }
67
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "$schema": "./policy.schema.json",
3
+ "node": {
4
+ "minMajor": "24"
5
+ },
6
+ "npm": {
7
+ "minMajor": "12",
8
+ "constraint": "^12",
9
+ "minReleaseAgeDays": 7,
10
+ "engineStrict": true
11
+ },
12
+ "biome": {
13
+ "configFile": "biome.json",
14
+ "schema": "./node_modules/@biomejs/biome/configuration_schema.json"
15
+ },
16
+ "editorconfig": {
17
+ "template": "editorconfig",
18
+ "requiredProperties": [
19
+ "root = true",
20
+ "charset = utf-8",
21
+ "end_of_line = lf",
22
+ "indent_style = space",
23
+ "insert_final_newline = true",
24
+ "trim_trailing_whitespace = true"
25
+ ]
26
+ },
27
+ "agentFiles": {
28
+ "forbidden": {
29
+ "AGENTS.md": "it is generated for the Copilot/Junie Boost agents, which are no longer required",
30
+ ".junie": "it is the Junie Boost agent's directory, which is no longer required",
31
+ ".github/skills": "it is the Copilot Boost agent's skills directory, which is no longer required"
32
+ }
33
+ },
34
+ "claude": {
35
+ "allow": {
36
+ "shared": [
37
+ "Bash(npm info:*)",
38
+ "Bash(npm view:*)",
39
+ "Bash(npm ls:*)",
40
+ "Bash(npm outdated:*)",
41
+ "Skill(code-review)",
42
+ "Skill(code-review:*)"
43
+ ],
44
+ "php": [
45
+ "Bash(ddev composer run ci-lint:*)",
46
+ "Bash(ddev composer test:*)",
47
+ "Bash(ddev artisan test:*)",
48
+ "Bash(ddev artisan make:*)",
49
+ "Bash(ddev artisan route:list:*)",
50
+ "Bash(ddev artisan about:*)",
51
+ "Bash(ddev artisan config:show:*)",
52
+ "Bash(ddev artisan ide-helper:*)",
53
+ "Bash(ddev artisan optimize:clear:*)",
54
+ "Bash(ddev artisan cache:clear:*)",
55
+ "Bash(ddev artisan config:clear:*)",
56
+ "Bash(ddev artisan route:clear:*)",
57
+ "Bash(ddev artisan view:clear:*)",
58
+ "Bash(ddev composer show:*)",
59
+ "Bash(ddev composer outdated:*)",
60
+ "Bash(ddev composer why:*)"
61
+ ]
62
+ },
63
+ "deny": {
64
+ "shared": ["Read(./.env)"]
65
+ },
66
+ "ask": {
67
+ "php": [
68
+ "Bash(ddev artisan migrate:fresh:*)",
69
+ "Bash(php artisan migrate:fresh:*)",
70
+ "Bash(ddev artisan migrate:refresh:*)",
71
+ "Bash(php artisan migrate:refresh:*)",
72
+ "Bash(ddev artisan migrate:reset:*)",
73
+ "Bash(php artisan migrate:reset:*)",
74
+ "Bash(ddev artisan migrate:rollback:*)",
75
+ "Bash(php artisan migrate:rollback:*)",
76
+ "Bash(ddev artisan db:wipe:*)",
77
+ "Bash(php artisan db:wipe:*)"
78
+ ]
79
+ },
80
+ "ciLintHookCommand": {
81
+ "php": "ddev composer run ci-lint",
82
+ "js": "npm run ci-lint"
83
+ }
84
+ },
85
+ "ci": {
86
+ "nodeVersionVariable": {
87
+ "name": "NODE_VERSION",
88
+ "value": "latest"
89
+ },
90
+ "requiredJobs": {
91
+ "php": {
92
+ "build": ".build",
93
+ "php": ".lint_php",
94
+ "js": ".lint_js",
95
+ "test": [".test", ".test_db"]
96
+ },
97
+ "js": {
98
+ "build": ".build",
99
+ "js": ".lint_js",
100
+ "test": [".test", ".test_db"]
101
+ }
102
+ }
103
+ },
104
+ "ciLint": {
105
+ "required": {
106
+ "php": ["pint --parallel", "phpstan"],
107
+ "js": ["biome", "tsc"]
108
+ },
109
+ "baselineCommand": {
110
+ "js": "baseline check"
111
+ }
112
+ },
113
+ "trivy": {
114
+ "template": "trivy.yaml",
115
+ "configFile": "trivy.yaml",
116
+ "ignoreFile": ".trivyignore.yaml",
117
+ "gitignoreEntry": ".trivycache/",
118
+ "forbiddenKeys": ["severity"],
119
+ "ciJob": { "security": ".lint_security" }
120
+ },
121
+ "baseline": {
122
+ "composerPackage": "limenet/laravel-baseline",
123
+ "npmPackage": "@limenet-ch/baseline"
124
+ },
125
+ "npmScripts": {
126
+ "required": ["ci-lint", "production"]
127
+ },
128
+ "periodic": {
129
+ "defaultIntervalDays": 30
130
+ }
131
+ }