Skip to content

Add yarn xds shortcut and fix no-args exit code - #456

Merged
cixzhang merged 1 commit into
mainfrom
cli-bin-setup
Mar 5, 2026
Merged

cixzhang merged 1 commit into
mainfrom
cli-bin-setup

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

Summary

  • Add yarn xds script to root package.json so the CLI can be invoked from the repo root without global installation
  • Fix Commander's default behavior of exiting with code 1 when no subcommand is given — now shows help cleanly with exit code 0

Test plan

  • yarn xds — shows help, no error output
  • yarn xds component Button --brief — works correctly
  • All 61 CLI tests pass (npx vitest run packages/cli)

Commander exits with code 1 when no subcommand is given, which
causes yarn to print error noise. Add a default action that
shows help cleanly. Also add a root-level yarn xds script.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 5, 2026
@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 9.0KB 14.5KB 2.2KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@josephfarina
josephfarina marked this pull request as ready for review March 5, 2026 19:33
@josephfarina
josephfarina requested a review from cixzhang as a code owner March 5, 2026 19:33
@cixzhang
cixzhang merged commit 74c9021 into main Mar 5, 2026
14 of 15 checks passed
@cixzhang
cixzhang deleted the cli-bin-setup branch March 20, 2026 17:02
cixzhang added a commit that referenced this pull request Nov 9, 2026
…9969)

* docs(useLinkify): add hook docs and a comment-thread example block

A HookDoc next to the hook source (usage, text and options params covering
patterns/hasBuiltins, the ReactNode[] return, best practices), so astryx hook
useLinkify and astryx search return it, and a template block naming useLinkify
in exampleFor: the issue's scenario, a short comment thread in plain text
where the URL and the email address become Links and a custom issue-reference
pattern turns #123/#456 into tracker links, while a comment without matches
stays plain. Removing the hook call removes every link, per INV28. A jsdom
test asserts the four hrefs (url, mailto, two issue links) and that the plain
note renders no anchor.

Closes #9560

* Merge remote-tracking branch 'origin/main' into l3-9969

* docs(useLinkify): register the routes, fix the changeset, correct the global-flag and overlap wording

Adds the hook doc and example to the ShadCN route lock and the sandbox export routes, gives the changeset its frontmatter and contributor credit, says a non-global pattern never finishes rendering when the text matches, and says the earliest match wins with custom patterns winning only at the same start. Drops a test assertion that could never fail.

* test(cli): useLinkify now opens its own hook doc

The recorded resolution for useLinkify moves from Link.doc.mjs to the new useLinkify.doc.mjs, as other hook-doc additions have done.

Co-authored-by: Cindy Zhang <[email protected]>
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 Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants