Migrate a Node Service
This tutorial uses the committed enterprise checkout demo. It migrates application call sites while keeping LaunchDarkly as the provider.
1. Build the Local CLI
Section titled “1. Build the Local CLI”npm run build2. Inspect the Inventory
Section titled “2. Inspect the Inventory”node ./dist/bin/flaglint.js scan \ ./examples/enterprise-checkout-service/src \ --config ./examples/enterprise-checkout-service/.flaglintrc \ --format markdownGenerated summary:
✓ 20 flag usages found across 11 unique flags (90ms)ℹ 1 dynamic flag key(s) require manual review3. Preview the Migration
Section titled “3. Preview the Migration”node ./dist/bin/flaglint.js migrate \ ./examples/enterprise-checkout-service/src \ --config ./examples/enterprise-checkout-service/.flaglintrc \ --dry-runGenerated summary:
LaunchDarkly usages found: 19Safely automatable: 10 · Manual review: 9Reviewable diffs: 10Diffs requiring provider setup: 0Skipped usages: 94. Apply on a Clean Branch
Section titled “4. Apply on a Clean Branch”migrate --apply requires a clean git working tree unless --allow-dirty is explicitly passed. Use it on a branch or a temporary copy first:
node ./dist/bin/flaglint.js migrate \ ./examples/enterprise-checkout-service/src \ --config ./examples/enterprise-checkout-service/.flaglintrc \ --applyFlagLint rewrites only supported call sites with a proven OpenFeature client binding. It does not rewrite dynamic keys, detail evaluations, bulk calls, or ambiguous patterns.
5. Validate the Completed Boundary
Section titled “5. Validate the Completed Boundary”node ./dist/bin/flaglint.js validate \ ./examples/enterprise-checkout-service/after-complete \ --config ./examples/enterprise-checkout-service/.flaglintrc \ --no-direct-launchdarklyGenerated output:
✓ validate --no-direct-launchdarkly: no direct LaunchDarkly evaluation calls found. Scanned 5 file(s).