Release Jun 24, 2026
convex v1.42.0
Added a new npx convex project create command that can be used to create new projects programmatically. Added a new --names-only flag to npx convex env list (and npx convex env default list). This flag shows the names of the env vars that are set, without the values. It can be useful to let AI coding agents know the variables that are set on a deployment, without giving them the actual values. Added a new useStaleSnapshot option to the arguments for runQuery. This is an advanced feature that can be used to allow mutations to avoid optimistic concurrency control (OCC) conflicts in some cases where they can commit even though they depend on conflicting reads. This change allows us to improve the performance of some of the official Convex components, including Workpool. Improved the documentation of db.* methods to more clearly explain the difference between the old APIs without table names (e.g. db.get(userId)) and the new APIs with table names (e.g. db.get("users", userId)). Fixed an issue where the CLI would not surface permission errors correctly when the user or token doesn’t have permission to do something. Exposes the current scheduled function's ID as scheduledFunctionId in ctx.meta.getRequestMetadata(). npx convex insights has a new --json flag that makes the command output easier to parse programmatically. File storage: marked a few TypeScript types in convex/server as @deprecated (FileMetadata, FileStorageId, StorageId). These types are used only by file storage APIs that were deprecated in convex@1.6.0, so we also marked them as @deprecated for clarity. Bumps the ws peer dependency to avoid a vulnerable range.
v1.42.0