@syntopica/create-baseline 0.10.4 → 0.10.6
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 +33 -24
- package/baseline-versions.json +3 -3
- package/bin/scaffold/actionPins.mjs +8 -8
- package/package.json +2 -2
- package/python-versions.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# @syntopica/create-baseline
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`renovate.json`).
|
|
3
|
+
CLI that adopts and audits the `@syntopica` quality baseline in a project. It
|
|
4
|
+
prints the install line for missing baseline packages, scaffolds the missing
|
|
5
|
+
quality-gate wiring (`--write`), and checks that every gate is actually wired
|
|
6
|
+
into what CI runs (`--check`, `--fix`).
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
It does not create your ESLint, Prettier or TypeScript setup, and it never
|
|
9
|
+
touches source code. The generated scripts call the project's existing `lint`,
|
|
10
|
+
`type-check`, `format` and `test` scripts, so those must exist; copy them from
|
|
11
|
+
the closest template under `templates/*` if they do not.
|
|
11
12
|
|
|
12
13
|
## Requirements
|
|
13
14
|
|
|
@@ -18,30 +19,38 @@ closest template under `templates/*`) provide the file.
|
|
|
18
19
|
Use via `pnpm dlx` / `npx` (no need to add as a dependency for one-off checks):
|
|
19
20
|
|
|
20
21
|
```bash
|
|
21
|
-
pnpm dlx @syntopica/create-baseline
|
|
22
|
+
pnpm dlx @syntopica/create-baseline --soft
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
## Usage
|
|
25
26
|
|
|
26
|
-
| Flag | Behavior
|
|
27
|
-
| --------- |
|
|
28
|
-
| `--soft` | Print recommended `pnpm` / `npm` install lines (default if no other flag); also advises on missing config files
|
|
29
|
-
| `--check` | Exit non-zero if baseline packages are missing from
|
|
30
|
-
| `--
|
|
31
|
-
| `--
|
|
27
|
+
| Flag | Behavior |
|
|
28
|
+
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| `--soft` | Print recommended `pnpm` / `npm` install lines (default if no other flag); also advises on missing config files |
|
|
30
|
+
| `--check` | Exit non-zero if baseline packages are missing, or if the gates are not wired: `--max-warnings 0`, every gate reachable from CI, a workflow on push, SHA-pinned actions, coverage thresholds, installed hooks, dependency ranges, tsconfig coverage |
|
|
31
|
+
| `--fix` | `--check`, then repair the mechanical findings it can |
|
|
32
|
+
| `--hard` | Like `--check`, and require `eslint.config.*` plus `knip.config.ts`/`.js`, `lefthook.yml`, and `renovate.json` to exist |
|
|
33
|
+
| `--write` | Scaffold the quality-gate wiring this project is missing, then print what is still to install |
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
A `--check` finding can be waived by id in `baseline.exceptions.json` with a
|
|
36
|
+
`reason` and an optional `expires` date, which is enforced. See the
|
|
37
|
+
[existing-repo guide](../../docs/adoption/existing-repo.md) for the full list.
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
`.dependency-cruiser.cjs` when they are absent, and adds the baseline scripts
|
|
37
|
-
`package.json` does not already define. The knip preset is read off the
|
|
38
|
-
project's dependencies, so a Tauri app gets `tauri` and a Nest service gets
|
|
39
|
-
`nestjs`.
|
|
39
|
+
### `--write`
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
Writes `knip.config.ts`, `lefthook.yml`, `.oxlintrc.json`, `renovate.json`,
|
|
42
|
+
`.dependency-cruiser.cjs` and `.github/workflows/ci.yml` (running `check:ci`,
|
|
43
|
+
`check:quality` and `check:security`) when they are absent, and adds the
|
|
44
|
+
baseline scripts `package.json` does not already define. The workflow is not
|
|
45
|
+
added beside unrelated existing workflows; `--check` then reports what the
|
|
46
|
+
existing pipeline is missing. The knip preset is read off the project's
|
|
47
|
+
dependencies, so a Tauri app gets `tauri` and a Nest service gets `nestjs`.
|
|
48
|
+
|
|
49
|
+
**No existing file or script value is overwritten.** Missing scripts are added
|
|
50
|
+
to `package.json`, which rewrites that file's formatting; every other file
|
|
51
|
+
already in the repo is the project's, however it got there, and a tuned knip
|
|
52
|
+
config is exactly what an adopter spends time on; the same goes for a `lint`
|
|
53
|
+
script scoped to `src`. Re-running is a no-op.
|
|
45
54
|
|
|
46
55
|
Two things the generated wiring cannot know and you should review before
|
|
47
56
|
committing: `deps:graph` scopes itself to `src`, and a project with e2e specs or
|
package/baseline-versions.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@syntopica/eslint-config": "^0.
|
|
2
|
+
"@syntopica/eslint-config": "^0.10.0",
|
|
3
3
|
"@syntopica/prettier-config": "^0.3.0",
|
|
4
4
|
"@syntopica/tsconfig": "^0.3.1",
|
|
5
|
-
"@syntopica/quality-config": "^0.
|
|
6
|
-
"eslint-plugin-code-policy": "^0.
|
|
5
|
+
"@syntopica/quality-config": "^0.14.0",
|
|
6
|
+
"eslint-plugin-code-policy": "^0.9.0",
|
|
7
7
|
"dependency-cruiser": "^18.1.1",
|
|
8
8
|
"jiti": "^2.7.0",
|
|
9
9
|
"jscpd": "^5.0.14",
|
|
@@ -12,23 +12,23 @@
|
|
|
12
12
|
// tag object the runner cannot check out.
|
|
13
13
|
export const ACTION_PINS = {
|
|
14
14
|
checkout: {
|
|
15
|
-
uses: 'actions/checkout@
|
|
16
|
-
tag: '
|
|
15
|
+
uses: 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1',
|
|
16
|
+
tag: 'v7',
|
|
17
17
|
},
|
|
18
18
|
setupNode: {
|
|
19
|
-
uses: 'actions/setup-node@
|
|
20
|
-
tag: '
|
|
19
|
+
uses: 'actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1',
|
|
20
|
+
tag: 'v7',
|
|
21
21
|
},
|
|
22
22
|
setupPnpm: {
|
|
23
|
-
uses: 'pnpm/action-setup@
|
|
24
|
-
tag: 'v6',
|
|
23
|
+
uses: 'pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413',
|
|
24
|
+
tag: 'v6.1.0',
|
|
25
25
|
},
|
|
26
26
|
actionlint: {
|
|
27
27
|
uses: 'raven-actions/actionlint@3d39aea434753780c3b3d4a1a31c854b4dbf49d7',
|
|
28
28
|
tag: 'v2',
|
|
29
29
|
},
|
|
30
30
|
zizmor: {
|
|
31
|
-
uses: 'zizmorcore/zizmor-action@
|
|
32
|
-
tag: 'v0.6.
|
|
31
|
+
uses: 'zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482',
|
|
32
|
+
tag: 'v0.6.4',
|
|
33
33
|
},
|
|
34
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntopica/create-baseline",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "CLI to verify and adopt @syntopica baseline config packages",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
42
|
-
"@syntopica/eslint-config": "0.
|
|
42
|
+
"@syntopica/eslint-config": "0.10.0",
|
|
43
43
|
"@vitest/coverage-v8": "^5.0.3",
|
|
44
44
|
"eslint": "^10.12.0",
|
|
45
45
|
"eslint-plugin-regexp": "^3.3.1",
|
package/python-versions.json
CHANGED