@am_shork/attest 0.1.0 → 0.1.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/CHANGELOG.md +16 -0
- package/README.md +4 -3
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.1] - 2026-07-22
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Registry authoring is now decoupled from the Vitest runtime.** A new
|
|
15
|
+
vitest-free subpath export `@am_shork/attest/define` exposes
|
|
16
|
+
`defineRequirements` (and `delta`) without transitively importing
|
|
17
|
+
`./runtime.js` (which imports `vitest`). Previously, `.reqs.ts` that imported
|
|
18
|
+
the intent API from the package barrel worked only when Vite *transformed*
|
|
19
|
+
them (the loader's `vitest` stub applied); when the barrel was consumed as an
|
|
20
|
+
installed package, Vite SSR externalized it and its transitive `import
|
|
21
|
+
'vitest'` threw ("Vitest failed to access its internal state") during
|
|
22
|
+
`attest check`/`verify`, leaving the registry empty. Author `.reqs.ts` with
|
|
23
|
+
`import { defineRequirements } from '@am_shork/attest/define'`; keep importing
|
|
24
|
+
`requirement`/`scenario` from the barrel in `.spec.ts` (they run under Vitest).
|
|
25
|
+
|
|
10
26
|
## [0.1.0] - 2026-07-21
|
|
11
27
|
|
|
12
28
|
Initial release.
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ The killer move against drift: values that change (timeouts, limits) live **once
|
|
|
12
12
|
in a requirement's `params`, and tests read them from there — so a number is
|
|
13
13
|
physically impossible to drift between the spec and the assertion.
|
|
14
14
|
|
|
15
|
-
See [
|
|
15
|
+
See the authoritative design — [English](docs/en/attest-design.md) · [中文](docs/zh/attest-design.md) — and the rest of the [docs](docs/).
|
|
16
16
|
|
|
17
17
|
## Requirements
|
|
18
18
|
|
|
@@ -27,10 +27,11 @@ See [`docs/attest-design.md`](docs/attest-design.md) for the authoritative desig
|
|
|
27
27
|
pnpm add -D @am_shork/attest vitest vite
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
**1. Declare a requirement** (`requirements/auth.reqs.ts`)
|
|
30
|
+
**1. Declare a requirement** (`requirements/auth.reqs.ts`) — import the intent API
|
|
31
|
+
from the vitest-free `/define` subpath so registry loading never touches the runtime:
|
|
31
32
|
|
|
32
33
|
```ts
|
|
33
|
-
import { defineRequirements } from '@am_shork/attest';
|
|
34
|
+
import { defineRequirements } from '@am_shork/attest/define';
|
|
34
35
|
|
|
35
36
|
export default defineRequirements({
|
|
36
37
|
'AUTH-3': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@am_shork/attest",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "TDD-native spec framework: tests are the source of truth for verification, ID-bound requirements the source of truth for intent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.28.0",
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
24
|
"default": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./define": {
|
|
27
|
+
"types": "./dist/core/registry.d.ts",
|
|
28
|
+
"default": "./dist/core/registry.js"
|
|
25
29
|
}
|
|
26
30
|
},
|
|
27
31
|
"files": [
|