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
12 changes: 4 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: oven-sh/setup-bun@v2
with:
run_install: false
bun-version: 1.3.4

- uses: actions/setup-node@v4
with:
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm run check
- run: bun install --frozen-lockfile
- run: bun run check
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ npm run fix # Auto-fix code issues and audit dependencies
- **Styling**: Tailwind CSS
- **Build**: Vite with WASM and mkcert plugins
- **Code Quality**: Biome for linting/formatting
- **Package Manager**: pnpm v10.11.0
- **Package Manager**: bun v1.3.4

### Key Components

1. **MoQ Client Implementation** (`@moq/hang` package):
1. **MoQ Client Implementation** (`@kixelated/hang` package):
- Custom web components: `<hang-publish>`, `<hang-watch>`, `<hang-support>`
- WebTransport protocol for relay connections
- Publishing: `src/components/publish.tsx` - Creates broadcasts with random names
Expand Down Expand Up @@ -67,6 +67,6 @@ npm run fix # Auto-fix code issues and audit dependencies

- WebTransport requires HTTPS even in development (handled by vite-plugin-mkcert)
- Broadcasts are ephemeral - no persistence layer
- The `@moq/hang` package handles all MoQ protocol implementation
- The `@kixelated/hang` package handles all MoQ protocol implementation
- For new blog posts, add MDX files to `src/pages/blog/`
- Component changes in `src/components/` automatically reload with HMR
14 changes: 5 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
FROM node:slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
FROM oven/bun:1.3.4-slim AS base
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use Bun 1.3.5 instead of 1.3.4.

Bun 1.3.4 is confirmed as a stable, released version, but Bun 1.3.5 (released 3 days ago) includes additional bug fixes and improvements. Update the base image to oven/bun:1.3.5-slim for the latest stable release.

🤖 Prompt for AI Agents
In Dockerfile around lines 1 to 1, the base image pins oven/bun:1.3.4-slim;
update the tag to oven/bun:1.3.5-slim to use the newer stable Bun release.
Modify the FROM line to reference oven/bun:1.3.5-slim (no other changes needed).

ENV NODE_ENV=production

RUN corepack enable

COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache bun install --production --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache bun install --frozen-lockfile
RUN bun run build

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
ENV HOST="0.0.0.0"
CMD [ "node", "./dist/server/entry.mjs" ]
CMD [ "bun", "./dist/server/entry.mjs" ]
6 changes: 3 additions & 3 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export default defineConfig({
fs: {
allow: [
".",
// Allow `npm link @moq/hang`
fs.realpathSync(path.resolve("node_modules/@moq/hang")),
// Allow `npm link @kixelated/hang`
fs.realpathSync(path.resolve("node_modules/@kixelated/hang")),
],
},
},
Expand All @@ -37,7 +37,7 @@ export default defineConfig({
},
},
optimizeDeps: {
exclude: ["@moq/hang"],
exclude: ["@kixelated/hang"],
},
},
});
1,472 changes: 1,472 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,47 @@ default:

# Run the CI checks
check:
pnpm i
bun i

# Lint the JS packages
pnpm exec biome check
bun exec biome check

# Make sure Typescript compiles
pnpm run check
bun run check

# Automatically fix some issues.
fix:
# Fix the JS packages
pnpm i
bun i

# Format and lint
pnpm exec biome check --fix
bun exec biome check --fix

# Run any CI tests
test:
# Run the JS tests via node.
pnpm test
bun test

# Upgrade any tooling
upgrade:
# Update the NPM dependencies
pnpm self-update
pnpm update
pnpm outdated
bun upgrade
bun outdated

# Build the packages
build:
pnpm i
pnpm astro build
bun i
bun astro build

# Deploy the site to Cloudflare Pages
deploy env="staging": build
pnpm wrangler deploy --env {{env}}
bun wrangler deploy --env {{env}}

dev:
pnpm i
bun i

# Run the web development server
pnpm astro dev --open
bun astro dev --open

preview: build
pnpm astro preview --open
bun astro preview --open
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"deploy": "wrangler deploy",
"prod": "astro build --production && wrangler pages dev ./dist --open",
"check": "biome ci && tsc --noEmit",
"fix": "biome check --write && pnpm audit fix"
"fix": "biome check --write && bun audit fix"
},
"dependencies": {
"@moq/hang": "^0.1.0",
"@kixelated/hang": "^0.6.1",
"astro": "^5.8.2",
"solid-js": "^1.9.7",
"unique-names-generator": "^4.7.1"
Expand All @@ -31,5 +31,5 @@
"@types/node": "^22.15.29",
"wrangler": "^4.29.1"
},
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
"packageManager": "bun@1.3.4"
}
Loading
Loading