Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
3f869ac
Update API docs for v12.3.1
Aug 23, 2026
3a23065
chore(deps): bump baseline-browser-mapping from 2.8.31 to 2.11.21 (#1…
dependabot[bot] Sep 10, 2026
bf8bc4e
chore(deps): bump nanoid from 3.3.16 to 3.3.18 (#1329)
dependabot[bot] Sep 10, 2026
0dba0ef
chore(deps): bump browserslist from 4.28.0 to 4.28.9 (#1336)
dependabot[bot] Sep 11, 2026
7ade9fd
chore(infrastructure): upgrade Node.js to 26 [Codex] (#1341)
jderochervlk Sep 13, 2026
91dc61e
chore(guide): satisfy React type peer dependency (#1343)
jderochervlk Sep 13, 2026
92d36b7
ci(guide): run browser tests explicitly (#1345)
jderochervlk Sep 13, 2026
3ed0fd8
docs(guide): add MVP launch checklist [Codex] (#1342)
jderochervlk Sep 13, 2026
b265d03
feat(guide): add desktop screen warning [Codex] (#1347)
jderochervlk Sep 13, 2026
df7a208
feat(guide): add base document metadata [Codex] (#1348)
jderochervlk Sep 13, 2026
b136943
chore(guide): add robots policy (#1349)
jderochervlk Sep 13, 2026
076deaf
feat(guide): add exercise reset control (#1350)
jderochervlk Sep 13, 2026
3baffe5
feat(guide): validate lesson collections [Codex] (#1346)
jderochervlk Sep 14, 2026
441d1d9
Add LMDmax logo to Trusted by our users section (#1334)
amn1729 Sep 14, 2026
c9a63ae
ci(docs): validate Wrangler Pages runtime [Codex] (#1340)
jderochervlk Sep 14, 2026
f04a597
fix(docs): generate absolute Open Graph image URLs (#1353)
jderochervlk Sep 16, 2026
65ea97a
Update API docs for v13.0.0-alpha.6
Sep 16, 2026
b0dba84
chore(deps): update frontend toolchain [Codex] (#1351)
jderochervlk Sep 16, 2026
42d7278
builds(cloudflare): simplify preview deployments [Codex] (#1352)
jderochervlk Sep 18, 2026
075dbe0
[codex] add Cloudflare SSR for playground (#1303)
jderochervlk Sep 18, 2026
1a2ff82
test: add homepage performance checks [codex] (#1355)
jderochervlk Sep 21, 2026
19147ed
refactor: split homepage component boundaries [codex] (#1358)
jderochervlk Sep 21, 2026
4866a09
perf(homepage): stabilize font loading [codex] (#1360)
jderochervlk Sep 21, 2026
bb09d4e
refactor(homepage): simplify clipboard and gallery interactions [code…
jderochervlk Sep 21, 2026
9973d6d
perf(homepage): load DocSearch on demand [codex] (#1363)
jderochervlk Sep 21, 2026
9d74ea3
perf(homepage): prerender the highlighted code examples [codex] (#1364)
jderochervlk Sep 21, 2026
0597a7d
perf(homepage): load syntax grammars at content boundaries [codex] (#…
jderochervlk Sep 21, 2026
842417c
perf(homepage): optimize responsive images and reserve media dimensio…
jderochervlk Sep 21, 2026
00f882a
perf(homepage): split CSS by route group [codex] (#1367)
jderochervlk Sep 21, 2026
9b534e2
perf: opt homepage and navbar into React Compiler [codex] (#1369)
jderochervlk Sep 21, 2026
e590848
fix: serve data for canonical documentation URLs (#1385)
fhammerschmidt Sep 29, 2026
9fca778
Fix playground v8 (#1386)
fhammerschmidt Oct 3, 2026
665a9f4
Fix v13 playground imports (#1387)
fhammerschmidt Oct 5, 2026
ff3eac6
improve playground highlighting (#1388)
tsnobip Oct 5, 2026
9f4eed9
test: run documentation script suites in CI (#1422)
fhammerschmidt Oct 9, 2026
d65d752
docs: refresh genType examples for ReScript 12 (#1424)
fhammerschmidt Oct 9, 2026
10e0dab
fix: validate documentation output examples (#1423)
fhammerschmidt Oct 9, 2026
89f6aeb
docs: refresh remaining v12 output examples (#1429)
fhammerschmidt Oct 9, 2026
d69f65c
fix: repair unchecked v12 documentation examples (#1425)
fhammerschmidt Oct 9, 2026
80ec77f
fix(docs): align manual prose with ReScript v12 (#1430)
fhammerschmidt Oct 9, 2026
8bb17f2
fix: clean up guide deployment assets and configuration (#1440)
fhammerschmidt Oct 10, 2026
6110a85
fix: align React docs with ReScript v12 and React 19 (#1431)
fhammerschmidt Oct 10, 2026
a62233b
chore: remove unused public assets (#1436)
fhammerschmidt Oct 11, 2026
e3a918d
doc: bind to a function inside an object with default export (#673)
aspeddro Oct 13, 2026
b7556f1
chore: prune redundant package script aliases (#1451)
fhammerschmidt Oct 13, 2026
ea06d54
chore(deps): combine open Dependabot updates (#1454)
fhammerschmidt Oct 13, 2026
4c01304
refactor: share interop helpers and remove agent-rule violations (#1452)
fhammerschmidt Oct 14, 2026
ba11db7
docs: cover remaining ReScript v12 features and tooling (#1456)
fhammerschmidt Oct 14, 2026
d6058b8
fix: repair broken assets, links, and 404 responses (#1435)
fhammerschmidt Oct 14, 2026
dd71e9d
fix: redirect legacy LLM URLs to generated manual files (#1434)
fhammerschmidt Oct 14, 2026
bd49ade
fix: load API docs from published compiler data (#1432)
fhammerschmidt Oct 14, 2026
8f84bae
fix: wait for runtime output before completing guide checkpoints (#1437)
fhammerschmidt Oct 14, 2026
3fe9c48
ci(actions): remove deprecated runtime warnings (#1361)
jderochervlk Oct 20, 2026
2c4c476
feat: document ref for self-referencing (#960)
czabaj Oct 20, 2026
8907667
docs: align contributor guidance with the current monorepo (#1449)
fhammerschmidt Oct 20, 2026
ea58b71
fix: make community navigation accessible on mobile (#1445)
fhammerschmidt Oct 20, 2026
034ec84
test: clean up visual baselines and verify component behavior (#1446)
fhammerschmidt Oct 20, 2026
94c0baa
fix: restore current blog RSS feed (#1455)
fhammerschmidt Oct 20, 2026
955ecab
fix: remove stale configuration and honor deployment environment (#1450)
fhammerschmidt Oct 20, 2026
2b573ed
ci: check ReScript formatting and committed output (#1448)
fhammerschmidt Oct 20, 2026
ce5fddb
test: align RSS feed checks with shared route generation (#1442)
fhammerschmidt Oct 20, 2026
6f63419
fix: align local test commands with their supported workflows (#1447)
fhammerschmidt Oct 20, 2026
2ec8872
docs: clarify agent rules and interop examples (#1453)
fhammerschmidt Oct 20, 2026
5a0c3aa
fix: enforce the guide lesson authoring contract (#1438)
fhammerschmidt Oct 20, 2026
aeaa8d8
refactor: remove obsolete website code and check unused exports (#1443)
fhammerschmidt Oct 20, 2026
4380674
chore: sync shared website updates into v13
fhammerschmidt Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.res linguist-language=ReScript
*.resi linguist-language=ReScript

/public/playground-bundles/** binary linguist-vendored
/apps/docs/public/playground-bundles/** binary linguist-vendored
13 changes: 13 additions & 0 deletions .github/scripts/clean-tracked-rescript-output.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail

# rescript clean only knows sources that still belong to the build. Identify
# tracked compiler output from the index so deleted/excluded sources are covered,
# while handwritten JavaScript and configuration remain untouched.
git ls-files -z -- '*.jsx' '*.mjs' |
while IFS= read -r -d '' output; do
committed=$(git show ":$output")
if [[ "$committed" == "// Generated by ReScript,"* ]]; then
rm -f -- "$output"
fi
done
44 changes: 44 additions & 0 deletions .github/scripts/deployment-environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -euo pipefail

# Keep the v13 custom domain on its Pages preview branch, including explicit
# releases from workflow_dispatch. Other branches keep isolated preview aliases.
if [[ "$RAW_BRANCH" == "v13" ]] && {
[[ "${GITHUB_EVENT_NAME:-}" == "push" ]] ||
[[ "${GITHUB_EVENT_NAME:-}" == "workflow_dispatch" && "${DEPLOY_ENVIRONMENT:-}" == "production" ]];
}; then
{
echo "SAFE_BRANCH=v13"
echo "DOCS_DEPLOYMENT_ENVIRONMENT=preview"
echo "VITE_DEPLOYMENT_URL=https://v13.rescript-lang.org"
echo "DOCS_DEPLOYMENT_URL=https://v13.rescript-lang.org"
} >> "$GITHUB_ENV"
exit 0
fi

# Pages selects production by branch. Manual previews of master must use a
# preview alias, while a manual production deploy must explicitly target master.
if [[ "${GITHUB_EVENT_NAME:-}" == "push" && "$RAW_BRANCH" == "master" ]] ||
[[ "${GITHUB_EVENT_NAME:-}" == "workflow_dispatch" && "${DEPLOY_ENVIRONMENT:-}" == "production" ]]; then
{
echo "SAFE_BRANCH=master"
echo "DOCS_DEPLOYMENT_ENVIRONMENT=production"
echo "VITE_DEPLOYMENT_URL="
echo "DOCS_DEPLOYMENT_URL=https://rescript-lang.org"
} >> "$GITHUB_ENV"
else
SANITIZED_BRANCH=$(echo "$RAW_BRANCH" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/^-+//; s/-+$//; s/-+/-/g')
BRANCH_PREFIX="${SANITIZED_BRANCH:0:19}"
BRANCH_PREFIX="${BRANCH_PREFIX:-preview}"
BRANCH_DIGEST=$(node --input-type=module -e '
import {createHash} from "node:crypto";
process.stdout.write(createHash("sha256").update(process.env.RAW_BRANCH).digest("hex").slice(0, 8));
')
SAFE_BRANCH="${BRANCH_PREFIX}-${BRANCH_DIGEST}"
{
echo "SAFE_BRANCH=$SAFE_BRANCH"
echo "DOCS_DEPLOYMENT_ENVIRONMENT=preview"
echo "VITE_DEPLOYMENT_URL=https://${SAFE_BRANCH}.rescript-lang.pages.dev"
echo "DOCS_DEPLOYMENT_URL=https://${SAFE_BRANCH}.rescript-lang.pages.dev"
} >> "$GITHUB_ENV"
fi
32 changes: 32 additions & 0 deletions .github/scripts/homepage-e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail

# Serve the production docs build on Cypress's fixed test port, wait until it is
# reachable, then run the homepage E2E command with any caller-provided options.
# The static server otherwise silently selects a different occupied port.
node --input-type=module -e '
import {createServer} from "node:net";
const server = createServer();
server.once("error", () => {
console.error("Port 4173 must be free before running homepage tests");
process.exitCode = 1;
});
server.listen(4173, "127.0.0.1", () => server.close());
'

SERVER=$(node --input-type=module -e 'import {fileURLToPath} from "node:url"; console.log(fileURLToPath(import.meta.resolve("@node-cli/static-server")))')
node "$SERVER" --host 127.0.0.1 --port 4173 build/client &
SERVER_PID=$!
trap 'kill "$SERVER_PID" 2>/dev/null || true; wait "$SERVER_PID" 2>/dev/null || true' EXIT

for _ in {1..30}; do
if curl --fail --silent --max-time 2 http://127.0.0.1:4173/ > /dev/null; then
yarn ci:test:e2e "$@"
exit 0
fi
kill -0 "$SERVER_PID"
sleep 1
done

echo "Homepage test server did not become ready" >&2
exit 1
14 changes: 14 additions & 0 deletions .github/scripts/lighthouse-cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

# Remove older Lighthouse artifacts for this branch after preserving the
# artifact uploaded by the current workflow run.
gh api --method GET \
"/repos/${GITHUB_REPOSITORY}/actions/artifacts" \
-f name="$LIGHTHOUSE_ARTIFACT_NAME" \
-f per_page=100 \
--jq '.artifacts[].id' | while read -r ARTIFACT_ID; do
if [[ "$ARTIFACT_ID" != "$CURRENT_ARTIFACT_ID" ]]; then
gh api --method DELETE "/repos/${GITHUB_REPOSITORY}/actions/artifacts/${ARTIFACT_ID}"
fi
done
24 changes: 24 additions & 0 deletions .github/scripts/lighthouse-environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail

# Export stable artifact keys for the current branch and its comparison branch;
# pull requests compare against their live base branch.
REPOSITORY_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)

if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
RAW_TARGET_BRANCH=$(gh api "/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" --jq '.base.ref')
TARGET_ENVIRONMENT=""
else
RAW_TARGET_BRANCH="$RAW_BRANCH"
TARGET_ENVIRONMENT="${DOCS_DEPLOYMENT_ENVIRONMENT:-}"
fi

ARTIFACT_NAME=$(node "$REPOSITORY_ROOT/apps/docs/scripts/lighthouse-report.mjs" artifact-name "$RAW_BRANCH" "${DOCS_DEPLOYMENT_ENVIRONMENT:-}")
TARGET_ARTIFACT_NAME=$(node "$REPOSITORY_ROOT/apps/docs/scripts/lighthouse-report.mjs" artifact-name "$RAW_TARGET_BRANCH" "$TARGET_ENVIRONMENT")

{
echo "LIGHTHOUSE_ARTIFACT_NAME=$ARTIFACT_NAME"
echo "LIGHTHOUSE_BRANCH=$RAW_BRANCH"
echo "LIGHTHOUSE_TARGET_ARTIFACT_NAME=$TARGET_ARTIFACT_NAME"
echo "LIGHTHOUSE_TARGET_BRANCH=$RAW_TARGET_BRANCH"
} >> "$GITHUB_ENV"
39 changes: 39 additions & 0 deletions .github/scripts/lighthouse-restore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail

# Restore the newest Lighthouse baseline for the comparison branch, tolerating
# artifacts removed by a concurrent workflow while retaining other failures.
mkdir -p .lighthouse-target

ARCHIVE_PATH="$RUNNER_TEMP/lighthouse-target.zip"
DOWNLOAD_ERROR="$RUNNER_TEMP/lighthouse-target-error.log"

for ATTEMPT in 1 2 3; do
ARTIFACT_ID=$(gh api --method GET \
"/repos/${GITHUB_REPOSITORY}/actions/artifacts" \
-f name="$LIGHTHOUSE_TARGET_ARTIFACT_NAME" \
-f per_page=100 \
--jq '.artifacts | map(select(.expired == false)) | sort_by(.created_at) | last | .id // empty')

if [[ -z "$ARTIFACT_ID" ]]; then
echo "No Lighthouse baseline found for target branch $LIGHTHOUSE_TARGET_BRANCH"
exit 0
fi

if gh api "/repos/${GITHUB_REPOSITORY}/actions/artifacts/${ARTIFACT_ID}/zip" > "$ARCHIVE_PATH" 2> "$DOWNLOAD_ERROR"; then
unzip -q "$ARCHIVE_PATH" -d .lighthouse-target
exit 0
else
DOWNLOAD_STATUS=$?
fi

cat "$DOWNLOAD_ERROR" >&2
rm -f "$ARCHIVE_PATH"
if ! grep -Eq '^gh: .* \(HTTP (404|410)\)$' "$DOWNLOAD_ERROR"; then
exit "$DOWNLOAD_STATUS"
fi

echo "Lighthouse baseline artifact $ARTIFACT_ID disappeared during download (attempt $ATTEMPT of 3)"
done

echo "No Lighthouse baseline available for target branch $LIGHTHOUSE_TARGET_BRANCH after 3 attempts"
2 changes: 1 addition & 1 deletion .github/workflows/clear-ok-to-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
clear-label:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
pull-requests: write
steps:
Expand Down
62 changes: 41 additions & 21 deletions .github/workflows/deploy-fork-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:

jobs:
deploy-fork:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: ${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'ok-to-deploy' }}
permissions:
contents: read
deployments: write
pull-requests: write
pull-requests: read
steps:
# Note: fork PR workflows get a read-only GITHUB_TOKEN even if we request
# pull-requests: write, so we can't post PR comments here.
# The `ok-to-deploy` label permits the base-repository workflow to deploy
# the checked-out fork commit and publish its preview to GitHub.
- name: Fetch PR info
id: pr
uses: actions/github-script@v9.0.0
Expand Down Expand Up @@ -55,14 +55,18 @@ jobs:
ref: ${{ steps.pr.outputs.sha }}
persist-credentials: false

- name: Install Corepack
run: npm install --global corepack

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js environment
uses: actions/setup-node@v6.3.0
with:
node-version-file: ".node-version"
cache: "yarn"

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install

Expand All @@ -74,28 +78,44 @@ jobs:

- name: Deploy
id: deploy
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: apps/docs
command: pages deploy out --project-name=rescript-lang-org
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: 4.85.0
wranglerVersion: 4.130.0
continue-on-error: true
env:
FORCE_COLOR: 0

- name: Comment PR with deployment link
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: marocchino/sticky-pull-request-comment@v2
- name: Publish fork preview deployment to GitHub
if: ${{ steps.deploy.outcome == 'success' }}
uses: actions/github-script@v9.0.0
with:
recreate: true
header: fork-preview-deployment
message: |
## Fork PR Cloudflare deployment
PR: #${{ steps.pr.outputs.number }}
Deployement ID: ${{ steps.deploy.outputs.pages-deployment-id }}
Deployment Environment: ${{ steps.deploy.outputs.pages-environment }}
script: |
const deployment = await github.rest.repos.createDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
ref: process.env.PR_HEAD_SHA,
auto_merge: false,
required_contexts: [],
environment: "fork-preview",
production_environment: false,
transient_environment: true,
description: "Cloudflare fork preview",
});

${{ steps.deploy.outputs.command-output }}
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.data.id,
state: "success",
environment: "fork-preview",
environment_url: process.env.DEPLOYMENT_URL,
log_url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
description: "Cloudflare fork preview deployed",
auto_inactive: false,
});
env:
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
PR_HEAD_SHA: ${{ steps.pr.outputs.sha }}
Loading