Latest patch covered here: v4.0.1 (released 2026-05-30).
Requirements
- Node.js 20.0.0 or newer (v3 supported Node 18)
Breaking changes summary
Renames
client.users → client.user
api.users is still exported as a deprecated getter that proxies to api.user, but it prints a warning at runtime.
Backups → Snapshots
Backup export is now a deprecated alias of Snapshot.
Application
Application.custom
app.custom is now null (was undefined in v3) when no custom domain is bound.
app.commit(file, fileName, restart)
The third restart argument has been removed. Restart manually after committing:
app.files.create(content, path)
The signature is now create(content, fileName, path = "/"). Migrating:
Deploys
app.deploys.list() shape
Deployment.id
Now a plain commit SHA-1 (40 hex chars) instead of a `git-…` formatted string.
Network
app.network.dns()
app.network.analytics()
app.network.purgeCache()
Workspaces
What’s new in v4
Beyond the renames and signature changes above, v4 adds a substantial feature set:- Databases — full lifecycle, credentials, snapshots and metrics (Databases)
- Workspaces — team collaboration with invite codes and roles (Workspaces)
- Environment variables — list / set / replace / delete (Environment variables)
- Application metrics — 24h CPU/RAM/network samples (Managing applications)
- Real-time SSE stream —
app.realtime()(Realtime) - Edge analytics — analytics, errors, logs and latency percentiles (Network)
- GitHub App integration —
app.deploys.linkGithubApp({ ... })(Deploys) - Snapshot restore —
app.snapshots.restore({ snapshotId, versionId })anddb.snapshots.restore(snapshotId, versionId) - Status-all endpoints —
api.applications.statusAll(),api.databases.statusAll() - Service status —
api.service.status() - User scoped snapshots —
api.user.snapshots(scope) - New User fields —
User.locale,User.createdAt,User.databases - New BaseApplication fields —
domain,custom,createdAt SquareCloudAPIError.code— public forswitch-based error handling

