Skip to content

flaglint migrate

flaglint migrate analyzes supported LaunchDarkly Node.js server SDK evaluation calls and separates safe call-site rewrites from manual-review work.

Terminal window
npx flaglint migrate ./src
npx flaglint migrate ./src --dry-run
npx flaglint migrate ./src --apply
OptionDescription
--dry-runPrint reviewable diffs without modifying files.
--applyApply only safely automatable rewrites.
--allow-dirtyAllow --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-testsExclude test/spec files and test directories.

Generated from the enterprise demo:

LaunchDarkly usages found: 19
Safely automatable: 10 · Manual review: 9
Reviewable diffs: 10
Diffs requiring provider setup: 0
Skipped usages: 9
return ldClient.boolVariation("checkout-v2", ctx, false);
return openFeatureClient.getBooleanValue("checkout-v2", false, ctx);

--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.