Skip to content

Sync v12 core docs #991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 16, 2025
Merged

Sync v12 core docs #991

merged 10 commits into from
Jun 16, 2025

Conversation

tsnobip
Copy link
Member

@tsnobip tsnobip commented Mar 17, 2025

A draft to sync Stdlib docs (#981) based on #990.

Current state:

  • syncing JS docs crashes fixed
  • Stdlib docs are exported as Core and not as Stdlib fixed

Copy link

vercel bot commented Mar 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rescript-lang.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2025 1:19pm

Copy link

cloudflare-workers-and-pages bot commented Mar 17, 2025

Deploying rescript-lang-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9adeb35
Status: ✅  Deploy successful!
Preview URL: https://cad28eab.rescript-lang.pages.dev
Branch Preview URL: https://sync-v12-core-docs.rescript-lang.pages.dev

View logs

Base automatically changed from update-code-v12 to master March 17, 2025 09:24
@tsnobip tsnobip force-pushed the sync-v12-core-docs branch from 050dd03 to 9ef0111 Compare March 17, 2025 11:18
@tsnobip tsnobip marked this pull request as draft June 4, 2025 11:28
@tsnobip tsnobip force-pushed the sync-v12-core-docs branch from 9ef0111 to 3a4c988 Compare June 16, 2025 10:54
@tsnobip tsnobip marked this pull request as ready for review June 16, 2025 11:00
@tsnobip tsnobip requested a review from fhammerschmidt June 16, 2025 11:00
@fhammerschmidt
Copy link
Member

Can you still generate docs for Core/v11 with these changes?

@fhammerschmidt fhammerschmidt requested a review from Copilot June 16, 2025 11:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR prepares the documentation sync for v12 by updating naming and version logic to expose Stdlib instead of Core. Key changes include conditional handling of API category names, updates to version selection and constants, revised Node binding for process execution, and corresponding updates to the docs pages and JSON TOC.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/layouts/ApiOverviewLayout.res Uses conditional logic to display “Stdlib” for v12.0.0 and above and falls back to “Core” otherwise.
src/components/VersionSelect.res Adjusts the rendering of the section header based on the availability of versions.
src/common/Constants.res Renames and repurposes version arrays from “coreVersions” to “stdlibVersions” with updated logic.
src/bindings/Node.res Updates the execSync binding to accept optional options.
src/ApiDocs.res Revises key usage and string replacements to support the Stdlib naming convention.
scripts/gendocs.res Reorders arguments, updates command examples, and adds error handling with an increased max buffer.
pages/docs/manual/v12.0.0/api.mdx Updates headings and content to reflect the transition from “ReScript Core” to “Stdlib”.
data/api/v12.0.0/toc_tree.json Updates the JSON TOC to align with the new naming and structure.
Comments suppressed due to low confidence (2)

scripts/gendocs.res:32

  • Reordering arguments in the gendocs script changes the expected parameter positions; please update the related documentation and any call sites to ensure compatibility.
let version = switch args->Array.get(1) {

src/common/Constants.res:28

  • [nitpick] Ensure that the new variable name 'stdlibVersions' accurately reflects its purpose across the codebase and update any accompanying comments or documentation for clarity.
let stdlibVersions = versions.latest === "v11.0.0" ? [latestVersion] : [("v11.0.0", "v11"), latestVersion]

@tsnobip
Copy link
Member Author

tsnobip commented Jun 16, 2025

Can you still generate docs for Core/v11 with these changes?

@fhammerschmidt hmm likely not. What I could do would be to remove the diffs on gendocs since I'll move this logic to rescript monorepo anyway.

@fhammerschmidt
Copy link
Member

Yes that makes the most sense to move the logic there for v12.

@fhammerschmidt
Copy link
Member

Selecting a version from Belt should keep one in Belt but it currently jumps to Stdlib or Core as well.

@tsnobip
Copy link
Member Author

tsnobip commented Jun 16, 2025

Selecting a version from Belt should keep one in Belt but it currently jumps to Stdlib or Core as well.

good catch!

@tsnobip tsnobip changed the title [WIP] Sync v12 core docs Sync v12 core docs Jun 16, 2025
@tsnobip tsnobip merged commit e31f40c into master Jun 16, 2025
4 checks passed
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.

2 participants