Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Pages

on:
push:
branches: [master]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.8
- run: bun install --ignore-scripts --frozen-lockfile
- run: make pages
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: build/pages

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ check:
verify:
bun scripts/release.ts verify

pages:
bun scripts/pages.ts

release:
bun scripts/release.ts bump $(v)

release-dry:
bun scripts/release.ts bump $(v) --dry-run

.PHONY: check verify release release-dry
.PHONY: check verify pages release release-dry
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,34 @@ Monorepo for the `@wharfkit/*` TypeScript packages. Every member package lives u
## Layout

- `packages/<name>/` holds one npm package per directory, imported with full history from its standalone repository.
- `scripts/` holds the workspace tooling: `release.ts` (version bump and publish), `import-package.ts` (standalone repo import), `check-closure.ts` (membership closure check).
- `scripts/` holds the workspace tooling: `release.ts` (version bump, verify, and publish), `import-package.ts` (standalone repo import), and the `check-*.ts` scripts behind `make check`.
- `scripts/vendor/git-filter-repo` is a vendored, version-pinned copy of [git-filter-repo](https://github.com/newren/git-filter-repo) (v2.47.0, byte-identical to the upstream release, MIT licensed with the notice at `scripts/vendor/COPYING.mit`), invoked by `import-package.ts` via `python3`. No system install is required.
- `common.mk` is the Makefile every library member includes. It defines the build, test, lint, format, docs, coverage, and browser-bundle targets once, so a member's own Makefile is a few variable settings. `web-renderer`, `web-ui`, `svelte-components`, and `bundle` carry their own Svelte or Vite toolchains behind the same target names.

## Toolchain

- Package manager: bun workspaces with the isolated linker (`bunfig.toml`). Install with `bun install --ignore-scripts`.
- Tests run under node, not bun's test runner.
- Each package keeps its own build setup (Makefile, rollup, mocha, eslint) as imported. Shared root tooling is a later normalization pass.
- Stable releases are blocked while `.prerelease-only` exists at the repo root: every publish carries an rc suffix and lands on the npm dist-tag `next`. The go/no-go checkpoint removes the file.
- Third-party development dependencies are declared once at the root. Members declare only their runtime dependencies and their `workspace:*` references.
- Build: rolldown, with declarations from `tsc`. Lint and format: oxlint and oxfmt, configured at the root.
- Tests run under node with mocha, not bun's test runner. Node 20.19 is the supported floor.
- Stable releases are blocked while `.prerelease-only` exists at the repo root: every publish carries an rc suffix and lands on the npm dist-tag `next`.

## Branches

`dev` is the default branch and the integration branch: pull requests target it. `master` holds exactly what is published on npm. A release is one reviewed promotion pull request from `dev` to `master`, and the push to `master` publishes every member.

## Commands

```
make check # membership closure check
make verify # install, ordered build, checks, tests across the workspace
make check # membership closure, dependency, single-instance, license, and formatting checks
make verify # install, ordered build, per-member checks and tests across the workspace
make pages # API documentation, coverage, and browser tests for every member under build/pages/
make release v=<v> # bump to <v> and open a release PR
make release-dry v=<v>
```

Inside a member directory, `make` builds it, `make test` runs its tests, and `make check` lints it.

## Documentation

Consumer documentation is on [wharfkit.com](https://wharfkit.com). API documentation, coverage reports, and browser test suites for every member are published from `master` to [wharfkit.github.io/js](https://wharfkit.github.io/js/), one directory per package.
5 changes: 4 additions & 1 deletion browser-test.rolldown.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const MEMBERS = {
hyperion: {testsDir: '.'},
msigs: {testsDir: '.'},
'protocol-esr': {browserFetch: true},
'protocol-scatter': {browserFetch: true},
'protocol-scatter': {
browserFetch: true,
aliases: [{find: '$lib/create-hash', replacement: '../src/create-hash.ts'}],
},
roborovski: {testsDir: '.'},
'sealed-messages': {browserProvider: true},
'transact-plugin-autocorrect': {browserFetch: true},
Expand Down
Loading
Loading