Skip to content

feat(cli): generate SDK v2 flag value types - #817

Merged
roncohen merged 3 commits into
mainfrom
feat/cli-v2
Nov 24, 2026
Merged

roncohen merged 3 commits into
mainfrom
feat/cli-v2

Conversation

@roncohen

@roncohen roncohen commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • Generate direct-value TypeScript declarations for the Node.js, React, and Vue v2 SDKs. Boolean flags are typed as boolean, and Multivariate flag types are inferred from the current Production variants rather than legacy Remote config wrappers.
  • Read flags and targeting through the management API. Reject incomplete flag lists and targeting responses from the wrong environment. Preserve JSON value types and escape generated property names.
  • Update the CLI flag commands, configuration schema, and generated agent instructions for SDK v2. Use the same format list for command options, interactive setup, and generation.

Compatibility

This adds a major Changeset for @reflag/cli. Projects using SDK v1 should stay on CLI 1.x for legacy type generation.

Verification

  • Synced main (a2389e8) through merge commit ba31b03, preserving history and the generated-declaration CI check. No additional CLI implementation changes were made in this sync.
  • Fresh local verification on the merged tree: immutable Yarn install, 10 scoped SDK/provider/CLI/Express builds, 1,050 workspace runtime tests (including 58 CLI tests), and 48 Browser E2E cases across Chromium/Firefox/WebKit pass.
  • Generated declarations and registered-default checks compile against the Node.js, React, and Vue v2 SDKs in the workspace. Package CI runs this check after building the SDKs.
  • 17 release safeguards, five docs-publication tests, three docs-transform tests, the public manifest check, docs generation, formatting and lint pass. Management's checked-in TypeScript sources also compile. Full generator-backed Management/root builds remain a fresh CI gate because Java is unavailable locally; Next.js production-app builds are outside the local scoped build run.
  • The real Changesets plan selects only @reflag/cli, at 2.0.0-next.1, for a major prerelease under next. No package publication or dist-tag change was performed.
  • The JSON-schema review comment is addressed with Zod 4's built-in z.json() and its thread is resolved.
  • Earlier Package CI for the refactor, before the main sync.

@roncohen
roncohen marked this pull request as ready for review November 24, 2026 09:52

@reflag-review reflag-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium

no actionable findings

@roncohen
roncohen added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 0fe8795 Nov 24, 2026
9 checks passed
@roncohen
roncohen deleted the feat/cli-v2 branch November 24, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant