Files
Segun Adebayo 837446e5ba test(react): add a react render benchmark
The three existing bench files all measure functions in isolation, which is
misleading here: `cssFn` and `transform` memoize the layer above style
resolution, so work that looks hot on its own barely runs during a render.
Measured on `renderToString`, three separate function-level wins of 34x, 9x
and 2.9x each came out to no change at all.

Adds `pnpm bench` and four benches over real trees, shaped after the cases
that actually regressed: a data table of recipe components (#10878) and a
dialog form (#9698), plus a varied page that misses the style caches.

Validated against the regression it exists to catch: reintroducing
04a1a07f1e, which stripped memo from `cssFn`, `mergeFn` and `transform`,
registers as 0.39x-0.52x here, far outside the +-5% noise floor.

Server rendering only. Mounting into jsdom measured at +-9% to +-13%, wide
enough to hide a 1.5x regression, and it adds coverage of effects and
reconciliation rather than style resolution.
2026-09-14 00:00:06 +01:00

121 lines
4.2 KiB
JSON

{
"name": "chakra-ui",
"private": true,
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/chakra-ui/chakra-ui.git"
},
"author": "Segun Adebayo <sage@adebayosegun.com>",
"license": "MIT",
"scripts": {
"prepare": "husky",
"local:sync": "tsx scripts/symlink.ts",
"local:revert": "tsx scripts/symlink.ts --revert",
"build:tokens": "chakra typegen packages/react/src/preset.ts",
"build:tokens-dev": "cross-env LOCAL=1 chakra typegen packages/react/src/preset.ts",
"build": "pnpm --filter=./packages/* build",
"build:fast": "pnpm --filter=./packages/* build:fast",
"dev": "pnpm --recursive --parallel --filter=./packages/* dev",
"postbuild": "pnpm build:tokens",
"typedocs": "pnpm www generate:types",
"typecheck": "tsgo --noEmit",
"test": "vitest",
"bench": "vitest bench --run",
"react": "pnpm --filter=@chakra-ui/react",
"www": "pnpm --filter=./apps/www",
"mcp": "pnpm --filter=./apps/mcp",
"panda": "pnpm --filter=./packages/panda-preset",
"lint": "eslint packages --ext .ts,.tsx --cache",
"format:check": "prettier --check packages --cache",
"format:write": "prettier --write packages --cache",
"clean:modules": "find . -name node_modules -type d -prune -exec rm -rf {} +",
"clean:storybook": "rm -rf node_modules/.cache/storybook",
"storybook": "storybook dev -p 6006",
"build:storybook": "pnpm build:fast && storybook build",
"serve:storybook": "pnpx serve storybook-static",
"clean": "pnpm -r --parallel exec rimraf dist *.log",
"slack": "tsx scripts/slack.ts",
"next:enter": "changeset pre enter next",
"next:exit": "changeset pre exit next",
"version": "changeset version",
"release": "changeset publish",
"version:dev": "changeset version --snapshot dev",
"release:dev": "changeset publish --tag dev"
},
"version": "2.0.0",
"dependencies": {
"@chakra-ui/cli": "workspace:*",
"@changesets/changelog-github": "0.7.0",
"@changesets/cli": "2.31.0",
"@changesets/get-release-plan": "4.0.16",
"@changesets/types": "6.1.0",
"@commitlint/cli": "20.5.3",
"@commitlint/config-conventional": "20.5.3",
"@emotion/react": "11.14.0",
"@eslint/compat": "^1.3.1",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.29.0",
"@octokit/rest": "^22.0.1",
"@rollup/plugin-alias": "6.0.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "16.0.3",
"@rollup/plugin-replace": "6.0.3",
"@storybook/addon-a11y": "10.4.2",
"@storybook/addon-themes": "10.4.2",
"@storybook/react-vite": "10.4.2",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.2",
"@testing-library/user-event": "14.6.1",
"@trivago/prettier-plugin-sort-imports": "6.0.2",
"@types/fs-extra": "11.0.4",
"@types/node": "24.13.1",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"@typescript-eslint/eslint-plugin": "8.60.1",
"@typescript-eslint/parser": "8.60.1",
"@typescript/native-preview": "7.0.0-dev.20260705.1",
"consola": "^3.4.2",
"cross-env": "10.1.0",
"dotenv": "17.4.2",
"eslint": "9.39.4",
"eslint-config-prettier": "10.1.8",
"eslint-config-react": "1.1.7",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-prettier": "5.5.6",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "5.2.0",
"eslint-plugin-testing-library": "7.16.2",
"execa": "9.6.1",
"fast-glob": "3.3.3",
"find-packages": "10.0.4",
"find-up-simple": "1.0.1",
"fs-extra": "11.3.5",
"globals": "^17.0.0",
"husky": "9.1.7",
"jsdom": "26.1.0",
"lint-staged": "16.4.0",
"npm-run-all": "4.1.5",
"prettier": "3.8.3",
"react": "19.2.6",
"react-dom": "19.2.6",
"rimraf": "6.1.3",
"rollup": "4.61.1",
"rollup-plugin-esbuild": "6.2.1",
"rollup-plugin-preserve-directives": "0.4.0",
"storybook": "10.4.2",
"tsup": "8.5.1",
"tsx": "4.22.4",
"typescript": "5.9.3",
"vite": "8.0.16",
"vitest": "4.1.8",
"vitest-axe": "0.1.0",
"vitest-matchmedia-mock": "2.0.3"
},
"packageManager": "pnpm@11.10.0",
"engines": {
"node": ">=22.x"
}
}