Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/tunnel-package-hygiene.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"subtext": minor
---

tunnel: package hygiene — split build/dist, untrack artifacts, harden publish.

Cleans up the publish flow so the tarball is always self-contained and local
builds can't get into a half-built state.

- `tunnel/build/` and `tunnel/dist/` are now gitignored; reproducible from
sources via `npm run build` / `npm run bundle`.
- `bin`/`files` point at `dist/`; `prepack` runs `bundle` so `npm publish` and
`npm pack` are always self-contained.
- `npm test` and `npm run build` are self-bootstrapping (`clean && tsc`).
- Adds `npm run verify` (`npm pack --dry-run`) for quick "what would ship?" checks.
- `main.ts` walks up to find `package.json` so it works from both the tsc
output (`build/src/main.js`) and the rollup bundle (`dist/index.js`).
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ node_modules/
# Local design docs, plans, and skill-eval writeups. Authored alongside
# implementation work but not part of the shipped plugin surface.
docs/

# Tunnel package build artifacts. tsc emits to build/, rollup emits to dist/.
# Both are reproducible from sources; npm publish regenerates them via prepack.
tunnel/build/
tunnel/dist/
13 changes: 13 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,16 @@ Version bumps are automated via [Changesets](https://github.com/changesets/chang
For any user-facing PR, run `npm run changeset`, pick a bump type, and commit the generated `.changeset/*.md` file. On merge to `main`, the workflow opens a "Version Packages" PR that bumps `package.json` and syncs the version into all harness manifests (`.claude-plugin/`, `.codex-plugin/`, `.cursor-plugin/`, and `marketplace.json`) via `scripts/sync-manifest-versions.mjs`. Merging that PR creates the git tag and GitHub release.

See [`.changeset/README.md`](.changeset/README.md) for the full workflow. Pure-infra / docs PRs can skip the changeset.

# Tunnel Development

`tunnel/build/` and `tunnel/dist/` are gitignored build artifacts — never commit them.

| Script | What it does |
|--------|--------------|
| `npm run build` | `clean` then `tsc` → emits JS to `build/` (used by tests and local dev) |
| `npm run bundle` | `build` then `rollup` → emits the single-file CLI to `dist/` (what npm ships) |
| `npm test` | `build` then `node --test` (self-bootstrapping; no stale build surprises) |
| `npm run verify` | `npm pack --dry-run` — shows exactly what `npm publish` would ship |

`prepack` runs `bundle` automatically, so `npm publish` and `npm pack` are always self-contained even if you forget to run `bundle` first.
179 changes: 0 additions & 179 deletions tunnel/build/src/allowlist.js

This file was deleted.

Loading