@mmmnt/feature 0.6.0 → 0.7.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 (2) hide show
  1. package/README.md +25 -4
  2. package/package.json +8 -5
package/README.md CHANGED
@@ -41,8 +41,11 @@ npm install --save-dev @mmmnt/feature
41
41
  Requirements:
42
42
 
43
43
  - **Node 20 or later** (the repository's `engines` field).
44
- - **Vitest** in the project. Generated suites are ordinary Vitest files and
45
- `feat run` spawns `npx vitest run`. `feat init` installs it.
44
+ - **Vitest** in the project, as a dev dependency (`>=3.2.0`, a peer dependency;
45
+ `feat init` installs it). Generated suites are ordinary Vitest files and
46
+ `feat run` runs the vitest your project installed, found from the project root
47
+ upward. It never fetches one with `npx`: without vitest, `feat run` exits `2`
48
+ with `VITEST_NOT_INSTALLED`.
46
49
  - **`@mmmnt/feat-runtime`** in the project. Every generated test imports it.
47
50
  - **The adapters your config names**, installed in the project that owns
48
51
  `feat.config.json`. An npm adapter resolves from the project's own
@@ -326,7 +329,10 @@ What it does, in order:
326
329
  5. Derives every file's [namespace](#namespaces), from its path under the base
327
330
  config's directory (the one the harness uses), and stops on a collision.
328
331
  6. Stops with `NOT_GENERATED` (exit `1`) if a generated file is missing.
329
- 7. Computes timeouts from the active config and spawns Vitest. Files that arm an
332
+ 7. Computes timeouts from the active config and spawns the project's own Vitest,
333
+ found in the `node_modules` of the project root or a parent directory; it never
334
+ fetches one. Without it the run stops with `VITEST_NOT_INSTALLED` (exit `2`):
335
+ add vitest as a dev dependency. Files that arm an
330
336
  exclusive fault run last, alone (see [Faults](#faults-and-the-serial-pass)).
331
337
  8. Prints `junit: <path>` when a JUnit file was written.
332
338
 
@@ -877,7 +883,7 @@ description is
877
883
  | --- | --- |
878
884
  | `0` | success |
879
885
  | `1` | validation failure: a parse error, a seed violation, drift (`verify`), a failed prediction, a failed audit, a change outside its `touches` (`audit --changed`: `OUTSIDE_TOUCHES`, `HANDLER_OUTSIDE_FEATURE`, `SPEC_UNPARSEABLE`), a failed `fmt --check` |
880
- | `2` | configuration error: a refused config (`CONFIG_NOT_FOUND`, `INVALID_CONFIG`, the `EXTENDS_*` codes, `TIER_SPACE_MISMATCH`, ...), a module named as an adapter that cannot be resolved or loaded (`INVALID_CONFIG`), no environment to name (`NO_ENVIRONMENT`), a harness refusal during `run` (`CLOCK_UNSUPPORTED`, `MODE_UNSUPPORTED`, `FAULT_*`, `NAMESPACE_*`, `SEED_UNSUPPORTED`, `DELIVER_UNSUPPORTED`), `NO_REPORT`, `ALREADY_INITIALIZED`, `CONFIG_MULTIPLE` (`audit`), and the `audit --changed` refusals that are not a violation (`PATH_OUTSIDE_ROOT`, `NO_SPECS_FOUND`, `GIT_UNAVAILABLE`, `NOT_A_GIT_REPO`, `BASE_NOT_FOUND`, `NO_MERGE_BASE`) |
886
+ | `2` | configuration error: a refused config (`CONFIG_NOT_FOUND`, `INVALID_CONFIG`, the `EXTENDS_*` codes, `TIER_SPACE_MISMATCH`, ...), a module named as an adapter that cannot be resolved or loaded (`INVALID_CONFIG`), no environment to name (`NO_ENVIRONMENT`), a harness refusal during `run` (`CLOCK_UNSUPPORTED`, `MODE_UNSUPPORTED`, `FAULT_*`, `NAMESPACE_*`, `SEED_UNSUPPORTED`, `DELIVER_UNSUPPORTED`), no vitest installed in the project (`VITEST_NOT_INSTALLED`, `run`), `NO_REPORT`, `ALREADY_INITIALIZED`, `CONFIG_MULTIPLE` (`audit`), and the `audit --changed` refusals that are not a violation (`PATH_OUTSIDE_ROOT`, `NO_SPECS_FOUND`, `GIT_UNAVAILABLE`, `NOT_A_GIT_REPO`, `BASE_NOT_FOUND`, `NO_MERGE_BASE`) |
881
887
 
882
888
  Each exit `2` prints a `[CODE]`.
883
889
 
@@ -896,6 +902,17 @@ buildability, and `feat report --evidence` to archive the bundle as a build
896
902
  artifact. For the integration tier add
897
903
  `feat run --config feat.integration.config.json`.
898
904
 
905
+ ## What changed in 0.7.0
906
+
907
+ - **`feat run` runs the project's own Vitest, never a fetched one (SPEC-RT-010,
908
+ ADR-0026).** It used to spawn `npx vitest run`, and npx fetched the latest
909
+ vitest from the registry when the project had none (`npm warn exec The
910
+ following package was not found and will be installed: vitest@...`), outside
911
+ the project's lockfile and release-age policy. It now runs the vitest found in
912
+ the project's `node_modules` (or a parent's). Without one, `feat run` exits
913
+ `2` with `VITEST_NOT_INSTALLED`: add vitest as a dev dependency. vitest is a
914
+ peer dependency, `>=3.2.0`.
915
+
899
916
  ## What changed in 0.5.0
900
917
 
901
918
  - **The `touches` gate (SPEC-CHG-001).** `feat audit --changed <base>` checks a
@@ -965,12 +982,16 @@ The toolchain is specified in `.feat` and built with itself.
965
982
  exclusive faults run in a serial pass
966
983
  - [SPEC-RT-006](https://github.com/mmmnt/feature/blob/main/packages/feat-runtime/harness-namespace.feat):
967
984
  one namespace per spec file
985
+ - [SPEC-RT-010](https://github.com/mmmnt/feature/blob/main/packages/feat-runner/local-vitest.feat):
986
+ `feat run` runs the project's own vitest, never a fetched one
968
987
  - [ADR-0022](https://github.com/mmmnt/feature/blob/main/docs/adr/ADR-0022-uppercamel-rejection-ids.md):
969
988
  rejection ids, `UPPER_SNAKE` or `UpperCamel`
970
989
  - [ADR-0023](https://github.com/mmmnt/feature/blob/main/docs/adr/ADR-0023-adapter-interface-v2.md):
971
990
  observation modes, the scenario clock, fault injection
972
991
  - [ADR-0024](https://github.com/mmmnt/feature/blob/main/docs/adr/ADR-0024-tier-bindings.md):
973
992
  tier bindings
993
+ - [ADR-0026](https://github.com/mmmnt/feature/blob/main/docs/adr/ADR-0026-local-vitest.md):
994
+ the runner runs the project's vitest and never fetches one
974
995
  - [Grammar reference](https://github.com/mmmnt/feature/blob/main/docs/grammar-reference.md)
975
996
  - [Evidence bundle](https://github.com/mmmnt/feature/blob/main/docs/evidence-bundle.md)
976
997
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmmnt/feature",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "The feat CLI — Feature, the quality spine of AI-native delivery.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,13 +21,16 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@oclif/core": "^4.3.0",
24
- "@mmmnt/feat-core": "^0.5.0",
25
24
  "@mmmnt/feat-emit-ts": "^0.2.1",
26
- "@mmmnt/feat-derive": "^0.3.0",
27
25
  "@mmmnt/feat-types": "^0.3.0",
28
26
  "@mmmnt/feat-runtime": "^0.3.0",
29
- "@mmmnt/feat-analyze": "^0.1.9",
30
- "@mmmnt/feat-runner": "^0.2.0"
27
+ "@mmmnt/feat-core": "^0.5.0",
28
+ "@mmmnt/feat-derive": "^0.3.0",
29
+ "@mmmnt/feat-runner": "^0.3.0",
30
+ "@mmmnt/feat-analyze": "^0.1.9"
31
+ },
32
+ "peerDependencies": {
33
+ "vitest": ">=3.2.0"
31
34
  },
32
35
  "devDependencies": {
33
36
  "vitest": "^3.2.0",