Skip to content

[lexical] Chore: Migrate benchmarks to the Vitest 5 API - #9194

Closed
minwookshin wants to merge 1 commit into
meta:mainfrom
minwookshin:codex/fix-vitest5-benchmarks
Closed

minwookshin wants to merge 1 commit into
meta:mainfrom
minwookshin:codex/fix-vitest5-benchmarks

Conversation

@minwookshin

Copy link
Copy Markdown
Contributor

Description

The locked Vitest 5 dependency no longer exports the top-level bench function, leaving five benchmark files with seven test-TypeScript errors. The root benchmark script also selects project names that no longer match Vitest's generated benchmark projects.

Use the async test-context bench fixture, await each measurement, and select the generated project names. Preserve the workloads, document sizes, timing settings, setup and correctness assertions. Use supported per-iteration hooks for the paste workload, narrow its paragraph fixture, and update the benchmark README. Production implementation and dependency versions are unchanged.

Test plan

  • Before: the baseline test TypeScript graph reports seven benchmark errors; pnpm bench fails before collection with its old project filters.
  • After: pnpm run bench --reporter=verbose completes all 93 tests across five files, with no skips. The full test TypeScript graph passes.
  • Source/scripts/extension/website TypeScript, Flow, full ESLint and formatting also pass in the combined local checkout, which includes independent selection and macOS fixture fixes. Those fixes are outside this PR.

Tested on bc4dcc814f66e35b00f8e3b8b235e559f07454f2. The subsequent 2fd17f0 commit changes other files; this patch applies cleanly there. The full remote CI matrix has not been run locally. Benchmark runs retain the runner's module-export-getter warnings and establish execution/correctness, not a performance improvement.

AI-assisted implementation and validation with OpenAI Codex.

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lexical Ready Ready Preview Sep 23, 2026 12:59am UTC
lexical-playground Ready Ready Preview Sep 23, 2026 12:59am UTC

Request Review

@meta-cla

meta-cla Bot commented Sep 23, 2026

Copy link
Copy Markdown

Hi @minwookshin!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@etrepum

etrepum commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Your PRs can't be accepted or reviewed until the Meta CLA is accepted

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 25, 2026
@meta-cla

meta-cla Bot commented Sep 25, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@etrepum

etrepum commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

This one will be superseded by #9235 which adds a typecheck to ci-check to prevent future regressions if the API changes again

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 265a9f16 Deployed Sep 23, 2026 by vercel[bot]
Preview – lexical — 265a9f16 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants