> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useshipd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade the Convex component to 0.2

> Migrate @shipdit/convex from 0.1.x to 0.2.0: removed SHIPD_EDGE_URL and stricter timestamp targeting.

## Overview

Affects the Convex component (`@shipdit/convex`) when upgrading from 0.1.x to 0.2.0. See the [Convex changelog](/changelog/convex) for the full release notes.

## 1. Remove `SHIPD_EDGE_URL`

Delete `SHIPD_EDGE_URL` from `defineApp({ env })` and from the `env` passed to `app.use(shipd, …)` for every mounted instance. The component now fetches from `https://edge.useshipd.com`.

```ts convex/convex.config.ts theme={null}
const app = defineApp({
  env: {
    SHIPD_SDK_KEY: v.string(),
    SHIPD_WEBHOOK_SECRET: v.string(),
  },
});

app.use(shipd, {
  name: "shipd",
  httpPrefix: "/shipd",
  env: {
    SHIPD_SDK_KEY: app.env.SHIPD_SDK_KEY,
    SHIPD_WEBHOOK_SECRET: app.env.SHIPD_WEBHOOK_SECRET,
  },
});
```

Then remove the deployment value:

```bash theme={null}
npx convex env remove SHIPD_EDGE_URL
```

> [!WARNING]
>
> `SHIPD_UNSAFE_EDGE_URL` exists for shipd development and test environments. Don't set it in
> production: the URL you pass receives your SDK key.

## Check timestamp rules before upgrading

Ordered comparisons (`gt`, `gte`, `lt`, `lte`) now accept `YYYY-MM-DD` (midnight UTC), or a date-time with a required `Z` or `±hh:mm` zone. Zone-less date-times, lenient formats, and impossible dates compare as strings. Audit flag rules, audience conditions, and the attributes your application sends:

```ts theme={null}
// Before: implicit local timezone
const cutoff = "2026-01-02T10:00:00";

// After: choose the timezone the rule intended
const cutoff = "2026-01-02T10:00:00Z"; // UTC
// Or "2026-01-02T10:00:00-08:00" for a fixed UTC-08:00 offset
```

Don't append `Z` unless the original value meant UTC. Correct impossible dates such as `2026-02-30`, and send the same explicit timestamp format in evaluation attributes. See [How values compare](/flags/targeting#how-values-compare).

> [!WARNING]
>
> Dashboard preview adopts this grammar on dashboard deploy. Production evaluation changes only when
> you upgrade `shipdit` or `@shipdit/convex`; the edge does not evaluate rules. An older SDK can therefore
> disagree with preview before you upgrade. Saving a flag or audience with an invalid date-looking
> ordered value returns an API warning and shows a dashboard warning, while still allowing string rules.

## Roll out and roll back

Upgrade the package and edit `convex.config.ts` in the same deploy. To roll back, pin `@shipdit/convex@0.1.3` and restore `SHIPD_EDGE_URL` in `convex.config.ts` and the deployment env.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.