Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
88d749c
refactor(cli): move the CLI into the @lablup/ui-common-cli workspace …
yomybaby Sep 29, 2026
bc4fccf
feat(cli): add @lablup/ui-common-cli to a project upgraded from 0.1
yomybaby Sep 29, 2026
d4e6bef
build: check both packed tarballs in check:pack
yomybaby Sep 29, 2026
74fdfae
ci: publish @lablup/ui-common and @lablup/ui-common-cli in lockstep
yomybaby Sep 29, 2026
752473d
ci: install the fixture with pnpm, beside the CLI tarball
yomybaby Sep 29, 2026
cbc1ce7
docs: document @lablup/ui-common-cli as the ui-common bin
yomybaby Sep 29, 2026
7bf3b7d
build: scan the CLI package in the public boundary check
yomybaby Sep 29, 2026
e08f096
fix(upgrade): drop a local re-export of a removed type with its import
yomybaby Sep 29, 2026
dffac3a
feat(upgrade): migrate elements imported through the project's own ba…
yomybaby Sep 29, 2026
b771c35
feat(upgrade): look for manual-review findings across the whole project
yomybaby Sep 29, 2026
443ecd6
feat(upgrade): list 0.1 class names the project owns as lower confidence
yomybaby Sep 29, 2026
52d5fad
feat(upgrade): load the 0.2 stylesheets in an app that never imported…
yomybaby Sep 29, 2026
970f758
feat(upgrade): add <Theme> at the root render and report 0.1 theme sw…
yomybaby Sep 29, 2026
0630a9e
fix(upgrade): drop React 18 from a library's react and react-dom peers
yomybaby Sep 29, 2026
118197d
feat(upgrade): decline the Astryx postinstalls in a pnpm project's al…
yomybaby Sep 29, 2026
6600b51
fix(css): open every shipped stylesheet with the cascade layer order
yomybaby Sep 29, 2026
4db9f2c
feat: warn in development when two copies of ui-common are loaded
yomybaby Sep 29, 2026
952bd3f
docs: point the integration's Theme import at theme/lablup/built
yomybaby Sep 29, 2026
7d07f9d
docs: document pnpm build approval, the shipped layer order, Theme an…
yomybaby Sep 30, 2026
a89019b
docs: changelog entry, an Upgrading from 0.1 summary and link references
yomybaby Sep 30, 2026
e0eb7f3
docs: changelog for the CLI package split and the upgrade fixes
yomybaby Sep 30, 2026
fa42c38
Merge remote-tracking branch 'origin/feat/astryx-foundation' into fea…
yomybaby Oct 2, 2026
172c2f7
fix(upgrade): follow barrels that re-export through baseUrl or @-scop…
yomybaby Oct 2, 2026
796cc35
fix(upgrade): narrow a library's React peers by range intersection
yomybaby Oct 2, 2026
56fa070
docs: point stale pre-split paths at packages/cli
yomybaby Oct 2, 2026
80117fe
docs: invoke @lablup/ui-common-cli@next while 0.2 is in prerelease
yomybaby Oct 2, 2026
436b72a
Merge remote-tracking branch 'origin/feat/astryx-foundation' into fea…
yomybaby Oct 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,38 @@ jobs:
run: |
pnpm run build
pnpm pack --pack-destination "$RUNNER_TEMP"

- name: Install the tarball into a clean React project
pnpm --filter @lablup/ui-common-cli pack --pack-destination "$RUNNER_TEMP"

# pnpm, as every consumer installs: pnpm 11 fails the install with
# ERR_PNPM_IGNORED_BUILDS when a dependency's build script is neither
# allowed nor declined, which npm never reports. fixture/pnpm-workspace.yaml
# holds the allowBuilds block a consumer needs, and makes the fixture its
# own workspace, apart from this repository's.
- name: Install the tarballs into a clean React project
working-directory: fixture
run: |
TARBALL=$(find "$RUNNER_TEMP" -name 'lablup-ui-common-*.tgz' | head -1)
echo "Installing $TARBALL"
npm install --no-package-lock "$TARBALL"
npm install --no-package-lock
LIB=$(find "$RUNNER_TEMP" -name 'lablup-ui-common-[0-9]*.tgz' | head -1)
CLI=$(find "$RUNNER_TEMP" -name 'lablup-ui-common-cli-*.tgz' | head -1)
echo "Installing $LIB and $CLI"
pnpm add "$LIB"
pnpm add --save-dev "$CLI"

- name: Type-check and build the fixture against the packed artifact
working-directory: fixture
run: |
npx tsc --noEmit
npx vite build
pnpm exec tsc --noEmit
pnpm exec vite build

# The CLI resolves the project's @lablup/ui-common and the Astryx CLI it
# pins from two different packages; this runs it where a consumer would.
- name: Run the ui-common bin from the fixture
working-directory: fixture
run: |
pnpm exec ui-common --version --verbose
pnpm exec ui-common --help > /dev/null
pnpm exec ui-common agents > /dev/null
pnpm exec ui-common component Button --json > /dev/null
pnpm exec ui-common upgrade --from 0.1 --dry-run > /dev/null

# Building is not the same as being styled. 0.1.0-alpha.0 built here
# green while shipping every component's CSS as an asset nothing could
Expand Down
122 changes: 93 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,39 +56,71 @@ jobs:
- name: Verify before publishing
run: pnpm run verify

- name: Confirm the release tag matches the package version
if: github.event_name == 'release'
# @lablup/ui-common (the root) and @lablup/ui-common-cli (packages/cli)
# are released together at one version: the CLI takes the library as an
# exact peer.
- name: Confirm both packages are at one version
run: |
PKG_VERSION=$(node -p "require('./package.json').version")
TAG="${GITHUB_REF_NAME#v}"
if [ "$PKG_VERSION" != "$TAG" ]; then
echo "package.json is $PKG_VERSION but the release tag is $TAG" >&2
LIB=$(node -p "require('./package.json').version")
CLI=$(node -p "require('./packages/cli/package.json').version")
if [ "$LIB" != "$CLI" ]; then
echo "@lablup/ui-common is $LIB but @lablup/ui-common-cli is $CLI" >&2
exit 1
fi

- name: Confirm the release tag matches the package versions
if: github.event_name == 'release'
run: |
TAG="${GITHUB_REF_NAME#v}"
for PKG in package.json packages/cli/package.json; do
PKG_VERSION=$(node -p "require('./$PKG').version")
if [ "$PKG_VERSION" != "$TAG" ]; then
echo "$PKG is $PKG_VERSION but the release tag is $TAG" >&2
exit 1
fi
done

# Any prerelease goes to `next`, a plain version to `latest`. 0.1's
# prereleases went out under `alpha`; that tag is no longer moved.
# The registry still sets `latest` on a package's first publish, so
# @lablup/ui-common-cli's `latest` is its first alpha until 0.2.0; the
# docs say `@next` until then. Do not move `latest` here.
- name: Choose the dist-tag from the version
id: tag
run: |
VERSION=$(node -p "require('./package.json').version")
case "$VERSION" in
*-alpha*) TAG=alpha ;;
*-beta*) TAG=beta ;;
*-rc*) TAG=rc ;;
*-*) TAG=next ;;
*) TAG=latest ;;
*-*) TAG=next ;;
*) TAG=latest ;;
esac
echo "Publishing $VERSION under dist-tag $TAG"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

# pnpm packs both, rewriting the CLI's `workspace:*` peer to the exact
# version; the library goes first so the CLI's peer exists when it lands.
- name: Pack both packages
run: |
mkdir -p "$RUNNER_TEMP/packed"
pnpm pack --pack-destination "$RUNNER_TEMP/packed"
pnpm --filter @lablup/ui-common-cli pack --pack-destination "$RUNNER_TEMP/packed"
ls -la "$RUNNER_TEMP/packed"

- name: Publish
if: github.event_name == 'release' || inputs.dry_run == false
run: pnpm publish --no-git-checks --access public --tag ${{ steps.tag.outputs.tag }} --registry https://npm.pkg.github.com
run: |
for PKG in lablup-ui-common lablup-ui-common-cli; do
npm publish "$RUNNER_TEMP/packed/$PKG-${{ steps.tag.outputs.version }}.tgz" --access public --tag ${{ steps.tag.outputs.tag }} --registry https://npm.pkg.github.com
done
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Dry run
if: github.event_name == 'workflow_dispatch' && inputs.dry_run
run: pnpm pack && ls -la *.tgz
run: |
for PKG in lablup-ui-common lablup-ui-common-cli; do
npm publish "$RUNNER_TEMP/packed/$PKG-${{ steps.tag.outputs.version }}.tgz" --dry-run --access public --tag ${{ steps.tag.outputs.tag }} --registry https://npm.pkg.github.com
done

# GitHub Packages requires authentication even for public packages, so an
# open-source consumer cannot install from it without every contributor
Expand Down Expand Up @@ -130,46 +162,78 @@ jobs:
- name: Verify before publishing
run: pnpm run verify

- name: Confirm the release tag matches the package version
if: github.event_name == 'release'
# @lablup/ui-common (the root) and @lablup/ui-common-cli (packages/cli)
# are released together at one version: the CLI takes the library as an
# exact peer.
- name: Confirm both packages are at one version
run: |
PKG_VERSION=$(node -p "require('./package.json').version")
TAG="${GITHUB_REF_NAME#v}"
if [ "$PKG_VERSION" != "$TAG" ]; then
echo "package.json is $PKG_VERSION but the release tag is $TAG" >&2
LIB=$(node -p "require('./package.json').version")
CLI=$(node -p "require('./packages/cli/package.json').version")
if [ "$LIB" != "$CLI" ]; then
echo "@lablup/ui-common is $LIB but @lablup/ui-common-cli is $CLI" >&2
exit 1
fi

- name: Confirm the release tag matches the package versions
if: github.event_name == 'release'
run: |
TAG="${GITHUB_REF_NAME#v}"
for PKG in package.json packages/cli/package.json; do
PKG_VERSION=$(node -p "require('./$PKG').version")
if [ "$PKG_VERSION" != "$TAG" ]; then
echo "$PKG is $PKG_VERSION but the release tag is $TAG" >&2
exit 1
fi
done

# Any prerelease goes to `next`, a plain version to `latest`. 0.1's
# prereleases went out under `alpha`; that tag is no longer moved.
# The registry still sets `latest` on a package's first publish, so
# @lablup/ui-common-cli's `latest` is its first alpha until 0.2.0; the
# docs say `@next` until then. Do not move `latest` here.
- name: Choose the dist-tag from the version
id: tag
run: |
VERSION=$(node -p "require('./package.json').version")
case "$VERSION" in
*-alpha*) TAG=alpha ;;
*-beta*) TAG=beta ;;
*-rc*) TAG=rc ;;
*-*) TAG=next ;;
*) TAG=latest ;;
*-*) TAG=next ;;
*) TAG=latest ;;
esac
echo "Publishing $VERSION under dist-tag $TAG"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

# pnpm packs both, rewriting the CLI's `workspace:*` peer to the exact
# version; the library goes first so the CLI's peer exists when it lands.
- name: Pack both packages
run: |
mkdir -p "$RUNNER_TEMP/packed"
pnpm pack --pack-destination "$RUNNER_TEMP/packed"
pnpm --filter @lablup/ui-common-cli pack --pack-destination "$RUNNER_TEMP/packed"
ls -la "$RUNNER_TEMP/packed"

- name: Confirm the credential is valid for npmjs
run: npm whoami --registry https://registry.npmjs.org
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# npm rather than pnpm here: provenance is an npm CLI feature and this
# is the one step that needs it. The tarball is identical either way,
# since both pack from the same files allowlist.
# npm publishes the tarballs pnpm packed: provenance is an npm CLI
# feature, and npm would leave the CLI's `workspace:*` peer unrewritten
# if it packed the directory itself.
- name: Publish
if: github.event_name == 'release' || inputs.dry_run == false
run: npm publish --provenance --access public --tag ${{ steps.tag.outputs.tag }} --registry https://registry.npmjs.org
run: |
for PKG in lablup-ui-common lablup-ui-common-cli; do
npm publish "$RUNNER_TEMP/packed/$PKG-${{ steps.tag.outputs.version }}.tgz" --provenance --access public --tag ${{ steps.tag.outputs.tag }} --registry https://registry.npmjs.org
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Dry run
if: github.event_name == 'workflow_dispatch' && inputs.dry_run
run: npm publish --dry-run --access public --tag ${{ steps.tag.outputs.tag }} --registry https://registry.npmjs.org
run: |
for PKG in lablup-ui-common lablup-ui-common-cli; do
npm publish "$RUNNER_TEMP/packed/$PKG-${{ steps.tag.outputs.version }}.tgz" --dry-run --access public --tag ${{ steps.tag.outputs.tag }} --registry https://registry.npmjs.org
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ coverage/
.eslintcache
fixture/node_modules/
fixture/dist/
fixture/pnpm-lock.yaml
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ coverage/
pnpm-lock.yaml
LICENSE
src/theme/*/built/
test/upgrade/fixtures/
packages/cli/test/upgrade/fixtures/
.claude/
Loading
Loading