Skip to content

v0.6.5

Choose a tag to compare

@cixzhang cixzhang released this 03 Oct 20:40
· 331 commits to main since this release
e730c89

Astryx 0.6.5 — all stable @astryxdesign/* packages ship at this version.

npx astryx upgrade --from 0.6.4 --apply

@astryxdesign/core

New Features

  • Stop bundling translator-only descriptions with the built-in English
    fallback and add compact generated string-map modules for every shipped locale. Existing rich JSON catalog exports remain unchanged.
  • Popover and usePopover take a padding prop on the spacing scale (matching Card and Stack). padding={0} paints a flush surface for content that owns its own edges, such as a list of rows or a header with a rule; the default rung (3) is unchanged.

Fixes

  • Button no longer overflows narrow rows: a labelled button can shrink below its label width and truncates the label with an ellipsis, while icon-only buttons stay square
  • Prevent an empty Tokenizer input from creating a blank trailing row.
  • SegmentedControl's default hug layout is now capped at its container width, and its segments shrink and truncate their labels instead of overflowing narrow cards and phone rows
  • SelectableCard: keep disabled cards in sequential focus navigation with aria-disabled and gated interaction handlers.
  • Selector's one-line trigger matches its size token when the theme's --spacing-5 is taller than the token can hold, instead of overshooting it.
  • Switch: announce busy/loading states through the persistent useAnnounce live region and localize the announcement via @astryx.switch.loading.

@astryxdesign/cli

New Features

  • astryx component accepts several exact selectors in one call. The JSON response keeps one ordered row per selector, including missing and ambiguous components, and text mode prints every row before exiting nonzero when any lookup fails. The component() API accepts selector arrays and always returns component.batch for an array, including empty and one-item arrays. Batches accept up to 100 selectors and reject larger arrays before lookup. The public API also exports shared BatchResponse and BatchRow types for typed receipts.
  • astryx discover browses integrations: the ones a project has and, through discover sources, the ones it could add, with every version and what each one adds. It searches every kind of item and filters with --type, --installed, --available, and --limit. A project sets a source as discover in astryx.config, and an integration exports one as a discover named export. Discover only reads: it prints the command that adds a package and never runs it. Existing --json fields keep their meaning. A free-text query now always lists its matches, even an exact component name, and astryx discover <package>/<Name> opens one.
  • astryx integration verify is the new name of astryx integration pack --check.
    The check you run before publishing an integration now has a name that says what it does. astryx integration verify packs the package with npm, installs the tarball into a temporary app, and checks that the app sees the same components, templates, themes, docs, and codemods. It takes no flags. astryx integration pack --check still works as a deprecated alias: it runs the same check with the same output, JSON, and exit codes, prints a note that names integration verify, and shows as deprecated in help. It will be removed in a later release. The integrationPackCheck() API and its integration.pack-check JSON response do not change. With --json, a command group given an unknown subcommand now reports ERR_UNKNOWN_SUBCOMMAND and lists its subcommands, where it used to say JSON output is not supported.

Fixes

  • Fix the CLI's topic docs and how they print.

  • astryx doctor no longer reports an integration it could not check as absent or complete (#6619)

  • upgrade's filesChanged counts files, not (codemod, file) pairs (#6622)
    One source file that four codemods each changed was reported as four files changed, so filesChanged matched transformsApplied and the documented meaning, "Total files changed", was not true. The human summary said the same thing: "Found 4 changes across 4 files" for one file.

    filesChanged is now the count of distinct files. transformsApplied is unchanged: a code or config codemod counts once for each file it changed, and a project codemod counts once. A file that both a core codemod and an integration codemod changed counts once in filesChanged.

  • A parse error prints the Astryx error format in text mode.
    astryx theme list --lang zh-Hans printed Commander's own line — error: option '--lang <locale>' argument 'zh-Hans' is invalid… — while every other CLI error prints Error: …. --json was already correct (ERR_INVALID_LANG), so the two modes agreed only on the exit code.

    Commander writes that line before any Astryx code runs, so the JSON shim — the one place that already sees every parse failure — now suppresses it and writes the Astryx line itself, from the same message, for both modes. Every parse failure is covered: unknown option, unknown command, missing argument, and an invalid value for a global option. --help and --version are untouched and still exit 0.

  • The CLI reference now matches what the commands do. Every --help ends with the command's examples and a More: line that names its full docs page. Function docs show each parameter's default, mark required parameters, list the error codes each function throws, and use examples that run. The response-type list adds help, version, and upgrade.registry, and astryx manifest now lists upgrade.registry for upgrade. The --zh, --dense, --lang, and --detail descriptions name the commands they change, and command summaries say when to use each command. When astryx template refuses to overwrite a file, it now says to re-run with --overwrite (or -f). The upgrade command page (astryx docs cli/commands/upgrade) now explains which files codemods never edit, what happens when one of them needs a change, and how to regenerate it.

  • astryx integration pack --check now checks the tarball when a prepack, prepare, or postpack script prints to stdout. Before, any lifecycle output made the check fail with "npm pack produced unparseable JSON output" before it looked at the tarball. A failing lifecycle script still fails the check, and its output stays in the pack_failed message.

  • astryx doctor integration docs fails when a namespace doc or a placement fails, as its help says.
    Such a failure hides the doc from the docs tree, so it now exits 1 with an invalid_doc_graph error instead of a warning. A link that names no doc still only warns, since it prints as written. doctor integration docs and doctor integration components also no longer print an [ok] line after a check that failed.

    A mistyped subcommand under doctor now fails and lists the subcommands the group has: astryx doctor integrations used to run the project checks, and astryx doctor integration bogus exited 0 in text though it exited 1 with --json.

  • A package that ships a theme, or a doc section with an id, now declares the CLI that can read it.
    A stable CLI before 0.7.0 rejects both: it cannot read the typed theme descriptors that astryx integration add theme writes, and it rejects a section id. Either way it hides the package's themes or doc topics with no warning. astryx integration add theme now adds "@astryxdesign/cli": ">=0.7.0" to peerDependencies, marked optional, and astryx integration verify fails with themes_need_cli or section_ids_need_cli when a package needs that peer range and does not declare it.

  • astryx integration verify resolves every public import in the packed package, not in your source folder.
    Before, its temporary app resolved your package's own name through the source package.json, so an exports target left out of the tarball still passed. It now fails with component_export_missing, as an app that installs the tarball would.

  • astryx theme add and astryx theme build now undo a failed write completely. Before, when one file failed to write after others were written, the written files kept their new content. Now every replaced file gets its previous content back, every new file is removed, and the error names any file that could not be restored. Both commands also refuse to replace a destination that is a symbolic link. (#6852)

Other Changes

  • A code block's label now prints above the block instead of as a // label line inside it, so copied bash, CSS, JSON, and HTML stay valid. Table cells escape |, so a union type stays in one column.
  • astryx search dark mode searches for both words; it used to drop every word after the first. A result that matches every word of a query, one of them by name or keyword, now outranks one that matches only some, and a section whose title or heading holds the whole query ranks near the top. Topics can declare search keywords, now a documented ReferenceDoc field, and a namespace's keywords now count too. A query keeps its phrase when common words such as make, build, or an drop out, so astryx search make an integration finds the integration guides, a plural of a doc's name matches it, one step below the exact name, and a component's name typed as words, such as command palette, finds the component. Outside an app, where @astryxdesign/core is not installed, astryx search searches the docs instead of failing, and says so; --type component, hook, or template still needs Core.
  • Snippets that failed when copied now work: StyleX token imports, the fr-FR.json locale path, Tailwind rounded-lg, --color-background-muted, icon and color values, and the Cursor rule path.
  • Claims that did not match the code are corrected: the 30 shipped locales and how RTL mirroring works, what astryx init writes, --detail brief for a shorter read, the Neutral and Matcha fonts, the components that need anchor positioning, gap steps, Card's radius, and the Next.js StyleX example. The deprecated bare classes are still emitted and will be removed in a later release.
  • astryx docs tokens lists all 258 tokens, adding the data visualization and syntax groups, and shows both halves of every light-dark() value.
  • Long sections are split, vague titles renamed, and the --dense and Chinese versions no longer drop blocks. Eleven long section keys are shorter, such as astryx docs styling stylex-setup, and every old key still resolves. An integration section that extends a Core topic by a section's old title still replaces that section.
  • astryx integration add codemod --to help says it takes the Core version whose upgrade runs the codemod.
  • The agent block that astryx init writes now says upgrade --from <old version> --apply; upgrade --apply alone stops with "Missing required --from".
  • The contributor-only sections, on adding a semantic icon and on strings and text direction inside components, moved to CONTRIBUTING.md.
  • An installed dependency whose astryx.integration.* manifest cannot be loaded is still kept out of the loaded set, but implicit-integrations now names it and says it contributes nothing. Before, doctor said that no installed dependency ships a manifest. The check stays informational, and astryx doctor integration validate <package> gives the details.
  • implicit-integrations lists only the roots that exist on disk. A package whose declared roots are missing is reported as contributing nothing, with the missing roots named. Before, it listed every root the manifest declared.
  • provider-identity says how many loaded integrations it could not read, instead of counting only the readable ones.

Contributors

Thanks to everyone who contributed to this release:

@Geervan @imdreamrunner @josephfarina @nynexman4464 @thedjpetersen @vjeux

Full Changelog: v0.6.4...v0.6.5