flaglint migrate
flaglint migrate analyzes supported LaunchDarkly Node.js server SDK evaluation calls and separates safe call-site rewrites from manual-review work.
Commands
Section titled “Commands”npx flaglint migrate ./srcnpx flaglint migrate ./src --dry-runnpx flaglint migrate ./src --applyOptions
Section titled “Options”| Option | Description |
|---|---|
--dry-run | Print reviewable diffs without modifying files. |
--apply | Apply only safely automatable rewrites. |
--allow-dirty | Allow --apply on a dirty git working tree. |
--output <file> | Write the default migration report to a file. |
--config <path> | Use an explicit config file. |
--exclude-tests | Exclude test/spec files and test directories. |
Dry-Run Output
Section titled “Dry-Run Output”Generated from the enterprise demo:
LaunchDarkly usages found: 19Safely automatable: 10 · Manual review: 9Reviewable diffs: 10Diffs requiring provider setup: 0Skipped usages: 9return ldClient.boolVariation("checkout-v2", ctx, false);return openFeatureClient.getBooleanValue("checkout-v2", false, ctx);Apply Contract
Section titled “Apply Contract”--apply rewrites only when a proven OpenFeature client binding exists. That binding may be local:
const openFeatureClient = OpenFeature.getClient();or imported through configured openFeatureClientBindings.
Provider/bootstrap setup is never inserted automatically.
Further Reading
Section titled “Further Reading”- LaunchDarkly-to-OpenFeature Node.js migration guide — see which LaunchDarkly calls require manual review and how proven rewrites are applied