Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
154 changes: 75 additions & 79 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,84 +1,80 @@
name: Check

on:
push:
branches: [main, next]
pull_request:
branches: [main, next]
push:
branches: [main, next]
pull_request:
branches: [main, next]

jobs:
lint_registry:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check Website Eslint
run: |
pnpm run website:lint

- name: Check Registry
run: |
pnpm run website:registry

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build Content Collections
run: |
pnpm run website:build-cc

- name: Build Website
run: |
pnpm run website:build
lint_registry:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6

- name: Install pnpm
uses: pnpm/action-setup@v6

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check Website Eslint
run: |
pnpm run website:lint

- name: Check Registry
run: |
pnpm run website:registry

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6

- name: Install pnpm
uses: pnpm/action-setup@v6

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build Content Collections
run: |
pnpm run website:build-cc

- name: Build Website
run: |
pnpm run website:build
24 changes: 12 additions & 12 deletions apps/website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@code-blocks/website",
"version": "1.0.3",
"version": "1.0.4",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -15,13 +15,13 @@
"check:registry": "tsx ./src/components/registry/check-registry.ts"
},
"dependencies": {
"@base-ui/react": "1.4.1",
"@base-ui/react": "1.5.0",
"@react-symbols/icons": "1.3.1",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"cmdk": "1.1.1",
"lucide-react": "1.14.0",
"motion": "12.38.0",
"lucide-react": "1.16.0",
"motion": "12.39.0",
"next": "16.2.6",
"next-themes": "0.4.6",
"react": "19.2.6",
Expand All @@ -40,14 +40,14 @@
"@content-collections/core": "0.15.0",
"@content-collections/mdx": "0.2.2",
"@content-collections/next": "0.2.11",
"@shikijs/langs": "4.0.2",
"@shikijs/rehype": "4.0.2",
"@shikijs/themes": "4.0.2",
"@shikijs/transformers": "4.0.2",
"@shikijs/langs": "4.1.0",
"@shikijs/rehype": "4.1.0",
"@shikijs/themes": "4.1.0",
"@shikijs/transformers": "4.1.0",
"@tailwindcss/postcss": "4.3.0",
"@tailwindcss/typography": "0.5.19",
"@types/mdx": "2.0.13",
"@types/node": "22.19.19",
"@types/node": "24.12.4",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"chalk": "5.6.2",
Expand All @@ -57,10 +57,10 @@
"rehype-autolink-headings": "7.1.0",
"rehype-slug": "6.0.0",
"remark-gfm": "4.0.1",
"shiki": "4.0.2",
"sugar-high": "1.1.0",
"shiki": "4.1.0",
"sugar-high": "1.2.0",
"tailwindcss": "4.3.0",
"tsx": "4.21.0",
"tsx": "4.22.3",
"tw-animate-css": "1.4.0",
"typescript": "5.9.3",
"unist-builder": "4.0.0",
Expand Down
2 changes: 2 additions & 0 deletions apps/website/src/components/registry/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ const UIComponents: RegistryComponent[] = [
devDependencies: ["@types/mdx"],
registryDependencies: [
"react-to-text",
"copy-button",
"copy-to-clipboard",
"code-block",
],
Expand All @@ -198,6 +199,7 @@ const UIComponents: RegistryComponent[] = [
registryDependencies: [
"react-to-text",
"sugar-high-highlighter",
"copy-button",
"copy-to-clipboard",
"code-block",
],
Expand Down
45 changes: 45 additions & 0 deletions clean-modules.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { join } from "path";
import { rm, readdir } from "fs/promises";

const targets = [
"pnpm-lock.yaml",
".turbo",
".next",
".content-collections",
"build",
"dist",
"node_modules",
];

const workspaceDirs = ["apps", "packages"];

const root = process.cwd();

async function clean(dir) {
for (const target of targets) {
const fullPath = join(dir, target);
try {
await rm(fullPath, { recursive: true, force: true });
console.log(`|- 🗑️ Deleted: ${fullPath.replace(root, ".")}`);
} catch {
console.error(`|- ❌ Failed: ${fullPath.replace(root, ".")}`);
}
}
}

await clean(root);

for (const wsDir of workspaceDirs) {
const wsPath = join(root, wsDir);
let entries;
try {
entries = await readdir(wsPath, { withFileTypes: true });
} catch {
continue;
}
for (const entry of entries) {
if (entry.isDirectory()) {
await clean(join(wsPath, entry.name));
}
}
}
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"name": "@code-blocks/workspace",
"private": true,
"packageManager": "pnpm@10.28.2",
"engines": {
"node": ">=20"
},
"packageManager": "pnpm@11.1.1",
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
Expand All @@ -17,12 +14,13 @@
"website:build-registry": "pnpm --filter @code-blocks/website run build:registry",
"typecheck": "turbo run typecheck",
"check:format": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
"fix:format": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache"
"fix:format": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
"clean": "node clean-modules.mjs"
},
"devDependencies": {
"prettier": "3.8.3",
"prettier-plugin-tailwindcss": "0.8.0",
"turbo": "2.9.12",
"turbo": "2.9.14",
"typescript": "5.9.3"
}
}
6 changes: 3 additions & 3 deletions packages/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "7.1.1",
"eslint-plugin-react-refresh": "0.5.2",
"eslint-plugin-turbo": "2.9.12",
"eslint-plugin-turbo": "2.9.14",
"globals": "17.6.0",
"typescript-eslint": "8.59.3"
"typescript-eslint": "8.59.4"
},
"devDependencies": {
"@types/node": "22.19.17",
"@types/node": "24.12.4",
"eslint": "9.39.4",
"typescript": "5.9.3"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
},
"devDependencies": {
"@code-blocks/eslint": "workspace:*",
"@types/node": "22.19.19",
"@types/node": "24.12.4",
"bumpp": "11.1.0",
"eslint": "9.39.4",
"tsdown": "0.22.0",
"tsdown": "0.21.10",
"typescript": "5.9.3"
}
}
Loading