Development commands
| Command | Purpose |
|---|---|
npm ci | Install the locked development dependencies. |
npm run build | Build ESM, CommonJS, declarations, and source maps. |
npm test | Run transport and resource tests with Vitest. |
npm run typecheck | Check strict TypeScript across source, examples, and tests. |
npm run lint | Run ESLint across the SDK. |
npm run format:check | Verify Prettier formatting. |
npm run prepublishOnly | Run the complete release validation pipeline. |
npm pack --dry-run | Inspect exactly what npm will publish. |
Published output
ESM
dist/index.jsCommonJS
dist/index.cjsESM declarations
dist/index.d.tsCJS declarations
dist/index.d.ctsSource maps
Included without embedded sourceEntry points
Package root onlyTest strategy
The test suite mocks Fetch only at the network boundary. It covers configuration, authentication, query encoding, responses, retries, deadlines, cancellation, pagination, task status updates, Solana option forwarding, and public routes.
Contract tests, not live verificationTests validate SDK behavior against its declared API contract; they do not claim that a deployed PBJ backend is available or compatible.
Release checklist
- Confirm backend contract compatibility.
- Run
npm run prepublishOnly. - Inspect output with
npm pack --dry-run. - Confirm package ownership and license metadata.
- Publish with
npm publish --access publiconly when authorized.
shell
npm run prepublishOnly
npm pack --dry-run
npm publish --access public