You need the Node version in .node-version and pnpm 12. For install and deploy, see the
README, and for the development loop docs/development.md;
each example's README lists its commands.
pnpm install
pnpm run build
pnpm run checkpnpm run check typechecks the examples against the built component, so build first.
src/component/_generated comes from the Convex code generator, which needs a deployment. After a
change to the component's functions or schema, from packages/convex-hosting:
CONVEX_AGENT_MODE=anonymous npx convex dev --once
pnpm run build:codegenThe first command creates an anonymous local deployment and writes .env.local, .convex/, and an
empty app in convex/; git ignores all of them. The second runs
npx convex codegen --component-dir ./src/component against that deployment and builds the package.
Do not edit the generated files.
src/workers-sdk is a copy of Cloudflare's asset worker and of its test cases from
cloudflare/workers-sdk, each file at its upstream path, at the commit in src/workers-sdk/UPSTREAM.
Do not edit it by hand: CI runs the sync and fails when the folder differs. To update it, from
packages/convex-hosting:
node scripts/sync-workers-sdk.ts [<commit>]Cloudflare's integration fixtures under src/workers-sdk/fixtures run against anonymous local
Convex deployments, which the Convex CLI starts (the first run downloads the local backend):
pnpm run test:fixturesA test that fails by a stated difference from Cloudflare is listed in
packages/convex-hosting/scripts/fixtures-expected-failures.json with its reason; the run fails
when a listed test passes or an unlisted test fails.
- In a PR, bump
versionin the package'spackage.jsonand add aCHANGELOG.mdentry for@samebase/convex-hosting. - Merge it. The
Releaseworkflow runs CI for that commit, publishes every package version that is not on npm yet with provenance, and tags it as<package name>@<version>. No approval step: the merge is the release.
Before a release, test a PR build from its pkg.pr.new preview link, which CI posts on the PR.