Publish SDK Packages
Publishes @aave packages to npm using changesets.
Checklist
You MUST use TodoWrite to create a todo for EACH step below. Mark each complete only after verification.
Pre-flight
- • Verify on
mainbranch and up-to-date:git checkout main && git pull - • Verify working directory is clean:
git statusshows no uncommitted changes - • Run
nvm useto ensure correct Node.js version - • Run
corepack enableto ensure correct pnpm version - • Run
pnpm installto update dependencies - • Run
pnpm buildto build all packages
Version Bump
- • Run
pnpm changeset:statusto check for pending changesets (if none exist, nothing to publish - STOP) - • Run
pnpm changeset:versionto bump versions - • Review output: if in pre-release mode and "major" bumps appear, ask user to confirm
- • Stage and commit:
git add . && git commit -m "chore: bumps up versions"
Publish
- • Verify npm authentication: run
pnpm whoami- •If it fails: ask user to run
pnpm loginthen re-verify
- •If it fails: ask user to run
- • Ask user for npm OTP code (from authenticator app)
- • Run
NPM_CONFIG_OTP=<otp> pnpm changeset:publishwith the provided OTP- •If OTP expires mid-publish: ask for new OTP and retry failed packages manually
- •If publish fails partially: check npm for which packages published, may need manual recovery
- • Run
git push --follow-tags
Stop Conditions
| Condition | Action |
|---|---|
| Not on main branch | git checkout main && git pull first |
| Uncommitted changes | Stash or commit first |
| Tests failing | Fix tests before publishing |
pnpm changeset:status shows no changesets | Nothing to publish - inform user |
pnpm whoami fails | User must run pnpm login |
| Major bump in pre-release mode | Confirm with user - may be unintentional |
Pre-release Mode
When .changeset/pre.json exists:
- •Packages publish with
-next.Nsuffix (e.g.,4.1.0-next.16) - •Major version bumps should be rare - verify intentional
- •The
tagfield inpre.jsonshows the npm dist-tag (next)
Common Mistakes
- •Skipping
nvm use- Wrong Node version causes build failures - •Forgetting
--follow-tags- Git tags not pushed, npm versions unlinked - •Not checking pre-release mode - Accidental major version bumps