feat(lab): publish @astryxdesign/lab to the @canary dist-tag only#3235
Open
cixzhang wants to merge 2 commits into
Open
feat(lab): publish @astryxdesign/lab to the @canary dist-tag only#3235cixzhang wants to merge 2 commits into
cixzhang wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
Make the experimental lab package installable for early testing without ever shipping a stable (latest) release, so consumers can try lab components via npm instead of forking or vendoring source. - Give lab a real build: babel ESM compile, tsc declarations, and StyleX CSS extraction (lab.css). Generalize scripts/build-css.mjs to take a --package target; core output is unchanged. - Add an exports map, files, and build scripts to lab's package.json, plus an astryx.canaryOnly marker. Lab keeps private: true. - Release workflow: the stable job now also skips canaryOnly packages (redundant safeguard on top of private), and the canary job publishes canaryOnly packages, stripping private only in the ephemeral CI checkout. - Route lab's themeProps import through @astryxdesign/core/utils instead of reaching into core source, and export themeProps from core's utils API. - Add lab to the root build so CI builds it before publishing. @cixzhang
b381efc to
0c45e8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
@astryxdesign/labinstallable for early testing without ever shipping a stable (latest) release. Today lab has no build and isprivate, so the only way to try a lab component is to fork/vendor the source. This change gives lab a real build and publishes it only under the@canarydist-tag:"Never a stable release" — three independent guarantees
private: truestays in committed source — npm hard-refuses to publish a private package, and changesets ignores it (no "Version Packages" bump is ever generated for lab).astryx.canaryOnlypackages — so even an accidentalprivate: falsecannot leak lab ontolatest.privateonly in the ephemeral CI checkout — never in git.A new
astryx.canaryOnlymarker inpackage.jsonis the explicit opt-in; it's a reusable convention for any future experimental package.What's in this change
tscdeclarations + StyleX CSS extraction (lab.css, 542 rules).scripts/build-css.mjsis generalized to take a--packagetarget; core's output is byte-unchanged.package.json: addsexports,files, build scripts, and theastryx.canaryOnlymarker. Keepsprivate: true.themePropsthrough the public API: 7 lab files reached into core source (../../../core/src/utils/themeProps) — a path that does not exist in an installed package, which would break any published lab. They now import from@astryxdesign/core/utils, andthemeProps(+ its types) is exported from core'sutilsbarrel.The matching change to
.github/workflows/release.ymlis not in this branch — the bot token used to push lacksworkflowscope. The two gate edits (stable job: also skipcanaryOnly; canary job: includecanaryOnlyand stripprivatein the ephemeral checkout) need to be applied torelease.ymlseparately by a maintainer. The exact patch is provided by the PR author. Until that workflow edit lands, the canary job will not publish lab.Verification
pnpm buildpasses with lab in the pipelinenpm packproduces a complete tarball (dist/index.js,index.d.ts,lab.css,src)check:sync,check:package-boundaries,sync-exports --check,verify-exports,check:changesetsall greenDraft notes
Opening as draft for design sign-off on:
astryx.canaryOnlymanifest convention, and