Skip to content

[release] v0.19.0#1688

Draft
mellyeliu wants to merge 1 commit into
mainfrom
release/0.19.0
Draft

[release] v0.19.0#1688
mellyeliu wants to merge 1 commit into
mainfrom
release/0.19.0

Conversation

@mellyeliu

@mellyeliu mellyeliu commented May 30, 2026

Copy link
Copy Markdown
Member

0.19.0 (May 29, 2026)

  • New @stylexjs/atoms package for inline atomic styles.
  • Experimental nested APIs for stylex.create and stylex.defineVars.
  • Add support for Svelte with the unplugin bundler plugin.
  • New StyleX DevTools browser extension for inspecting compiled styles.
  • ESLint auto-fixers for shorthand expansion in stylex-valid-styles.

Copilot AI review requested due to automatic review settings May 30, 2026 01:37
@mellyeliu mellyeliu requested a review from nmn as a code owner May 30, 2026 01:37
@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
stylex Ready Ready Preview, Comment May 30, 2026 1:54am

Request Review

@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 May 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Release PR bumping all workspace packages from 0.18.3 to 0.19.0. Beyond version bumps, it ships a new @stylexjs/atoms package (compile-time atomic style helpers using property-access / call syntax) and wires its babel transform into @stylexjs/babel-plugin. Also fixes bail-out index tracking and adds module-level hoisting of compiled inline CSS objects in stylex.props, and re-exports CSSProperties from @stylexjs/stylex.

Changes:

  • Add @stylexjs/atoms package (runtime Proxy that throws, Flow/TS types, babel transform, README) and integrate the visitor into the babel-plugin pipeline.
  • Update stylex-props visitor to track only the earliest bail-out index, hoist compiled CSS objects, handle CallExpression arguments, and bail out for dynamic style call expressions.
  • Bump version to 0.19.0 across all packages and examples, add CHANGELOG entry and atoms demo page in example-nextjs.

Reviewed changes

Copilot reviewed 47 out of 52 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/@stylexjs/atoms/* (new) New atomic styles package: runtime proxy, Flow/TS types, babel transform, README, package.json.
packages/@stylexjs/babel-plugin/src/index.js Wires atoms visitor into Program.exit before stylex.props/call transforms.
packages/@stylexjs/babel-plugin/src/visitors/imports.js Detects @stylexjs/atoms imports/requires and records them in state.
packages/@stylexjs/babel-plugin/src/utils/state-manager.js Adds atomImports map.
packages/@stylexjs/babel-plugin/src/visitors/stylex-props.js Tightens StyleObject type; preserves first bail-out index; supports CallExpression args; bails for dynamic style functions; hoists compiled $$css objects.
packages/@stylexjs/babel-plugin/tests/transform-stylex-props-test.js Large new test block for atoms + props interactions.
packages/@stylexjs/stylex/src/stylex.js, types/StyleXTypes.{js,d.ts} Re-export CSSProperties; simplify StyleX$DefineMarker marker typing.
examples/example-nextjs/app/atoms-demo/page.tsx (new) Demo page exercising atoms across many cases.
examples/example-nextjs/tsconfig.json Adds target: ES2017 and reformats JSON.
CHANGELOG.md Adds 0.19.0 entry.
All other package.json files Bump versions and inter-package deps from 0.18.3 → 0.19.0.

Comment on lines +372 to +381
if (path.isCallExpression()) {
const callee = path.get('callee');
if (callee.isMemberExpression()) {
const obj = callee.get('object');
if (obj.isIdentifier() && state.styleMap.has(obj.node.name)) {
return 'other';
}
}
return 'other';
}
@github-actions

Copy link
Copy Markdown

workflow: benchmarks/perf

Comparison of performance test results, measured in operations per second. Larger is better.
yarn workspace v1.22.22
yarn run v1.22.22
$ node ./compare.js /tmp/tmp.fQdwYY3UWs /tmp/tmp.HC9q1RB2S0

Results Base Patch Ratio
babel-plugin: stylex.create
· basic create 583 600 1.03 +
· complex create 66 66 1.00
babel-plugin: stylex.createTheme
· basic themes 462 459 0.99 -
· complex themes 33 33 1.00
Done in 0.08s.
Done in 0.34s.

@github-actions

Copy link
Copy Markdown

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
yarn workspace v1.22.22
yarn run v1.22.22
$ node ./compare.js /tmp/tmp.O125XbR89r /tmp/tmp.TBYuoI5TbF

Results Base Patch Ratio
@stylexjs/stylex/lib/cjs/stylex.js
· compressed 1,535 1,535 1.00
· minified 5,166 5,166 1.00
@stylexjs/stylex/lib/cjs/inject.js
· compressed 1,793 1,793 1.00
· minified 4,915 4,915 1.00
benchmarks/size/.build/bundle.js
· compressed 496,650 496,650 1.00
· minified 4,847,840 4,847,840 1.00
benchmarks/size/.build/stylex.css
· compressed 99,757 99,757 1.00
· minified 748,850 748,850 1.00
Done in 0.08s.
Done in 0.32s.

@mellyeliu mellyeliu marked this pull request as draft June 1, 2026 17:37
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