Skip to content

Commit 4d8aeeb

Browse files
authored
refactor: simplify validation tooling (#16)
1 parent 4ccd3b2 commit 4d8aeeb

66 files changed

Lines changed: 2566 additions & 45 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/package-validation.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@execbox/core": patch
3+
"@execbox/isolated-vm": patch
4+
"@execbox/process": patch
5+
"@execbox/protocol": patch
6+
"@execbox/quickjs": patch
7+
"@execbox/remote": patch
8+
"@execbox/worker": patch
9+
---
10+
11+
Fix published export metadata so CommonJS entrypoints resolve their `.d.cts`
12+
declaration files correctly, and add package validation with `publint` and
13+
Are the Types Wrong in CI.

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ jobs:
3737
- name: Run tests
3838
run: npm test
3939

40-
- name: Build
41-
run: npm run build
40+
- name: Package validation
41+
run: npm run package:check
42+
43+
- name: Check API reports
44+
run: npm run api:check
4245

4346
security:
4447
runs-on: ubuntu-latest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.worktrees/
22
node_modules/
3+
.npm-cache/
34
dist/
45
docs/.vitepress/cache/
56
docs/.vitepress/dist/
67
packages/*/dist/
8+
packages/*/temp/
79
coverage/
810
*.tsbuildinfo
911
.env

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ docs/.vitepress/dist
44
node_modules
55
package-lock.json
66
packages/**/dist
7+
packages/**/etc/*.api.md

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- Type-check: `npm run typecheck`
1515
- Test default workspace lanes: `npm test`
1616
- Build published packages: `npm run build`
17+
- Validate published package metadata and type resolution: `npm run package:check`
1718
- Build docs site: `npm run docs:build`
1819
- Run security-focused suites: `npm run test:security`
1920
- Run isolated-vm tests only when needed: `npm run test:isolated-vm`
@@ -30,6 +31,8 @@
3031
## Testing Instructions
3132

3233
- For most code changes, run `npm run format:check`, `npm run lint`, `npm run typecheck`, `npm test`, and `npm run build`.
34+
- If you change package exports, manifest fields, or published type-resolution behavior, also run `npm run package:check`.
35+
- If you change the public API of `@execbox/core`, `@execbox/core/mcp`, `@execbox/protocol`, `@execbox/quickjs`, `@execbox/quickjs/runner`, `@execbox/quickjs/runner/protocol-endpoint`, `@execbox/remote`, `@execbox/process`, `@execbox/worker`, `@execbox/isolated-vm`, or `@execbox/isolated-vm/runner`, also run `npm run api:check`.
3336
- If you change docs site content, navigation, or VitePress config, also run `npm run docs:build`.
3437
- If you touch execution boundaries, timeout handling, abort propagation, schema validation, or log/memory controls, also run `npm run test:security`.
3538
- If you touch `@execbox/isolated-vm` or codepaths guarded by `VITEST_INCLUDE_ISOLATED_VM`, run `npm run test:isolated-vm` or `npm run verify:isolated-vm`.
@@ -45,6 +48,7 @@
4548
- Use Conventional Commits for git commit messages, for example `docs: add agent and contributor guides` or `fix(worker): handle timeout classification`.
4649
- Published package releases are managed with Changesets and GitHub Actions.
4750
- Add a `.changeset/*.md` entry when a change affects published package behavior, public APIs, or release notes for one or more `@execbox/*` packages.
51+
- If you intentionally change a checked-in API report for `@execbox/core`, `@execbox/core/mcp`, `@execbox/protocol`, `@execbox/quickjs`, `@execbox/quickjs/runner`, `@execbox/quickjs/runner/protocol-endpoint`, `@execbox/remote`, `@execbox/process`, `@execbox/worker`, `@execbox/isolated-vm`, or `@execbox/isolated-vm/runner`, update it with `npm run api:update` in the same change as the code and changeset.
4852
- Skip a changeset for docs-only, examples-only, CI-only, or internal maintenance changes that do not affect published package behavior.
4953

5054
## Useful References

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,21 @@ This guide is for both humans and coding agents. Agent-specific operating instru
2020
## Verification
2121

2222
- General code changes: `npm run format:check`, `npm run lint`, `npm run typecheck`, `npm test`, and `npm run build`
23+
- Package export, manifest, or published type-resolution changes: `npm run package:check`
2324
- Docs site changes: `npm run docs:build`
2425
- Security or execution-boundary changes: `npm run test:security`
2526
- `@execbox/isolated-vm` changes: `npm run test:isolated-vm` or `npm run verify:isolated-vm`
2627

2728
Choose the smallest verification set that covers your change, and include the commands you ran in your PR or handoff notes when the context would help reviewers.
2829

30+
- Public API changes to `@execbox/core`, `@execbox/core/mcp`, `@execbox/protocol`, `@execbox/quickjs`, `@execbox/quickjs/runner`, `@execbox/quickjs/runner/protocol-endpoint`, `@execbox/remote`, `@execbox/process`, `@execbox/worker`, `@execbox/isolated-vm`, or `@execbox/isolated-vm/runner`: run `npm run api:check`
31+
2932
## Changesets
3033

3134
- Add a `.changeset/*.md` file for user-facing changes to published `@execbox/*` packages.
3235
- Skip changesets for docs-only, examples-only, CI-only, or internal refactors that do not change published package behavior.
3336
- Keep the changeset summary focused on the externally visible change.
37+
- If you intentionally change a checked-in API report, update the report baseline with `npm run api:update` and add the corresponding changeset in the same change.
3438

3539
## Commits
3640

0 commit comments

Comments
 (0)