@async/api-contract 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/API_SURFACE.md +184 -0
- package/CHANGELOG.md +5 -0
- package/README.md +26 -0
- package/api-contract.json +424 -0
- package/docs/README.md +26 -0
- package/package.json +21 -5
package/API_SURFACE.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# @async/api-contract API Surface Ledger
|
|
2
|
+
|
|
3
|
+
This file is the generated review ledger for semantic API contract features. It is current-state contract documentation, not a changelog or tutorial.
|
|
4
|
+
|
|
5
|
+
## Async API Contract CLI
|
|
6
|
+
|
|
7
|
+
Contract: `@async/api-contract.cli`
|
|
8
|
+
|
|
9
|
+
### Analysis
|
|
10
|
+
|
|
11
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
12
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
13
|
+
| `cli.diff` | Package contract diff command | public | stable | active | | [docs](https://github.com/async/api-contract#cli) |
|
|
14
|
+
| `cli.impact` | Consumer impact report command | public | stable | active | | [docs](https://github.com/async/api-contract#cli) |
|
|
15
|
+
| `cli.usage.scan` | Line-oriented dependency usage scan command | beta | preview | active | | [docs](https://github.com/async/api-contract#cli) |
|
|
16
|
+
|
|
17
|
+
### Ledger
|
|
18
|
+
|
|
19
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
20
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
21
|
+
| `cli.ledger` | API surface ledger generation and drift check command | public | stable | active | | [docs](https://github.com/async/api-contract#cli) |
|
|
22
|
+
|
|
23
|
+
### Manifest
|
|
24
|
+
|
|
25
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
26
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
27
|
+
| `cli.check` | Manifest validation command | public | stable | active | | [docs](https://github.com/async/api-contract#cli) |
|
|
28
|
+
|
|
29
|
+
## Async API Contract Package Exports
|
|
30
|
+
|
|
31
|
+
Contract: `@async/api-contract.package-exports`
|
|
32
|
+
|
|
33
|
+
### Bin
|
|
34
|
+
|
|
35
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
36
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
37
|
+
| `bin.api-contract` | api-contract executable | public | stable | active | | [docs](https://github.com/async/api-contract#cli) |
|
|
38
|
+
|
|
39
|
+
### Exports
|
|
40
|
+
|
|
41
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
42
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
43
|
+
| `export.root` | Runtime API root export | public | stable | active | | [docs](https://github.com/async/api-contract#quick-start) |
|
|
44
|
+
| `export.types` | Type-only contract helper export | public | stable | active | | [docs](https://github.com/async/api-contract#type-only-contracts) |
|
|
45
|
+
|
|
46
|
+
## Async API Contract Runtime API
|
|
47
|
+
|
|
48
|
+
Contract: `@async/api-contract.runtime`
|
|
49
|
+
|
|
50
|
+
### Catalog
|
|
51
|
+
|
|
52
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
53
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
54
|
+
| `runtime.catalog.defineFeatureCatalog` | Feature catalog declaration helper | public | stable | active | | |
|
|
55
|
+
|
|
56
|
+
### Compare
|
|
57
|
+
|
|
58
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
59
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
60
|
+
| `runtime.compare.compareSurface` | Required-versus-supported surface comparison | public | stable | active | | |
|
|
61
|
+
|
|
62
|
+
### Derive
|
|
63
|
+
|
|
64
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
65
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
66
|
+
| `runtime.derive.deriveSurface` | Runtime value-to-surface derivation | public | stable | active | | |
|
|
67
|
+
|
|
68
|
+
### Diff
|
|
69
|
+
|
|
70
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
71
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
72
|
+
| `runtime.diff.diffPackageContracts` | Package manifest diff calculation | public | stable | active | | |
|
|
73
|
+
|
|
74
|
+
### Hash
|
|
75
|
+
|
|
76
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
77
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
78
|
+
| `runtime.hash.surfaceHash` | Stable surface hash calculation | public | stable | active | | |
|
|
79
|
+
|
|
80
|
+
### Impact
|
|
81
|
+
|
|
82
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
83
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
84
|
+
| `runtime.impact.createImpactReport` | Consumer impact report calculation | public | stable | active | | |
|
|
85
|
+
|
|
86
|
+
### Ledger
|
|
87
|
+
|
|
88
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
89
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
90
|
+
| `runtime.ledger.renderApiSurfaceMarkdown` | API surface markdown ledger renderer | public | stable | active | | |
|
|
91
|
+
|
|
92
|
+
### Manifest
|
|
93
|
+
|
|
94
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
95
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
96
|
+
| `runtime.manifest.parsePackageContractManifest` | Package contract manifest parser and validator | public | stable | active | | |
|
|
97
|
+
|
|
98
|
+
### Surface
|
|
99
|
+
|
|
100
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
101
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
102
|
+
| `runtime.surface.createSurface` | Normalized API surface creation | public | stable | active | | |
|
|
103
|
+
|
|
104
|
+
### Usage
|
|
105
|
+
|
|
106
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
107
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
108
|
+
| `runtime.usage.scanUsageTarget` | Line-oriented source usage scanner | beta | preview | active | | |
|
|
109
|
+
|
|
110
|
+
## Async API Contract Type Exports
|
|
111
|
+
|
|
112
|
+
Contract: `@async/api-contract.type-exports`
|
|
113
|
+
|
|
114
|
+
### Model
|
|
115
|
+
|
|
116
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
117
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
118
|
+
| `type.PackageContractManifest` | Package contract manifest type | public | stable | active | | |
|
|
119
|
+
| `type.Surface` | Normalized API surface type | public | stable | active | | |
|
|
120
|
+
|
|
121
|
+
### Type Contracts
|
|
122
|
+
|
|
123
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
124
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
125
|
+
| `type.AssertCompatible` | Compile-time compatibility assertion | public | stable | active | | [docs](https://github.com/async/api-contract#type-only-contracts) |
|
|
126
|
+
| `type.ContractRef` | Phantom contract reference type | public | stable | active | | [docs](https://github.com/async/api-contract#type-only-contracts) |
|
|
127
|
+
| `type.Expect` | Compile-time expectation helper | public | stable | active | | [docs](https://github.com/async/api-contract#type-only-contracts) |
|
|
128
|
+
| `type.RequiresContract` | Required contract phantom type | public | stable | active | | [docs](https://github.com/async/api-contract#type-only-contracts) |
|
|
129
|
+
| `type.SupportsContract` | Supported contract phantom type | public | stable | active | | [docs](https://github.com/async/api-contract#type-only-contracts) |
|
|
130
|
+
|
|
131
|
+
## Async API Contract Package Metadata
|
|
132
|
+
|
|
133
|
+
Contract: `@async/api-contract.package-metadata`
|
|
134
|
+
|
|
135
|
+
### Engines
|
|
136
|
+
|
|
137
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
138
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
139
|
+
| `metadata.engines.node` | Node.js engine floor | public | stable | active | | |
|
|
140
|
+
|
|
141
|
+
### Files
|
|
142
|
+
|
|
143
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
144
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
145
|
+
| `metadata.files.ledger` | API surface ledger is included in package files | public | stable | active | | |
|
|
146
|
+
| `metadata.files.manifest` | API contract manifest is included in package files | public | stable | active | | |
|
|
147
|
+
|
|
148
|
+
### Metadata
|
|
149
|
+
|
|
150
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
151
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
152
|
+
| `metadata.license.mit` | MIT license declaration | public | stable | active | | |
|
|
153
|
+
| `metadata.repository.github` | GitHub repository metadata | public | stable | active | | |
|
|
154
|
+
| `metadata.sideEffects.false` | Side-effect-free package declaration | public | stable | active | | |
|
|
155
|
+
|
|
156
|
+
### Package Manager
|
|
157
|
+
|
|
158
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
159
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
160
|
+
| `metadata.packageManager.pnpm` | pnpm package manager declaration | public | stable | active | | |
|
|
161
|
+
|
|
162
|
+
### Publish
|
|
163
|
+
|
|
164
|
+
| Feature | Title | Release | Stability | Lifecycle | Replacement | Docs |
|
|
165
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
166
|
+
| `metadata.publish.public` | Public npm publish access | public | stable | active | | |
|
|
167
|
+
|
|
168
|
+
## Supported Surfaces
|
|
169
|
+
|
|
170
|
+
| Contract | Hash | Features |
|
|
171
|
+
| --- | --- | --- |
|
|
172
|
+
| `@async/api-contract.cli` | `sha256:f3a9be69ec7b7f71c660c3e3395b5fe6619804248c16ad33fdba63ccc2d67a38` | `cli.check`, `cli.diff`, `cli.impact`, `cli.ledger`, `cli.usage.scan` |
|
|
173
|
+
| `@async/api-contract.package-exports` | `sha256:5ba4fde2647d791f7e2b21e0a9809b820a80a5329ea43b036e856fd2d65eb9b3` | `bin.api-contract`, `export.root`, `export.types` |
|
|
174
|
+
| `@async/api-contract.package-metadata` | `sha256:d7f3950ee79a616b25eb90d0e9947dac55bd14688b4beffa5420154009448927` | `metadata.engines.node`, `metadata.files.ledger`, `metadata.files.manifest`, `metadata.license.mit`, `metadata.packageManager.pnpm`, `metadata.publish.public`, `metadata.repository.github`, `metadata.sideEffects.false` |
|
|
175
|
+
| `@async/api-contract.runtime` | `sha256:f4d7605badb38a4ed10ec8c6c73aa6d41b653679700f95b25e2e77e5a8bdcf96` | `runtime.catalog.defineFeatureCatalog`, `runtime.compare.compareSurface`, `runtime.derive.deriveSurface`, `runtime.diff.diffPackageContracts`, `runtime.hash.surfaceHash`, `runtime.impact.createImpactReport`, `runtime.ledger.renderApiSurfaceMarkdown`, `runtime.manifest.parsePackageContractManifest`, `runtime.surface.createSurface`, `runtime.usage.scanUsageTarget` |
|
|
176
|
+
| `@async/api-contract.type-exports` | `sha256:b4804f2bb2ac9ac2d159ae81e3150a25980dfbd5badf99e2f65d3ed1643563a8` | `type.AssertCompatible`, `type.ContractRef`, `type.Expect`, `type.PackageContractManifest`, `type.RequiresContract`, `type.SupportsContract`, `type.Surface` |
|
|
177
|
+
|
|
178
|
+
## Required Surfaces
|
|
179
|
+
|
|
180
|
+
| Contract | Hash | Features |
|
|
181
|
+
| --- | --- | --- |
|
|
182
|
+
| `@async/api-contract.cli` | `sha256:109f7d81379d251bd8df213020a09e5cb60ff5a0725701b944d95d5de35ba4bf` | `cli.check`, `cli.ledger` |
|
|
183
|
+
| `@async/pipeline.cli` | `sha256:d98fbabdc807d0a093266381164ba0442c8fe65c172b9fc7009280f91b236e8e` | `cli.github.check`, `cli.github.generate`, `cli.publish.github`, `cli.publish.npm`, `cli.release.doctor`, `cli.run`, `cli.run-task`, `cli.sync.check`, `cli.sync.generate` |
|
|
184
|
+
| `@async/pipeline.declaration` | `sha256:e0bea5c3eafe5addbd08abbb37b9e9df010995567fc878aba996a41fc1cfd625` | `config.definePipeline`, `config.env`, `config.github.pages`, `config.job`, `config.sync.github`, `config.sync.tasks`, `config.task`, `config.trigger.github`, `config.trigger.manual`, `step.shell` |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
- Align package scripts, generated GitHub Actions, release/preview lifecycle, GitHub Pages, and API surface ledger generation with `@async/pipeline`.
|
|
6
|
+
- Add pnpm-first docs and release guidance for the shared Async repo workflow.
|
|
7
|
+
|
|
3
8
|
## 0.1.0
|
|
4
9
|
|
|
5
10
|
- Initial development version.
|
package/README.md
CHANGED
|
@@ -21,6 +21,10 @@ Package versions, release tags, docs text, and metadata do not decide compatibil
|
|
|
21
21
|
|
|
22
22
|
## Quick start
|
|
23
23
|
|
|
24
|
+
```sh
|
|
25
|
+
pnpm add @async/api-contract
|
|
26
|
+
```
|
|
27
|
+
|
|
24
28
|
```ts
|
|
25
29
|
import {
|
|
26
30
|
compareSurface,
|
|
@@ -145,6 +149,28 @@ api-contract usage scan --target src --package-name @async/consumer --dependency
|
|
|
145
149
|
|
|
146
150
|
`usage scan` is a line-oriented source preflight. It records dependency and feature-string evidence, but it is not a full parser or proof of semantic usage.
|
|
147
151
|
|
|
152
|
+
## Maintainer workflow
|
|
153
|
+
|
|
154
|
+
The repository's package scripts and GitHub Actions are generated from `pipeline.ts` through `@async/pipeline`.
|
|
155
|
+
|
|
156
|
+
```sh
|
|
157
|
+
pnpm run pipeline:verify
|
|
158
|
+
pnpm run pipeline:api-surface
|
|
159
|
+
pnpm run pipeline:api-surface:generate
|
|
160
|
+
pnpm run pipeline:github:check
|
|
161
|
+
pnpm run pipeline:sync:check
|
|
162
|
+
pnpm run release:check
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Release and preview lifecycle commands are also synced from `pipeline.ts`:
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
pnpm run pipeline:preview
|
|
169
|
+
pnpm run pipeline:snapshot
|
|
170
|
+
pnpm run pipeline:publish
|
|
171
|
+
pnpm run pipeline:release:doctor
|
|
172
|
+
```
|
|
173
|
+
|
|
148
174
|
## Relationship to @async/claims
|
|
149
175
|
|
|
150
176
|
`@async/claims` can wrap surfaces with issuer, evidence, trust, policy, and signatures. It should not redefine feature ids, hashes, derivation, or compatibility rules.
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "api-contract.package.v1",
|
|
3
|
+
"packageName": "@async/api-contract",
|
|
4
|
+
"catalogs": [
|
|
5
|
+
{
|
|
6
|
+
"format": "api-contract.catalog.v1",
|
|
7
|
+
"contractId": "@async/api-contract.cli",
|
|
8
|
+
"title": "Async API Contract CLI",
|
|
9
|
+
"features": [
|
|
10
|
+
{
|
|
11
|
+
"id": "cli.check",
|
|
12
|
+
"title": "Manifest validation command",
|
|
13
|
+
"releaseTag": "public",
|
|
14
|
+
"stability": "stable",
|
|
15
|
+
"lifecycle": "active",
|
|
16
|
+
"group": "manifest",
|
|
17
|
+
"docsUrl": "https://github.com/async/api-contract#cli"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "cli.diff",
|
|
21
|
+
"title": "Package contract diff command",
|
|
22
|
+
"releaseTag": "public",
|
|
23
|
+
"stability": "stable",
|
|
24
|
+
"lifecycle": "active",
|
|
25
|
+
"group": "analysis",
|
|
26
|
+
"docsUrl": "https://github.com/async/api-contract#cli"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "cli.impact",
|
|
30
|
+
"title": "Consumer impact report command",
|
|
31
|
+
"releaseTag": "public",
|
|
32
|
+
"stability": "stable",
|
|
33
|
+
"lifecycle": "active",
|
|
34
|
+
"group": "analysis",
|
|
35
|
+
"docsUrl": "https://github.com/async/api-contract#cli"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "cli.ledger",
|
|
39
|
+
"title": "API surface ledger generation and drift check command",
|
|
40
|
+
"releaseTag": "public",
|
|
41
|
+
"stability": "stable",
|
|
42
|
+
"lifecycle": "active",
|
|
43
|
+
"group": "ledger",
|
|
44
|
+
"docsUrl": "https://github.com/async/api-contract#cli"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "cli.usage.scan",
|
|
48
|
+
"title": "Line-oriented dependency usage scan command",
|
|
49
|
+
"releaseTag": "beta",
|
|
50
|
+
"stability": "preview",
|
|
51
|
+
"lifecycle": "active",
|
|
52
|
+
"group": "analysis",
|
|
53
|
+
"docsUrl": "https://github.com/async/api-contract#cli"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"format": "api-contract.catalog.v1",
|
|
59
|
+
"contractId": "@async/api-contract.package-exports",
|
|
60
|
+
"title": "Async API Contract Package Exports",
|
|
61
|
+
"features": [
|
|
62
|
+
{
|
|
63
|
+
"id": "bin.api-contract",
|
|
64
|
+
"title": "api-contract executable",
|
|
65
|
+
"releaseTag": "public",
|
|
66
|
+
"stability": "stable",
|
|
67
|
+
"lifecycle": "active",
|
|
68
|
+
"group": "bin",
|
|
69
|
+
"docsUrl": "https://github.com/async/api-contract#cli"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "export.root",
|
|
73
|
+
"title": "Runtime API root export",
|
|
74
|
+
"releaseTag": "public",
|
|
75
|
+
"stability": "stable",
|
|
76
|
+
"lifecycle": "active",
|
|
77
|
+
"group": "exports",
|
|
78
|
+
"docsUrl": "https://github.com/async/api-contract#quick-start"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "export.types",
|
|
82
|
+
"title": "Type-only contract helper export",
|
|
83
|
+
"releaseTag": "public",
|
|
84
|
+
"stability": "stable",
|
|
85
|
+
"lifecycle": "active",
|
|
86
|
+
"group": "exports",
|
|
87
|
+
"docsUrl": "https://github.com/async/api-contract#type-only-contracts"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"format": "api-contract.catalog.v1",
|
|
93
|
+
"contractId": "@async/api-contract.runtime",
|
|
94
|
+
"title": "Async API Contract Runtime API",
|
|
95
|
+
"features": [
|
|
96
|
+
{
|
|
97
|
+
"id": "runtime.catalog.defineFeatureCatalog",
|
|
98
|
+
"title": "Feature catalog declaration helper",
|
|
99
|
+
"releaseTag": "public",
|
|
100
|
+
"stability": "stable",
|
|
101
|
+
"lifecycle": "active",
|
|
102
|
+
"group": "catalog"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "runtime.compare.compareSurface",
|
|
106
|
+
"title": "Required-versus-supported surface comparison",
|
|
107
|
+
"releaseTag": "public",
|
|
108
|
+
"stability": "stable",
|
|
109
|
+
"lifecycle": "active",
|
|
110
|
+
"group": "compare"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "runtime.derive.deriveSurface",
|
|
114
|
+
"title": "Runtime value-to-surface derivation",
|
|
115
|
+
"releaseTag": "public",
|
|
116
|
+
"stability": "stable",
|
|
117
|
+
"lifecycle": "active",
|
|
118
|
+
"group": "derive"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "runtime.diff.diffPackageContracts",
|
|
122
|
+
"title": "Package manifest diff calculation",
|
|
123
|
+
"releaseTag": "public",
|
|
124
|
+
"stability": "stable",
|
|
125
|
+
"lifecycle": "active",
|
|
126
|
+
"group": "diff"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "runtime.hash.surfaceHash",
|
|
130
|
+
"title": "Stable surface hash calculation",
|
|
131
|
+
"releaseTag": "public",
|
|
132
|
+
"stability": "stable",
|
|
133
|
+
"lifecycle": "active",
|
|
134
|
+
"group": "hash"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "runtime.impact.createImpactReport",
|
|
138
|
+
"title": "Consumer impact report calculation",
|
|
139
|
+
"releaseTag": "public",
|
|
140
|
+
"stability": "stable",
|
|
141
|
+
"lifecycle": "active",
|
|
142
|
+
"group": "impact"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "runtime.ledger.renderApiSurfaceMarkdown",
|
|
146
|
+
"title": "API surface markdown ledger renderer",
|
|
147
|
+
"releaseTag": "public",
|
|
148
|
+
"stability": "stable",
|
|
149
|
+
"lifecycle": "active",
|
|
150
|
+
"group": "ledger"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "runtime.manifest.parsePackageContractManifest",
|
|
154
|
+
"title": "Package contract manifest parser and validator",
|
|
155
|
+
"releaseTag": "public",
|
|
156
|
+
"stability": "stable",
|
|
157
|
+
"lifecycle": "active",
|
|
158
|
+
"group": "manifest"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "runtime.surface.createSurface",
|
|
162
|
+
"title": "Normalized API surface creation",
|
|
163
|
+
"releaseTag": "public",
|
|
164
|
+
"stability": "stable",
|
|
165
|
+
"lifecycle": "active",
|
|
166
|
+
"group": "surface"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "runtime.usage.scanUsageTarget",
|
|
170
|
+
"title": "Line-oriented source usage scanner",
|
|
171
|
+
"releaseTag": "beta",
|
|
172
|
+
"stability": "preview",
|
|
173
|
+
"lifecycle": "active",
|
|
174
|
+
"group": "usage"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"format": "api-contract.catalog.v1",
|
|
180
|
+
"contractId": "@async/api-contract.type-exports",
|
|
181
|
+
"title": "Async API Contract Type Exports",
|
|
182
|
+
"features": [
|
|
183
|
+
{
|
|
184
|
+
"id": "type.AssertCompatible",
|
|
185
|
+
"title": "Compile-time compatibility assertion",
|
|
186
|
+
"releaseTag": "public",
|
|
187
|
+
"stability": "stable",
|
|
188
|
+
"lifecycle": "active",
|
|
189
|
+
"group": "type-contracts",
|
|
190
|
+
"docsUrl": "https://github.com/async/api-contract#type-only-contracts"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"id": "type.ContractRef",
|
|
194
|
+
"title": "Phantom contract reference type",
|
|
195
|
+
"releaseTag": "public",
|
|
196
|
+
"stability": "stable",
|
|
197
|
+
"lifecycle": "active",
|
|
198
|
+
"group": "type-contracts",
|
|
199
|
+
"docsUrl": "https://github.com/async/api-contract#type-only-contracts"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"id": "type.Expect",
|
|
203
|
+
"title": "Compile-time expectation helper",
|
|
204
|
+
"releaseTag": "public",
|
|
205
|
+
"stability": "stable",
|
|
206
|
+
"lifecycle": "active",
|
|
207
|
+
"group": "type-contracts",
|
|
208
|
+
"docsUrl": "https://github.com/async/api-contract#type-only-contracts"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "type.PackageContractManifest",
|
|
212
|
+
"title": "Package contract manifest type",
|
|
213
|
+
"releaseTag": "public",
|
|
214
|
+
"stability": "stable",
|
|
215
|
+
"lifecycle": "active",
|
|
216
|
+
"group": "model"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"id": "type.RequiresContract",
|
|
220
|
+
"title": "Required contract phantom type",
|
|
221
|
+
"releaseTag": "public",
|
|
222
|
+
"stability": "stable",
|
|
223
|
+
"lifecycle": "active",
|
|
224
|
+
"group": "type-contracts",
|
|
225
|
+
"docsUrl": "https://github.com/async/api-contract#type-only-contracts"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "type.Surface",
|
|
229
|
+
"title": "Normalized API surface type",
|
|
230
|
+
"releaseTag": "public",
|
|
231
|
+
"stability": "stable",
|
|
232
|
+
"lifecycle": "active",
|
|
233
|
+
"group": "model"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"id": "type.SupportsContract",
|
|
237
|
+
"title": "Supported contract phantom type",
|
|
238
|
+
"releaseTag": "public",
|
|
239
|
+
"stability": "stable",
|
|
240
|
+
"lifecycle": "active",
|
|
241
|
+
"group": "type-contracts",
|
|
242
|
+
"docsUrl": "https://github.com/async/api-contract#type-only-contracts"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"format": "api-contract.catalog.v1",
|
|
248
|
+
"contractId": "@async/api-contract.package-metadata",
|
|
249
|
+
"title": "Async API Contract Package Metadata",
|
|
250
|
+
"features": [
|
|
251
|
+
{
|
|
252
|
+
"id": "metadata.engines.node",
|
|
253
|
+
"title": "Node.js engine floor",
|
|
254
|
+
"releaseTag": "public",
|
|
255
|
+
"stability": "stable",
|
|
256
|
+
"lifecycle": "active",
|
|
257
|
+
"group": "engines"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "metadata.files.ledger",
|
|
261
|
+
"title": "API surface ledger is included in package files",
|
|
262
|
+
"releaseTag": "public",
|
|
263
|
+
"stability": "stable",
|
|
264
|
+
"lifecycle": "active",
|
|
265
|
+
"group": "files"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"id": "metadata.files.manifest",
|
|
269
|
+
"title": "API contract manifest is included in package files",
|
|
270
|
+
"releaseTag": "public",
|
|
271
|
+
"stability": "stable",
|
|
272
|
+
"lifecycle": "active",
|
|
273
|
+
"group": "files"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "metadata.license.mit",
|
|
277
|
+
"title": "MIT license declaration",
|
|
278
|
+
"releaseTag": "public",
|
|
279
|
+
"stability": "stable",
|
|
280
|
+
"lifecycle": "active",
|
|
281
|
+
"group": "metadata"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"id": "metadata.packageManager.pnpm",
|
|
285
|
+
"title": "pnpm package manager declaration",
|
|
286
|
+
"releaseTag": "public",
|
|
287
|
+
"stability": "stable",
|
|
288
|
+
"lifecycle": "active",
|
|
289
|
+
"group": "package-manager"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"id": "metadata.publish.public",
|
|
293
|
+
"title": "Public npm publish access",
|
|
294
|
+
"releaseTag": "public",
|
|
295
|
+
"stability": "stable",
|
|
296
|
+
"lifecycle": "active",
|
|
297
|
+
"group": "publish"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"id": "metadata.repository.github",
|
|
301
|
+
"title": "GitHub repository metadata",
|
|
302
|
+
"releaseTag": "public",
|
|
303
|
+
"stability": "stable",
|
|
304
|
+
"lifecycle": "active",
|
|
305
|
+
"group": "metadata"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"id": "metadata.sideEffects.false",
|
|
309
|
+
"title": "Side-effect-free package declaration",
|
|
310
|
+
"releaseTag": "public",
|
|
311
|
+
"stability": "stable",
|
|
312
|
+
"lifecycle": "active",
|
|
313
|
+
"group": "metadata"
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
"supported": [
|
|
319
|
+
{
|
|
320
|
+
"format": "api-contract.surface.v1",
|
|
321
|
+
"contractId": "@async/api-contract.cli",
|
|
322
|
+
"features": [
|
|
323
|
+
"cli.check",
|
|
324
|
+
"cli.diff",
|
|
325
|
+
"cli.impact",
|
|
326
|
+
"cli.ledger",
|
|
327
|
+
"cli.usage.scan"
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"format": "api-contract.surface.v1",
|
|
332
|
+
"contractId": "@async/api-contract.package-exports",
|
|
333
|
+
"features": [
|
|
334
|
+
"bin.api-contract",
|
|
335
|
+
"export.root",
|
|
336
|
+
"export.types"
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"format": "api-contract.surface.v1",
|
|
341
|
+
"contractId": "@async/api-contract.package-metadata",
|
|
342
|
+
"features": [
|
|
343
|
+
"metadata.engines.node",
|
|
344
|
+
"metadata.files.ledger",
|
|
345
|
+
"metadata.files.manifest",
|
|
346
|
+
"metadata.license.mit",
|
|
347
|
+
"metadata.packageManager.pnpm",
|
|
348
|
+
"metadata.publish.public",
|
|
349
|
+
"metadata.repository.github",
|
|
350
|
+
"metadata.sideEffects.false"
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"format": "api-contract.surface.v1",
|
|
355
|
+
"contractId": "@async/api-contract.runtime",
|
|
356
|
+
"features": [
|
|
357
|
+
"runtime.catalog.defineFeatureCatalog",
|
|
358
|
+
"runtime.compare.compareSurface",
|
|
359
|
+
"runtime.derive.deriveSurface",
|
|
360
|
+
"runtime.diff.diffPackageContracts",
|
|
361
|
+
"runtime.hash.surfaceHash",
|
|
362
|
+
"runtime.impact.createImpactReport",
|
|
363
|
+
"runtime.ledger.renderApiSurfaceMarkdown",
|
|
364
|
+
"runtime.manifest.parsePackageContractManifest",
|
|
365
|
+
"runtime.surface.createSurface",
|
|
366
|
+
"runtime.usage.scanUsageTarget"
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"format": "api-contract.surface.v1",
|
|
371
|
+
"contractId": "@async/api-contract.type-exports",
|
|
372
|
+
"features": [
|
|
373
|
+
"type.AssertCompatible",
|
|
374
|
+
"type.ContractRef",
|
|
375
|
+
"type.Expect",
|
|
376
|
+
"type.PackageContractManifest",
|
|
377
|
+
"type.RequiresContract",
|
|
378
|
+
"type.Surface",
|
|
379
|
+
"type.SupportsContract"
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"required": [
|
|
384
|
+
{
|
|
385
|
+
"format": "api-contract.surface.v1",
|
|
386
|
+
"contractId": "@async/api-contract.cli",
|
|
387
|
+
"features": [
|
|
388
|
+
"cli.check",
|
|
389
|
+
"cli.ledger"
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"format": "api-contract.surface.v1",
|
|
394
|
+
"contractId": "@async/pipeline.cli",
|
|
395
|
+
"features": [
|
|
396
|
+
"cli.github.check",
|
|
397
|
+
"cli.github.generate",
|
|
398
|
+
"cli.publish.github",
|
|
399
|
+
"cli.publish.npm",
|
|
400
|
+
"cli.release.doctor",
|
|
401
|
+
"cli.run",
|
|
402
|
+
"cli.run-task",
|
|
403
|
+
"cli.sync.check",
|
|
404
|
+
"cli.sync.generate"
|
|
405
|
+
]
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"format": "api-contract.surface.v1",
|
|
409
|
+
"contractId": "@async/pipeline.declaration",
|
|
410
|
+
"features": [
|
|
411
|
+
"config.definePipeline",
|
|
412
|
+
"config.env",
|
|
413
|
+
"config.github.pages",
|
|
414
|
+
"config.job",
|
|
415
|
+
"config.sync.github",
|
|
416
|
+
"config.sync.tasks",
|
|
417
|
+
"config.task",
|
|
418
|
+
"config.trigger.github",
|
|
419
|
+
"config.trigger.manual",
|
|
420
|
+
"step.shell"
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
]
|
|
424
|
+
}
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @async/api-contract
|
|
2
|
+
|
|
3
|
+
`@async/api-contract` publishes semantic API surfaces, review ledgers, and impact checks for Async packages.
|
|
4
|
+
|
|
5
|
+
## Maintainer tasks
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm run pipeline:verify
|
|
9
|
+
pnpm run pipeline:api-surface
|
|
10
|
+
pnpm run pipeline:api-surface:generate
|
|
11
|
+
pnpm run pipeline:github:check
|
|
12
|
+
pnpm run pipeline:sync:check
|
|
13
|
+
pnpm run release:check
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Consumer install
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
pnpm add @async/api-contract
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Package contract
|
|
23
|
+
|
|
24
|
+
- [API_SURFACE.md](https://github.com/async/api-contract/blob/main/API_SURFACE.md) is the generated review ledger.
|
|
25
|
+
- [api-contract.json](https://github.com/async/api-contract/blob/main/api-contract.json) is the checked manifest that produces the ledger.
|
|
26
|
+
- [README.md](https://github.com/async/api-contract/blob/main/README.md) has the public API and CLI examples.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@async/api-contract",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Semantic API contract surfaces, ledgers, and impact checks for Async packages.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,20 +29,36 @@
|
|
|
29
29
|
"async-pipeline": "async-pipeline",
|
|
30
30
|
"build": "tsc -p tsconfig.json && chmod +x dist/cli.js",
|
|
31
31
|
"pack:check": "npm --cache .async/npm-cache pack --dry-run",
|
|
32
|
+
"pipeline:api-surface": "async-pipeline run-task api-surface",
|
|
33
|
+
"pipeline:api-surface:generate": "async-pipeline run-task api-surface-generate",
|
|
32
34
|
"pipeline:github:check": "async-pipeline github check",
|
|
33
35
|
"pipeline:github:generate": "async-pipeline github generate",
|
|
36
|
+
"pipeline:pages": "async-pipeline run pages",
|
|
37
|
+
"pipeline:preview": "async-pipeline run preview",
|
|
34
38
|
"pipeline:publish": "async-pipeline run publish",
|
|
39
|
+
"pipeline:publish:github:main": "async-pipeline publish github main --package .",
|
|
40
|
+
"pipeline:publish:github:pr": "async-pipeline publish github pr --package .",
|
|
41
|
+
"pipeline:publish:github:release": "async-pipeline publish github release --package .",
|
|
42
|
+
"pipeline:publish:npm": "async-pipeline publish npm --package .",
|
|
43
|
+
"pipeline:release-doctor": "async-pipeline run release-doctor",
|
|
44
|
+
"pipeline:release:doctor": "async-pipeline release doctor --package .",
|
|
45
|
+
"pipeline:release:ensure": "async-pipeline release ensure --package .",
|
|
46
|
+
"pipeline:snapshot": "async-pipeline run snapshot",
|
|
35
47
|
"pipeline:sync:check": "async-pipeline sync check",
|
|
48
|
+
"pipeline:sync:generate": "async-pipeline sync generate",
|
|
36
49
|
"pipeline:verify": "async-pipeline run verify",
|
|
37
|
-
"
|
|
38
|
-
"release:
|
|
39
|
-
"test": "pnpm build && pnpm typecheck:contracts && node --test test/*.test.js",
|
|
50
|
+
"pipeline:verify:force": "async-pipeline run verify --force",
|
|
51
|
+
"release:check": "pnpm run pipeline:verify:force",
|
|
52
|
+
"test": "pnpm run build && pnpm run typecheck:contracts && node --test test/*.test.js",
|
|
40
53
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
41
54
|
"typecheck:contracts": "tsc --ignoreConfig --noEmit --module NodeNext --moduleResolution NodeNext --target ES2024 --strict test/types.test-d.ts"
|
|
42
55
|
},
|
|
43
56
|
"files": [
|
|
44
57
|
"dist",
|
|
58
|
+
"docs",
|
|
45
59
|
"examples",
|
|
60
|
+
"api-contract.json",
|
|
61
|
+
"API_SURFACE.md",
|
|
46
62
|
"README.md",
|
|
47
63
|
"CHANGELOG.md"
|
|
48
64
|
],
|
|
@@ -51,7 +67,7 @@
|
|
|
51
67
|
},
|
|
52
68
|
"sideEffects": false,
|
|
53
69
|
"devDependencies": {
|
|
54
|
-
"@async/pipeline": "0.
|
|
70
|
+
"@async/pipeline": "0.4.3",
|
|
55
71
|
"@types/node": "24.12.4",
|
|
56
72
|
"typescript": "6.0.3"
|
|
57
73
|
}
|