verelease 0.1.2-alpha.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 +145 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +2380 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +2499 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Verelease
|
|
2
|
+
|
|
3
|
+
> **Compatibility-Aware, Executable SemVer Release Engine for Modern JavaScript & TypeScript**
|
|
4
|
+
|
|
5
|
+
Verelease infers semantic versions from **actual compatibility evidence** instead of relying primarily on commit-message conventions or manually selected bump types.
|
|
6
|
+
|
|
7
|
+
It maintains a historical, executable model of what consumers were promised and uses that evidence to determine the correct version, propagate workspace dependencies, generate AI release intelligence, and safely publish across registries.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Key Features
|
|
12
|
+
|
|
13
|
+
- **Executable SemVer**: Determines version bumps (`none`, `patch`, `minor`, `major`) by replaying historical public contracts against candidate packages and analyzing TypeScript AST API surfaces.
|
|
14
|
+
- **Contracts ≠ Ordinary Tests**: Distinguishes public behavioral contracts from internal regression tests.
|
|
15
|
+
- **Candidate Package Isolation**: Tests the actual packed artifact (`npm pack`) inside isolated consumer environments to catch packaging errors (missing exports, bad declaration files, missing dist files).
|
|
16
|
+
- **Workspace & Monorepo Graph Engine**: Full support for `pnpm`, `npm`, `yarn`, and `bun` workspaces. Automatically propagates version bumps through dependency graphs and updates internal workspace ranges (`workspace:*`, `workspace:^`, etc.).
|
|
17
|
+
- **Transactional Manifest & Lockfile Management**: Updates `package.json`, `jsr.json`, and `deno.json` atomically with automatic rollback if lockfile regeneration fails. Never edits lockfiles manually.
|
|
18
|
+
- **Mixed Test Runner Adapters**:
|
|
19
|
+
- `node:test` (Node.js native runner)
|
|
20
|
+
- `vitest`
|
|
21
|
+
- `jest` (including React Testing Library suites)
|
|
22
|
+
- `bun:test`
|
|
23
|
+
- `deno:test`
|
|
24
|
+
- `playwright`
|
|
25
|
+
- Generic command adapter (`adapter: "command"`) for custom test suites
|
|
26
|
+
- **AI-Powered Release Intelligence (TanStack AI)**:
|
|
27
|
+
- Powered by `@tanstack/ai` with provider-independent typed structured outputs.
|
|
28
|
+
- **Automatic Changelog Generation**: Transforms structured compatibility evidence and Git metadata into clear, human-readable release notes.
|
|
29
|
+
- **Automatic Migration Guide Generation**: Produces step-by-step migration documentation with before/after snippets for breaking changes.
|
|
30
|
+
- **Validated Codemod Pipeline**: Generates executable migration scripts and verifies them against historical consumer fixtures in a sandbox environment before marking them `validated` (or `experimental` if tests fail).
|
|
31
|
+
- **Strict Separation of Concerns**: Deterministic compatibility engine decides version bumps; AI explains, documents, and migrates.
|
|
32
|
+
- **Pluggable Publishing**:
|
|
33
|
+
- `npm` publisher with pack verification, provenance, and dist-tag routing (`stable` → `latest`, `alpha`, `beta`, `rc`, `canary`).
|
|
34
|
+
- `jsr` / `deno` publisher.
|
|
35
|
+
- `github` Releases provider.
|
|
36
|
+
- **Safe by Default**: Full `--dry-run` support on all operations. Release plans are serializable domain models inspected before any filesystem mutations occur.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Monorepo Architecture
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
packages/
|
|
44
|
+
├── core/ # Domain boundaries, evidence model, release plan schema, pipeline orchestrator
|
|
45
|
+
├── workspace/ # Workspace discovery (pnpm, npm, yarn, bun), dependency graph & propagation
|
|
46
|
+
├── semver/ # Evidence-based SemVer decision engine & zero-major policy
|
|
47
|
+
├── contracts/ # Historical contract registry, temporal compatibility graph & candidate packer
|
|
48
|
+
├── api-diff/ # TypeScript AST API surface extractor & export diff engine
|
|
49
|
+
├── manifest/ # Transactional manifest mutator & lockfile regenerators (pnpm, npm, yarn, bun)
|
|
50
|
+
├── ai/ # TanStack AI release intelligence (changelogs, migration guides, validated codemods)
|
|
51
|
+
├── test-adapter/ # Base test adapter interfaces & generic command runner
|
|
52
|
+
├── test-adapter-node/ # node:test runner adapter
|
|
53
|
+
├── test-adapter-vitest/ # Vitest runner adapter
|
|
54
|
+
├── test-adapter-jest/ # Jest runner adapter
|
|
55
|
+
├── test-adapter-bun/ # Bun test runner adapter
|
|
56
|
+
├── test-adapter-deno/ # Deno test runner adapter
|
|
57
|
+
├── test-adapter-playwright/# Playwright test runner adapter
|
|
58
|
+
├── publisher-npm/ # npm publish provider
|
|
59
|
+
├── publisher-jsr/ # JSR publish provider
|
|
60
|
+
├── git/ # Git tags, release commits & clean tree verifier
|
|
61
|
+
├── source-host-github/ # GitHub Releases provider
|
|
62
|
+
├── config/ # Configuration file loader (verelease.config.ts)
|
|
63
|
+
└── cli/ # verelease / verel CLI
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## CLI Usage
|
|
69
|
+
|
|
70
|
+
### Plan Releases (`verelease plan`)
|
|
71
|
+
Calculates the exact release plan, confidence score, and dependency propagations across your monorepo without modifying any files:
|
|
72
|
+
```bash
|
|
73
|
+
npx verelease plan
|
|
74
|
+
```
|
|
75
|
+
Output as JSON:
|
|
76
|
+
```bash
|
|
77
|
+
npx verelease plan --json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Full Release Pipeline (`verelease release`)
|
|
81
|
+
Executes the full release pipeline (plan → manifest update → lockfile regeneration → AI changelogs/guides → publish in topological order):
|
|
82
|
+
```bash
|
|
83
|
+
# Dry run: verifies candidate packing, runs contracts, and simulates publication
|
|
84
|
+
npx verelease release --dry-run
|
|
85
|
+
|
|
86
|
+
# Production release: applies changes and publishes
|
|
87
|
+
npx verelease release
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Explain Release Decision (`verelease explain`)
|
|
91
|
+
Explains why a package received a specific version bump:
|
|
92
|
+
```bash
|
|
93
|
+
npx verelease explain @acme/router
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Contract Definition Example
|
|
99
|
+
|
|
100
|
+
Define historical contracts in `.verelease/contracts/`:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"id": "router.navigate.options-object",
|
|
105
|
+
"package": "@acme/router",
|
|
106
|
+
"category": "public",
|
|
107
|
+
"title": "createRouter options-object consumer contract",
|
|
108
|
+
"introducedIn": "1.0.0",
|
|
109
|
+
"removedIn": "3.0.0",
|
|
110
|
+
"severity": "major",
|
|
111
|
+
"testFile": "./contracts/router-options.test.js"
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
When candidate package 2.0.0 is built, Verelease unpacks the candidate tarball into an isolated environment and replays this test. If the candidate broke `{ routes }` support before version 3.0.0, the failure is captured as deterministic `major` compatibility evidence!
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Codemod Validation Pipeline
|
|
120
|
+
|
|
121
|
+
When machine-transformable breaking changes are detected, Verelease uses TanStack AI to generate a migration script, then validates it through a rigorous multi-stage sandbox:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
AI generates codemod
|
|
125
|
+
↓
|
|
126
|
+
Run against historical consumer fixtures
|
|
127
|
+
↓
|
|
128
|
+
Install candidate package
|
|
129
|
+
↓
|
|
130
|
+
Apply generated transformation
|
|
131
|
+
↓
|
|
132
|
+
Typecheck transformed project
|
|
133
|
+
↓
|
|
134
|
+
Run fixture test suite
|
|
135
|
+
↓
|
|
136
|
+
Verify compatibility
|
|
137
|
+
↓
|
|
138
|
+
Status: VALIDATED (or EXPERIMENTAL if any check fails)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
MIT
|
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|