Docs / Integrations / Migration mode
Migration guide
A guide from the snapshot, then a narrow edit of the version strings. It does not rewrite your source code.
The guide
A dry run prints this before the diff.
- Where the dependency is, the version Stellar publishes, the protocol, and the observation time. If the snapshot has no protocol number, the guide says so.
- Numbered steps: the version string kedgeway will change, the commands you run, and a check that your Stellar CLI and the network you deploy to target that protocol. kedgeway reads neither.
- For
soroban-clientand unscopedstellar-sdk, the files and lines that import them, up to 20. The search uses the same depth and skipped directories as the manifest scan, and does not follow symlinks. - Raven doc hits whose title or url is a migration document. A page that only mentions a migration inside a snippet is left out. If none qualify, the guide says no upgrade guide came back.
Run it
Terminal
kedgeway migrate [path] # dry run (default): prints a guide and a diff, edits nothing
kedgeway migrate [path] --dry-run # the same; cannot be combined with --write
kedgeway migrate [path] --write # applies the edits
kedgeway migrate . --fixture snapshot.json
kedgeway migrate . --offline # cached snapshot only (also --no-cache, --max-age)What it changes
- Rust. A deprecated or behind
soroban-sdkis bumped to the exact current version (for example28.0.0). Only the quoted version string on that one line changes, so comments,featuresand formatting stay.workspace = truemembers are left alone and the workspace root is bumped instead.=,~and^prefixes are kept; other ranges (>=,<) become manual steps. - JavaScript.
@stellar/stellar-sdkis bumped to the current version, keeping^or~(exact pins stay exact).package.jsonkeeps its key order and indentation. - Legacy packages.
soroban-clientand the unscopedstellar-sdkare replaced by@stellar/stellar-sdkat^current, plus a manual step listingrgpatterns for the imports you must update yourself. - Aliases. A member such as
"stellar-sdk": "npm:@stellar/stellar-sdk@^12.0.0"is read as the real package. A bump rewrites the value in place tonpm:@stellar/stellar-sdk@^<current>, keeping the prefix. An alias of a legacy package is replaced wholesale by"@stellar/stellar-sdk": "^<current>". An alias with no version becomes a manual step.
What it refuses
@stellar/stellar-baseis a manual step, because the snapshot has no current base version.- It never runs
cargoornpm. It prints the follow-up commands instead:cargo update -p soroban-sdkandnpm install. --writeis refused if a file it would touch has uncommitted changes in git. The check passes silently only when git is not installed or the path is not in a repository. Any other git failure also refuses the write.- Anything it cannot do safely is listed as a manual step with its reason. Only plain versions are edited:
12.x,12 || 13and comma ranges become manual steps, and dependencies inpeerDependencies,optionalDependencies,overridesorresolutionsare left alone. kedgeway never guesses. - Edits are byte-exact: for
package.jsononly the affected spans change, and writes are atomic. Symlinked manifests are never edited.
Lockfiles
migratedecides from the resolved version when a lockfile exists, then edits the manifest only. It never edits a lockfile.- When the manifest already allows the current major but the lockfile pins an older version, a bump would change nothing. kedgeway emits a manual step to refresh the lockfile instead:
cargo update -p soroban-sdk,npm update <name>,pnpm update <name>oryarn upgrade <name>. - Whenever a planned file has a lockfile, the plan also reminds you that the edits do not update it.
Exit codes
| Code | Meaning |
|---|---|
0 | Nothing to do, only manual steps in a dry run, or the edits were applied cleanly. |
2 | A dry run has at least one automatic edit (so CI can gate on it), or --write could not apply some step. |
1 | Error, including a refused write. |