adamantite 0.39.0 → 0.41.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.
package/README.md CHANGED
@@ -52,7 +52,6 @@ and agent guidance. After setup, use the scripts written to `package.json`:
52
52
  ```sh
53
53
  bun run check
54
54
  bun run fix
55
- bun run format
56
55
  bun run analyze
57
56
  ```
58
57
 
@@ -62,9 +61,7 @@ scripts:
62
61
  ```sh
63
62
  adamantite check
64
63
  adamantite fix
65
- adamantite format
66
64
  adamantite analyze
67
- adamantite monorepo
68
65
  ```
69
66
 
70
67
  ## Non-interactive setup
@@ -77,7 +74,6 @@ npx adamantite init \
77
74
  --non-interactive \
78
75
  --script check \
79
76
  --script fix \
80
- --script format \
81
77
  --script analyze \
82
78
  --preset react \
83
79
  --editor vscode \
@@ -89,19 +85,20 @@ npx adamantite init \
89
85
 
90
86
  Available setup values:
91
87
 
92
- - Scripts: `check`, `fix`, `format`, `analyze`, `check:monorepo`, and `fix:monorepo`.
88
+ - Scripts: `check`, `fix`, and `analyze`. In a detected monorepo, `analyze` also installs
89
+ Sherif. The legacy `check:monorepo` and `fix:monorepo` values are rejected.
93
90
  - Presets: `react`, `nextjs`, `vue`, `jest`, `vitest`, and `node`.
94
91
  - Editors: `vscode` and `zed`.
95
92
 
96
93
  Presets and TypeScript require the `check` or `fix` script. Editor extension installation
97
- requires an editor. Monorepo scripts require a detected monorepo. GitHub Actions requires a
98
- compatible script and a supported package manager. Omitted boolean flags are disabled.
94
+ requires an editor. GitHub Actions requires a compatible script and a supported package
95
+ manager. Omitted boolean flags are disabled.
99
96
 
100
97
  Existing package scripts whose commands differ from Adamantite's are kept and reported
101
98
  instead of being replaced. The interactive initializer asks before overwriting them; in
102
99
  non-interactive mode, pass `--overwrite-scripts` to replace them. To keep custom flags,
103
100
  forward them to the Adamantite command after `--`, e.g.
104
- `adamantite monorepo -- --ignore-dependency tailwindcss`.
101
+ `adamantite analyze -- --directory packages/app`.
105
102
 
106
103
  In a detected monorepo, TypeScript setup does not write a root `tsconfig.json`, because a
107
104
  catch-all root config makes TypeScript treat all packages as one project. Adamantite
@@ -114,7 +111,7 @@ Run `adamantite --help` or `adamantite <command> --help` for the complete CLI re
114
111
 
115
112
  ### `adamantite check`
116
113
 
117
- Find lint and type errors without changing files:
114
+ Find formatting, lint, and type errors without changing files:
118
115
 
119
116
  ```sh
120
117
  adamantite check
@@ -123,7 +120,7 @@ adamantite check src
123
120
 
124
121
  ### `adamantite fix`
125
122
 
126
- Apply safe Oxlint fixes. Suggested and dangerous fixes require explicit flags:
123
+ Apply safe Oxlint fixes, then format the files with Oxfmt. Suggested and dangerous fixes require explicit flags:
127
124
 
128
125
  ```sh
129
126
  adamantite fix
@@ -132,35 +129,51 @@ adamantite fix --dangerous
132
129
  adamantite fix --all
133
130
  ```
134
131
 
135
- ### `adamantite format`
132
+ ### `adamantite format` (deprecated)
136
133
 
137
- Format files with Oxfmt, or check formatting without writing:
138
-
139
- ```sh
140
- adamantite format
141
- adamantite format src/index.ts
142
- adamantite format --check
143
- ```
134
+ `adamantite format` is deprecated and prints a warning. The next release removes it. Use
135
+ `adamantite fix` to apply formatting and `adamantite check` to verify formatting.
144
136
 
145
137
  ### `adamantite analyze`
146
138
 
147
- Find unused dependencies, exports, and files with Knip. The `--fix` option can remove
139
+ Find unused dependencies, exports, and files with Knip. In a detected monorepo, `analyze`
140
+ first finds dependency consistency problems with Sherif. The `--fix` option can remove
148
141
  unused files, so review its effect before use.
149
142
 
150
143
  ```sh
151
144
  adamantite analyze
152
145
  adamantite analyze --strict
153
146
  adamantite analyze --fix
147
+ adamantite analyze --only unused
148
+ adamantite analyze --only monorepo --fix -- --select highest
154
149
  ```
155
150
 
156
- ### `adamantite monorepo`
157
-
158
- Find dependency consistency problems in a monorepo with Sherif:
159
-
160
- ```sh
161
- adamantite monorepo
162
- adamantite monorepo --fix
163
- ```
151
+ - The `monorepo` stage (Sherif) runs first, and only in a detected monorepo. The `unused`
152
+ stage (Knip) always runs.
153
+ - Without `--fix`, both stages run and the exit code comes from the first failure. With
154
+ `--fix`, a Sherif failure skips Knip, because Knip must not remove code against a
155
+ dependency graph that Sherif did not repair.
156
+ - `--fix` applies to each stage that runs. `--strict` applies to Knip only.
157
+ - `--only monorepo` or `--only unused` runs one stage. `--only monorepo` fails outside a
158
+ monorepo and with `--strict`.
159
+ - Arguments after `--` go to Knip, or to the stage that `--only` selects.
160
+ - `analyze` runs Sherif without flags. Put project exceptions in the `sherif` field of the
161
+ root `package.json`, which Sherif reads. The keys are the Sherif CLI options in camelCase:
162
+ `ignoreDependency`, `ignoreRule`, `ignorePackage`, `select`, `noInstall`, and
163
+ `failOnWarnings`. For example: `"sherif": { "ignoreDependency": ["tailwindcss"] }`.
164
+ - A Sherif fix that must choose between versions prompts in a terminal. Without a terminal,
165
+ set `"sherif": { "select": "highest" }` in the root `package.json`, or run
166
+ `adamantite analyze --only monorepo --fix -- --select highest`.
167
+ - Use `--fix` locally, not in CI. Sherif refuses to fix in a CI environment (for example when
168
+ `CI` is set), so `analyze --fix` fails there in a monorepo. CI runs `adamantite analyze`
169
+ without `--fix`.
170
+
171
+ ### `adamantite monorepo` (deprecated)
172
+
173
+ `adamantite monorepo` is deprecated and prints a warning with the replacement command. The
174
+ next release removes it. Use `adamantite analyze`, or `adamantite analyze --only monorepo`
175
+ to run only Sherif. `adamantite doctor` reports the legacy `check:monorepo` and
176
+ `fix:monorepo` scripts and says how to remove them.
164
177
 
165
178
  ### `adamantite doctor`
166
179
 
@@ -207,8 +220,7 @@ Commands that invoke Knip, Oxlint, Oxfmt, or Sherif forward arguments after `--`
207
220
  ```sh
208
221
  adamantite analyze --strict -- --directory packages/app
209
222
  adamantite check src -- --deny-warnings
210
- adamantite format -- --ignore-path .formatignore
211
- adamantite monorepo -- --ignore-package package-a
223
+ adamantite analyze --only monorepo -- --ignore-package package-a
212
224
  ```
213
225
 
214
226
  Package managers consume one separator, so package scripts need a second one:
@@ -236,7 +248,7 @@ Adamantite publishes configuration that can also be consumed directly:
236
248
  | `adamantite/lint/vitest` | Vitest rules. |
237
249
  | `adamantite/lint/antislop` | Vendored [anti-slop](https://github.com/dmmulroy/anti-slop) rules that reject low-evidence, low-signal patterns. Also turns off `typescript/consistent-indexed-object-style` and `unicorn/no-immediate-mutation` from the core preset, which conflict with these rules. |
238
250
  | `adamantite/format` | Oxfmt configuration. |
239
- | `adamantite/analyze` | Knip configuration. |
251
+ | `adamantite/analyze` | Knip configuration. The `ignoreDependencies` named export groups suggested ignore lists; `init` sets `ignoreDependencies.monorepo` in a monorepo. |
240
252
  | `adamantite/typescript` | Strict TypeScript configuration for TS 7+. |
241
253
 
242
254
  When consuming the lint presets directly, hoist the core preset's ignore patterns onto the
@@ -265,8 +277,7 @@ Configs generated by `adamantite init` include this automatically.
265
277
  them.
266
278
  - Adamantite manages recognized package scripts and supported configuration shapes. It
267
279
  reports custom configurations that require manual work instead of overwriting them.
268
- - `fix`, `format`, `analyze --fix`, `monorepo --fix`, `init`, and `update` can change
269
- project files. Doctor is read-only.
280
+ - `fix`, `analyze --fix`, `init`, and `update` can change project files. Doctor is read-only.
270
281
 
271
282
  ## Agent skill
272
283