-
build: import
node:fsstatically so the Vite plugin's package discovery survives the ESM build (#4972)astryxStylex()'s config plugin discovered installed@astryxdesign/*packages withrequire('node:fs'). The./viteexport ships only an ESM bundle (dist/vite.mjs, esbuildformat: 'esm'), where esbuild lowersrequireto a shim that throwsDynamic require of "node:fs" is not supported— always, since nativerequirenever exists under ESM. The surroundingtry/catchswallowed the throw, sooptimizeDeps.excludesilently fell back to['@astryxdesign/core']and every other installed Astryx package stayed eligible for Vite pre-bundling, which stripsstylex.create/defineVarscalls and causes runtime errors.The discovery now uses a static
import fs from 'node:fs', which esbuild preserves as a real ESM import. A regression test compilesvite.tswith the same esbuild options asbuild.mjsand runs the discovery in a childnodeprocess, since in-process test runners provide arequireshim that masks the bug.
Thanks to everyone who contributed to this release:
- @is-jain
- Scope the
sourceresolve condition to @astryxdesign packages in withAstryxwithAstryxset webpack'sconditionNamesto['source', …]globally, which resolved any dependency shipping asourceexport to its raw TypeScript — not just Astryx packages. Third-party deps that ship asourceexport (e.g.lexical, pulled in by the new RichTextEditor lab component) were then fed untranspiled.tsthrough Next's babel and failed on syntax likedeclareclass fields.
Thanks to everyone who contributed to this release:
- @potatowagon
- Use node: protocol prefix for Node.js builtin imports (#3737)
Thanks to everyone who contributed to this release:
- @Han5991
- Use
pnpm buildin theprepackscript so publishing no longer fails thedevEnginespackage-manager check (#3564).
Thanks to everyone who contributed to this release:
- @cixzhang
- ship TypeScript declarations for the
@astryxdesign/build/viteexport
Thanks to everyone who contributed to this release:
- @benjipeng
- Rename
@xds/buildexports off the xds name The Vite integration's public exports are renamed:xdsStylex->astryxStylex, and the option typesXDSVitePluginOptions/XDSVitePluginLegacyOptions->AstryxVitePluginOptions/AstryxVitePluginLegacyOptions. Update imports from@xds/build/viteaccordingly. Internal plugin names and the babel wrapper are also rebranded. Part of removingxdsnaming from the public API. - Rename Next.js helper
withXDStowithAstryxThe Next.js configuration wrapper is renamedwithXDS->withAstryx(exported from@astryxdesign/build/next). Update yournext.config.mjs:import {withAstryx} from '@astryxdesign/build/next'. Part of removing xds naming from the public API.
Thanks to everyone who contributed to this release:
- @ejhammond
- Default the StyleX library atomic-class prefix to
astryx(wasxds)@astryxdesign/build's babel/Vite integrations now emit library atomic classes as.astryx78zum5by default instead of.xds78zum5(thelibraryPrefix/stylexPrefixoption default flipsxds->astryx). This is an opaque, StyleX-generated namespace — consumers don't target these classes directly — but it completes the removal ofxdsnaming from build output. Consumers that explicitly configuredlibraryPrefix/stylexPrefixare unaffected. - Remove the XDS-prefix compatibility layer — astryx is now the only public surface
This release erases all
xdsnaming from the public API; there is no compatibility window. Consumers must migrate (we own all consumers pre-OSS): - Remove the daily, brutalist, and default themes; neutral is the new baseline Three theme packages are removed from the repo and will no longer be published:
-
Component names: the
XDS*aliases are gone — use bare names (ButtonnotXDSButton,useThemenotuseXDSTheme,ButtonPropsnotXDSButtonProps). Thedrop-xds-prefix-importscodemod automates this. -
CSS classes: components emit only
.astryx-*(the dual.xds-*class is gone). Update custom CSS selectors.xds-button->.astryx-button(prop/state value classes like.primary/.smare unchanged). -
data attributes: only
data-astryx-theme/data-astryx-mediaare written; update custom selectors and SSR root attributes offdata-xds-*. -
CSS layers:
@layer xds-base/xds-themeare renamed toastryx-base/astryx-theme; update your@layerorder line and any PostCSSlayersBeforeconfig.@astryxdesign/build's default library layer is nowastryx-base. -
Pre-compiled stylesheet: the
@astryxdesign/core/xds.cssexport is removed — import@astryxdesign/core/astryx.css. -
CSS custom properties: the
--xds-*padding fallback is gone; set--astryx-*. -
CLI config key:
@astryxdesign/clireads the package.json"astryx"field (was"xds"). Rename the block; a stale"xds"key silently drops the package from discovery. -
@astryxdesign/theme-daily -
@astryxdesign/theme-brutalist -
@astryxdesign/theme-default -
import {defaultTheme} from '@astryxdesign/theme-default/built';
- import {neutralTheme} from '@astryxdesign/theme-neutral/built';
-
...
- ...
-
Rename the npm package scope from
@xds/*to@astryxdesign/*All published packages move to the new@astryxdesignscope (e.g.@xds/core→@astryxdesign/core), along with the workspace lockfile, build/runtime scope-directory scans, and docsite slug derivation. Consumers must update their imports and dependency names. The internal ESLint plugin namespace (@xds/*rules) is intentionally untouched and tracked separately. Existing@xds/*codemods continue to target the old scope so projects still on@xds/*can migrate.
Thanks to everyone who contributed to this release:
- @cixzhang
- @ejhammond
- Unprefix migration alignment — Build output and Vite plugin updated for the XDS-prefix migration (bare names canonical,
XDS*compat aliases) so generated CSS stays in sync with@xds/core(#2941).
Thanks to everyone who contributed to this release:
- @cixzhang
- @czarandy
- @ejhammond
- @josephfarina
First public release — @xds/build is now published to the npm registry.
- Streamlined
xdsStylex()Vite API — Simplified configuration for Vite projects (#2227) - Build step for Vite plugin — Proper dist output for the Vite integration (#2205)
- Migrated to pnpm (#2197)
- Bumped esbuild from 0.24.2 to 0.28.0 (#2246)