Skip to content

Commit f456c5c

Browse files
committed
feat: sync upstream shadcn/ui — shadcn@4.1.0, v4 app, font system, chart improvements
Upstream sync from shadcn-ui/ui (1686 commits since last merge base). Key changes: - packages/shadcn upgraded to 4.1.0 (CLI font transformers, scaffold from github, chart colors) - apps/v4 replaces apps/www as the primary docs/registry app - Font system: 25+ heading font registries, font markers utility, @supports override - Chart improvements: recharts v3 compat, radial chart fixes - templates/ updated with monorepo variants (astro, vite, react-router, start) - skills/shadcn AI skill definitions added - deprecated/ removed (auth, auth-firebase, cli, www) Preserved Hanzo-only paths: app/, pkg/, demo/, docs/, template/next/
1 parent b505375 commit f456c5c

6,714 files changed

Lines changed: 88781 additions & 258899 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,43 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
- package-ecosystem: "npm"
8+
directory: "/templates/astro-app"
9+
schedule:
10+
interval: "weekly"
11+
- package-ecosystem: "npm"
12+
directory: "/templates/astro-monorepo"
13+
schedule:
14+
interval: "weekly"
15+
- package-ecosystem: "npm"
16+
directory: "/templates/next-app"
17+
schedule:
18+
interval: "weekly"
19+
- package-ecosystem: "npm"
20+
directory: "/templates/next-monorepo"
21+
schedule:
22+
interval: "weekly"
23+
- package-ecosystem: "npm"
24+
directory: "/templates/react-router-app"
25+
schedule:
26+
interval: "weekly"
27+
- package-ecosystem: "npm"
28+
directory: "/templates/react-router-monorepo"
29+
schedule:
30+
interval: "weekly"
31+
- package-ecosystem: "npm"
32+
directory: "/templates/start-app"
33+
schedule:
34+
interval: "weekly"
35+
- package-ecosystem: "npm"
36+
directory: "/templates/start-monorepo"
37+
schedule:
38+
interval: "weekly"
39+
- package-ecosystem: "npm"
40+
directory: "/templates/vite-app"
41+
schedule:
42+
interval: "weekly"
43+
- package-ecosystem: "npm"
44+
directory: "/templates/vite-monorepo"
45+
schedule:
46+
interval: "weekly"

.github/version-script-beta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { exec } from "child_process"
55
import fs from "fs"
66

7-
const pkgJsonPath = "pkg/cli/package.json"
7+
const pkgJsonPath = "packages/shadcn/package.json"
88
try {
99
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath))
1010
exec("git rev-parse --short HEAD", (err, stdout) => {

.github/version-script-next.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { exec } from "child_process"
55
import fs from "fs"
66

7-
const pkgJsonPath = "pkg/cli/package.json"
7+
const pkgJsonPath = "packages/shadcn/package.json"
88
try {
99
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath))
1010
exec("git rev-parse --short HEAD", (err, stdout) => {

.github/workflows/code-check.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
with:
1919
node-version: 20
2020

21-
- uses: pnpm/action-setup@v2.2.4
21+
- uses: pnpm/action-setup@v4
2222
name: Install pnpm
2323
id: pnpm-install
2424
with:
25-
version: 8.6.1
25+
version: 9.0.6
2626
run_install: false
2727

2828
- name: Get pnpm store directory
@@ -39,7 +39,7 @@ jobs:
3939
- name: Install dependencies
4040
run: pnpm install
4141

42-
#- run: pnpm lint
42+
- run: pnpm lint
4343

4444
format:
4545
runs-on: ubuntu-latest
@@ -54,11 +54,11 @@ jobs:
5454
with:
5555
node-version: 20
5656

57-
- uses: pnpm/action-setup@v2.2.4
57+
- uses: pnpm/action-setup@v4
5858
name: Install pnpm
5959
id: pnpm-install
6060
with:
61-
version: 8.6.1
61+
version: 9.0.6
6262
run_install: false
6363

6464
- name: Get pnpm store directory
@@ -77,6 +77,9 @@ jobs:
7777
- name: Install dependencies
7878
run: pnpm install
7979

80+
- name: Build packages
81+
run: pnpm --filter=shadcn build
82+
8083
- run: pnpm format:check
8184

8285
tsc:
@@ -92,11 +95,11 @@ jobs:
9295
with:
9396
node-version: 20
9497

95-
- uses: pnpm/action-setup@v2.2.4
98+
- uses: pnpm/action-setup@v4
9699
name: Install pnpm
97100
id: pnpm-install
98101
with:
99-
version: 8.6.1
102+
version: 9.0.6
100103
run_install: false
101104

102105
- name: Get pnpm store directory
@@ -113,4 +116,7 @@ jobs:
113116
- name: Install dependencies
114117
run: pnpm install
115118

119+
- name: Build packages
120+
run: pnpm --filter=shadcn build
121+
116122
- run: pnpm typecheck

.github/workflows/prerelease-comment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
comment:
1212
if: |
13-
github.repository_owner == 'hanzoai-ui' &&
13+
github.repository_owner == 'shadcn-ui' &&
1414
${{ github.event.workflow_run.conclusion == 'success' }}
1515
runs-on: ubuntu-latest
1616
name: Write comment to the PR
@@ -28,8 +28,8 @@ jobs:
2828
2929
for (const artifact of allArtifacts.data.artifacts) {
3030
// Extract the PR number and package version from the artifact name
31-
const match = /^npm-package-hanzoai-ui@(.*?)-pr-(\d+)/.exec(artifact.name);
32-
31+
const match = /^npm-package-shadcn@(.*?)-pr-(\d+)/.exec(artifact.name);
32+
3333
if (match) {
3434
require("fs").appendFileSync(
3535
process.env.GITHUB_ENV,
@@ -49,7 +49,7 @@ jobs:
4949
A new prerelease is available for testing:
5050
5151
```sh
52-
npx hanzoai-ui@${{ env.BETA_PACKAGE_VERSION }}
52+
pnpm dlx shadcn@${{ env.BETA_PACKAGE_VERSION }}
5353
```
5454
5555
- name: "Remove the autorelease label once published"

.github/workflows/prerelease.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,58 @@ on:
77
types: [labeled]
88
branches:
99
- main
10+
11+
permissions:
12+
id-token: write
13+
contents: read
14+
1015
jobs:
1116
prerelease:
1217
if: |
13-
github.repository_owner == 'hanzoai' &&
18+
github.repository_owner == 'shadcn-ui' &&
1419
contains(github.event.pull_request.labels.*.name, '🚀 autorelease')
1520
name: Build & Publish a beta release to NPM
1621
runs-on: ubuntu-latest
1722
environment: Preview
1823

1924
steps:
2025
- name: Checkout Repo
21-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2227
with:
2328
fetch-depth: 0
2429

2530
- name: Use PNPM
26-
uses: pnpm/action-setup@v2.2.4
31+
uses: pnpm/action-setup@v4
2732
with:
28-
version: 8.6.1
33+
version: 9.0.6
2934

30-
- name: Use Node.js 18
31-
uses: actions/setup-node@v3
35+
- name: Use Node.js 20
36+
uses: actions/setup-node@v4
3237
with:
33-
node-version: 18
38+
node-version: 20
39+
registry-url: "https://registry.npmjs.org"
3440
cache: "pnpm"
3541

42+
- name: Update npm for OIDC support
43+
run: npm install -g npm@latest
44+
3645
- name: Install NPM Dependencies
3746
run: pnpm install
3847

3948
- name: Modify package.json version
4049
run: node .github/version-script-beta.js
4150

42-
- name: Authenticate to NPM
43-
run: echo "//registry.npmjs.org/:_authToken=$NPM_ACCESS_TOKEN" >> pkg/cli/.npmrc
44-
env:
45-
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
46-
4751
- name: Publish Beta to NPM
4852
run: pnpm pub:beta
4953

5054
- name: get-npm-version
5155
id: package-version
5256
uses: martinbeentjes/npm-get-version-action@main
5357
with:
54-
path: pkg/cli
58+
path: packages/shadcn
5559

5660
- name: Upload packaged artifact
57-
uses: actions/upload-artifact@v2
61+
uses: actions/upload-artifact@v4
5862
with:
59-
name: npm-package-hanzoai-ui@${{ steps.package-version.outputs.current-version }}-pr-${{ github.event.number }} # encode the PR number into the artifact name
60-
path: pkg/cli/dist/index.js
63+
name: npm-package-shadcn@${{ steps.package-version.outputs.current-version }}-pr-${{ github.event.number }} # encode the PR number into the artifact name
64+
path: packages/shadcn/dist/index.js

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
release:
17-
if: ${{ github.repository_owner == 'hanzoai-ui' }}
17+
if: ${{ github.repository_owner == 'shadcn-ui' }}
1818
name: Create a PR for release workflow
1919
runs-on: ubuntu-latest
2020
steps:

.github/workflows/test.yml

Lines changed: 30 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,45 @@
1-
name: E2E and Visual Tests
1+
name: Test
22

33
on:
4-
push:
5-
branches: [main, develop]
64
pull_request:
7-
branches: [main, develop]
8-
schedule:
9-
# Run tests weekly on Sunday at 2 AM UTC to catch breaking updates
10-
- cron: '0 2 * * 0'
11-
12-
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: true
15-
16-
env:
17-
NODE_OPTIONS: --max-old-space-size=8192
5+
branches: ["*"]
186

197
jobs:
208
test:
219
runs-on: ubuntu-latest
22-
timeout-minutes: 60
23-
strategy:
24-
matrix:
25-
node-version: [20.x]
26-
10+
name: pnpm test
11+
env:
12+
NEXT_PUBLIC_APP_URL: http://localhost:4000
13+
NEXT_PUBLIC_V0_URL: https://v0.dev
2714
steps:
28-
- uses: actions/checkout@v4
29-
30-
- name: Setup pnpm
31-
uses: pnpm/action-setup@v2
15+
- uses: actions/checkout@v3
3216
with:
33-
version: 9.0.6
17+
fetch-depth: 0
3418

35-
- name: Setup Node.js ${{ matrix.node-version }}
36-
uses: actions/setup-node@v4
19+
- name: Install Node.js
20+
uses: actions/setup-node@v3
3721
with:
38-
node-version: ${{ matrix.node-version }}
39-
cache: 'pnpm'
22+
node-version: 22
4023

24+
- uses: pnpm/action-setup@v4
25+
name: Install pnpm
26+
id: pnpm-install
27+
with:
28+
version: 9.0.6
29+
run_install: false
30+
31+
- name: Get pnpm store directory
32+
id: pnpm-cache
33+
run: |
34+
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
35+
- uses: actions/cache@v3
36+
name: Setup pnpm cache
37+
with:
38+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
39+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
40+
restore-keys: |
41+
${{ runner.os }}-pnpm-store-
4142
- name: Install dependencies
4243
run: pnpm install
4344

44-
- name: Install Playwright browsers
45-
run: pnpm exec playwright install --with-deps
46-
47-
- name: Build the project
48-
run: pnpm build
49-
env:
50-
NODE_OPTIONS: --max-old-space-size=8192
51-
NEXT_PUBLIC_APP_URL: https://ui.hanzo.ai
52-
53-
- name: Run component health check
54-
run: pnpm health-check
55-
continue-on-error: true
56-
57-
- name: Run E2E tests
58-
run: pnpm test:e2e
59-
timeout-minutes: 30
60-
env:
61-
CI: true
62-
63-
- name: Run visual regression tests
64-
run: pnpm test:visual
65-
timeout-minutes: 20
66-
continue-on-error: true
67-
env:
68-
CI: true
69-
70-
- name: Upload test results
71-
if: always()
72-
uses: actions/upload-artifact@v4
73-
with:
74-
name: playwright-report
75-
path: tests/reports/playwright-report/
76-
retention-days: 30
45+
- run: pnpm test

0 commit comments

Comments
 (0)