Skip to content

docs: preview generated v1 and v2 SDK documentation - #30

Draft
roncohen wants to merge 2 commits into
mainfrom
docs/sdk-versioning-preview
Draft

roncohen wants to merge 2 commits into
mainfrom
docs/sdk-versioning-preview

Conversation

@roncohen

@roncohen roncohen commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Populate the SDK preview with generated v1 and v2 documentation for Node, Browser, React and Vue, replacing the earlier React-only samples.

SDK READMEs and source comments in reflagcom/javascript remain the source of truth. This repository holds generated copies, navigation and preview configuration—not independently maintained SDK API docs.

  • Full README/reference pairs, Browser feedback and referenced assets in each variant.
  • Aligned package/reference paths and complete per-variant SUMMARY.md navigation.
  • Native JavaScript SDKs → v2 (candidate) / v1 (legacy) mapping at both the repository root and the existing previews/sdk-versioning project, retaining the same preview identity keys.
  • Individual-space .gitbook.yaml fallbacks at both project locations point to the actual generated v2 content, rather than the maintainer README/empty prototype.
  • Source commit/version/hash manifests and a deterministic importer; generated files are marked in .gitattributes for review.
  • CI independently rebuilds both exact SDK sources, compares generated output and compiles six smoke examples against matching declarations.

Start at previews/sdk-versioning/README.md.

Source versions

Variant Source commit SDK versions
v1 b4fe5b3d9386b87c6546175c323862d9878e1430 Node 1.8.3; Browser/React 1.7.4; Vue 1.5.7
v2 9f3a0ae027e386747a2d4cf7683a68dcab70b355 Node/Browser/React/Vue 2.0.0-next.0

The v1 checkout is Node's published tag; the other three package trees are identical to their published tags at 70b7fbe7e65e95e7bce5ccad64400b0c3e06f63c. V2 is an unreleased source candidate, not a packed/deployed acceptance claim. Native/OpenFeature/Management and the separate local CLI 2 work are not included in this coordinated selector.

The importer applies only presentation/link fixes: version/source banners, major-pinned install commands, canonical README routing (avoiding TypeDoc's _media/README.md collision), property-anchor normalization and trailing whitespace in generated code blocks. API text originates in the SDK repository. Landing/navigation files are not generated or overwritten by it.

GitBook preview and remaining configuration

The generated v2 content is now visibly rendered at:

https://docs.reflag.com/~/revisions/WpbznaqM0NJHyEE54aa5/

That PR preview currently renders as a single space; no native version picker is visible. A space-level Git Sync connection reads .gitbook.yaml, not a site-wide structure. Both v1/v2 content roots and native mappings are ready in the branch, but exposing them together requires site-wide Git Sync/content mapping or GitBook-configured variants. This PR does not silently replace that with Markdown tabs or duplicate version navigation.

Read-only inspection of the existing live Reflag space still reported main/individual-space sync. No connection, branch, sync direction, site structure, default or publication setting was changed. Do not infer site-settings isolation from a successful content PR preview.

Scope / do not merge as production migration

  • Draft SDK preview only. The preview site mapping omits the full production documentation; preserve/export real production keys, IDs, content and URLs before migrating. The existing sdk-preview-* keys are NOT replacements for production identities.
  • Root preview configuration is now intentional; the original root README.md, SUMMARY.md, SDK include and generated sdk/ tree remain unchanged.
  • No site creation, merge, live publication, SDK release, deployment or snapshot rebuild.
  • The six local shared-guide edits and unfinished publisher work are excluded from this commit.
  • Full shared-v2 conversion, CLI 2 docs, legacy routing, production mapping and the release-scoped automatic publisher remain separate work. Matching SDK/CLI releases and server/snapshot readiness still gate cutover.

Verification

  • Clean, immutable v1/v2 SDK source installs and all four relevant SDK builds; v2 evaluator build; canonical strict TypeDoc builds. V1 uses yarn exec bash ./docs.sh because that published script declares /bin/sh but contains [[.
  • Importer --check reproduces both generated variants from the exact source checkouts.
  • yarn test: both mappings validated against GitBook's published schema, generated provenance, complete navigation, aligned SDK paths, local pages/assets/anchors, and 14 passing tests/negative controls.
  • Six React smoke examples compile with zero diagnostics against real React/Browser 1.7.4 and 2.0.0-next.0 declarations, including anti-any/wrapper guards. These are retained test fixtures, not a claim that every partial example in every generated reference was compiled.
  • Scoped formatting, zero-warning lint and git diff --check pass.
  • All reported GitBook statuses are SUCCESS. The generated v2 overview, all four SDK READMEs/references and Browser feedback are browser-verified. Native v1/v2 picker behavior for this full project remains unverified/inactive in that single-space preview; earlier small-fixture tests do not establish it.

Read-only CI: SUCCESS — https://github.com/reflagcom/docs/actions/runs/42226618831, including independent source rebuilds, generated-output comparisons and all six smoke examples.

@roncohen roncohen changed the title docs: add source-controlled SDK versioning preview docs: preview generated v1 and v2 SDK documentation Nov 6, 2026
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