Releases: facebook/stylex
0.17.5
Announcing a brand new website and playground to celebrate the new year! We've also made several changes to our docs, including an LLM Resources page for style authoring and installation and llms-full.txt endpoint for crawlers.
On the code side of things, we've added a new disallowedPropertiesValidation config option that disables compiler errors for properties like border and background properties by default, and a new ESLint rule for detecting conflicting styleorclassName` props.
What's Changed
- New
no-conflicting-propslint rule by @henryqdineen in #1404 - New
disallowedPropertiesValidationconfig to disable property compiler errors by default by @Faizanq in #1424 - Preserve units in zero values for CSS variables by @kimseongyu in #1435
- Fix unplugin cache invalidation on style changes by @nmn in #1442
New Contributors
- @salmanmkc made their first contribution in #1391
- @rayterion made their first contribution in #1413
- @Faizanq made their first contribution in #1424
- @alexcarpenter made their first contribution in #1433
- @kimseongyu made their first contribution in #1435
Full Changelog: 0.17.4...0.17.5
0.17.4
What's Changed
We've added a new playground thanks to @henryqdineen! We also patched a bundling issue for Turbopack users.
- [playground] Introduce new potential replacement playground by @henryqdineen in #1317
- [playground] use JsonParam serialization by @henryqdineen in #1389
- [playground] set page title by @henryqdineen in #1393
- [babel-plugin] fix named export detection by @mellyeliu in #1394
- [release] v0.17.4 by @mellyeliu in #1397
Full Changelog: 0.17.3...0.17.4
0.17.1
Improvements and fixes
- [unplugin] Add support for compiling stylex from imported packages by @nmn in #1331
- [stylex] add runtime injection support for defineConsts constants by @mellyeliu in #1334
- [fix] Show full debug file paths by @nmn in #1332
- [style-value-parser] Fix media query ordering for queries with 'screen and' by @nmn in #1333
- [babel-plugin] add debugFilePath option by @henryqdineen in #1330
- [babel-plugin] fix unitless zoom bug by @mellyeliu in #1346
- [fix] A list of small fixes pre-release by @nmn in #1348
Dependencies and cleanup
- [chore] Update dependencies by @nmn in #1336
- [chore] Use unplugin for docs website by @nmn in #1337
- [chore] Update and unify default config options by @nmn in #1340
- Update jest dependencies by @jcperez-ch in #1343
Full Changelog: 0.17.0...0.17.1
0.17.0
v0.17.0
Lots of new features! Plus a new deep-dive on the Meta Engineering blog!
New features
- [feat] Add an unplugin bundler plugin implementation for various bundlers by @nmn in #1300
- [feat] Add defineMarker() for custom markers for selector combinators by @nmn in #1238
ESLint improvements
- [eslint-plugin] add legacyAllowMixedExports config to enforce-extension by @mellyeliu in #1305
- [eslint-plugin] enforce defineConsts only extension by @mellyeliu in #1311
- [eslint-plugin] disallow default exports from defineVars and defineConsts in enforce-extension by @mellyeliu in #1313
- [eslint-plugin] enhance validation for ternary and logical expressions in style properties by @hiteshshetty-dev in #1266
- [eslint-plugin] order pseudo-classes and stylex.when selectors according to the priorities by @yjoer in #1287
Improvements and bug fixes
- [babel-plugin] Bump specificity of stylex.when selectors over defaults by @mellyeliu in #1326
- Enhance
stylex.propsto precompile more often by @nmn in #1242 - [babel-plugin] additional externals for rollup build by @henryqdineen in #1307
- [babel-plugin] Remove confusing removeObjectsWithSpreads() utility by @henryqdineen in #1291
Documentation
- [docs] Add docs for stylex.when by @mellyeliu in #1327
- [docs] add documentation for new ESLint rules by @mellyeliu in #1325
- [docs] fix broken link, incorrect rule names by @henryqdineen in #1310
- [docs] add team members by @mellyeliu in #1321
- Add example on chaining keyframes by @Joha99 in #1316
Type improvements
- [types] Restructure
GenStylePropTypeTypescript type for more readable error messages by @j-malt in #1308 - [types] Fix TypeScript constraint error in
CSSTypeunion by @henryqdineen in #1306 - [types] Remove duplicate property declaration by @henryqdineen in #1315
- [types] Flow types fix for stylex.when.* by @nmn in #1276
- [babel-plugin][legacy] Polyfill logical float values by @abhakat in #1237
Internal tooling & infrastructure
- chore: format mjs files with prettier by @henryqdineen in #1309
- Add
defineConstsusage to benchmark by @j-malt in #1312 - Fix internal meta sync by @vincentriemer in #1319
Release
- [release] v0.17.0 by @mellyeliu in #1328
New contributors
Full Changelog: 0.16.3...0.17.0
0.16.3
What's Changed
Lots of bug fixes and linting improvements!
New features
- [babel-plugin] Custom module resolution support by @henryqdineen in #1293
- [babel-plugin] Create new defineConsts file extension by @mellyeliu in #1289
- [babel-plugin] Open up media query order enforcing by @mellyeliu in #1302
Linting improvements
- [eslint-plugin] add a config option to change the ordering of properties in the sort-keys rule by @yjoer in #1273
- [eslint-plugin] Split nonstandard rules into stylex-no-nonstandard-styles.js by @jcperez-ch in #1246
- [eslint-plugin] update documentation URLs to reflect correct package path by @hiteshshetty-dev in #1281
- [eslint-plugin] refactor
sort-keyspriorities by @mellyeliu in #1288 - [eslint-plugin] Fix
valid-styleshandling ofwhen+ vars/consts by @dwei-figma in #1284 - [eslint-plugin] Add handling for
defineConststoenforce-extensionby @dwei-figma in #1295 - [eslint-plugin] Support more file extensions within enforce-extension by @mellyeliu in #1297
- [eslint-plugin] Add proper error handling for color functions to valid-shorthands by @yousoumar in #1279
Bug fixes and Cleanup
- [babel-plugin] Refine createTheme and defineVars priorities by @mellyeliu in #1274
- [babel-plugin] Fix createTheme at-rule wrapping by @mellyeliu in #1278
- [babel-plugin] Replace
canBeIdentifier()by @henryqdineen in #1290 - [babel-plugin] Various TypeScript fixes by @henryqdineen in #1298
- [chore] Update Flow to 271 by @nmn in #1299
Docs and examples
- [examples] Fix playground link by @henryqdineen in #1280
- [examples] remove deprecated open-props package from examples. by @hiteshshetty-dev in #1277
- [examples] Fix sample commands in READMEs for webpack and nextjs examples by @gmcnaughton in #1294
New Contributors
- @yjoer made their first contribution in #1273
- @gmcnaughton made their first contribution in #1294
Full Changelog: 0.16.2...0.16.3
0.16.2
Improvements
- [eslint-plugin] Handle descendant selector styles in
valid-stylesby @mellyeliu in #1270 - [babel-plugin] Adjust descendant selector .when priorities by @mellyeliu in #1271
- [babel-plugin] Fix
index.d.tsby @dwei-figma in #1269 - [babel-plugin] Fix
defineVarsat-rules priorities by @mellyeliu in #1272 - [types] Update types for defineConsts to allow non-stylex usage by @nmn in #1255
- [examples] remove deprecated open-props package from nextjs example. by @hiteshshetty-dev in #1262
- [docs] Update
stylex.defaultMarkerusage to properly invoke it by @pawelblaszczyk5 in #1267
New contributors
- @hiteshshetty-dev made their first contribution in #1262
Full Changelog: 0.16.1...0.16.2
0.16.1
New features
- [example] Add storybook example with stylex by @Pythonen in #1236
- [eslint-plugin] Create
no-lookahead-selectorsrule by @mellyeliu in #1258
Fixes
- [eslint-plugin] Allow multiple comma separated values for
backgroundBlendModeby @dwrth in #1241 - fix: Allow
defineConststo take numbers as values with TypeScript by @dwei-figma in #1240 - [babel-plugin] Fix hoisting stylex.create with duplicate names by @nmn in #1253
- [babel-plugin][legacy] add legacyClassnamesSort config in
processStylexRulesby @mellyeliu in #1250 - [eslint-plugin] Fix
valid-shorthandsrule for modern CSS color functions by @cnaples79 in #1247 - [fix] Enforce ordering for .when selectors lower than regular pseudos by @nmn in #1254
- [release] v0.16.1 by @mellyeliu in #1263
New Contributors
- @dwrth made their first contribution in #1239
- @Pythonen made their first contribution in #1236
- @cnaples79 made their first contribution in #1247
Full Changelog: 0.16.0...0.16.1
0.16.0
This release adds support for a long-requested feature—descendant and sibling selectors! We've also expanded defineConsts capabilities, improved our lint rules, added a webpack example, and made some performance optimizations. See the full release notes here!
New Features!
- Support for descendent/sibling selectors by @nmn in #1178
- Support
defineConstsvar() overrides by @mellyeliu in #1219 - Support
defineConstsin dynamic styles by @mellyeliu in #1209 - Webpack example by @RavenColEvol in #1228
Fixes
- Avoid mutating rules in processStylexRules by @henryqdineen in #1202
- Add option to allow raw CSS variable overrides in valid-styles by @dwei-figma in #1229
- Remove
valid-stylescheck for non-objects in favor of flow by @jcperez-ch in #1233 - Allow one inner level when outer/top layer is pseudo-element by @dwrth in #1239
- Allow '0' values for length properties by @mellyeliu in #1211
- Optimize precomputed props call in JSX by @necolas in #1194
- Add
positionTrysupport for valid-styles by @abhakat in #1214 - Allow local resolved constants in valid-styles number checks by @mellyeliu in #1216
- Create new
.transformedfile extension for pre-resolved variables and constants by @mellyeliu in #1208 - Reduce chances of dynamic variable name collisions by @necolas in #1183
- Handle all unit values in media query transformer by @mellyeliu in #1192
- Fix classname construction for dynamic contextual styles by @mellyeliu in #1193
- Hoist stylex.create definitions and nested objects within functions by @nmn in #1137
New Contributors
- @jcperez-ch made their first contribution in #1233
- @BeiyanYunyi made their first contribution in #1206
- @abhakat made their first contribution in #1214
- @dwei-figma made their first contribution in #1215
Full Changelog: 0.15.0...0.16.0