Skip to content

Commit d62cb6e

Browse files
authored
Write a hash-tag blog post. (#73)
1 parent 4694cf5 commit d62cb6e

17 files changed

Lines changed: 1710 additions & 6322 deletions

File tree

.github/workflows/pr.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: pnpm/action-setup@v4
13+
- uses: oven-sh/setup-bun@v2
1414
with:
15-
run_install: false
15+
bun-version: 1.3.4
1616

17-
- uses: actions/setup-node@v4
18-
with:
19-
cache: 'pnpm'
20-
21-
- run: pnpm install --frozen-lockfile
22-
- run: pnpm run check
17+
- run: bun install --frozen-lockfile
18+
- run: bun run check

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ npm run fix # Auto-fix code issues and audit dependencies
2929
- **Styling**: Tailwind CSS
3030
- **Build**: Vite with WASM and mkcert plugins
3131
- **Code Quality**: Biome for linting/formatting
32-
- **Package Manager**: pnpm v10.11.0
32+
- **Package Manager**: bun v1.3.4
3333

3434
### Key Components
3535

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

6868
- WebTransport requires HTTPS even in development (handled by vite-plugin-mkcert)
6969
- Broadcasts are ephemeral - no persistence layer
70-
- The `@moq/hang` package handles all MoQ protocol implementation
70+
- The `@kixelated/hang` package handles all MoQ protocol implementation
7171
- For new blog posts, add MDX files to `src/pages/blog/`
7272
- Component changes in `src/components/` automatically reload with HMR

Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
FROM node:slim AS base
2-
ENV PNPM_HOME="/pnpm"
3-
ENV PATH="$PNPM_HOME:$PATH"
1+
FROM oven/bun:1.3.4-slim AS base
42
ENV NODE_ENV=production
53

6-
RUN corepack enable
7-
84
COPY . /app
95
WORKDIR /app
106

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

1410
FROM base AS build
15-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
16-
RUN pnpm run build
11+
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache bun install --frozen-lockfile
12+
RUN bun run build
1713

1814
FROM base
1915
COPY --from=prod-deps /app/node_modules /app/node_modules
2016
COPY --from=build /app/dist /app/dist
2117
ENV HOST="0.0.0.0"
22-
CMD [ "node", "./dist/server/entry.mjs" ]
18+
CMD [ "bun", "./dist/server/entry.mjs" ]

astro.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default defineConfig({
2626
fs: {
2727
allow: [
2828
".",
29-
// Allow `npm link @moq/hang`
30-
fs.realpathSync(path.resolve("node_modules/@moq/hang")),
29+
// Allow `npm link @kixelated/hang`
30+
fs.realpathSync(path.resolve("node_modules/@kixelated/hang")),
3131
],
3232
},
3333
},
@@ -37,7 +37,7 @@ export default defineConfig({
3737
},
3838
},
3939
optimizeDeps: {
40-
exclude: ["@moq/hang"],
40+
exclude: ["@kixelated/hang"],
4141
},
4242
},
4343
});

bun.lock

Lines changed: 1472 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

justfile

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,47 @@ default:
88

99
# Run the CI checks
1010
check:
11-
pnpm i
11+
bun i
1212

1313
# Lint the JS packages
14-
pnpm exec biome check
14+
bun exec biome check
1515

1616
# Make sure Typescript compiles
17-
pnpm run check
17+
bun run check
1818

1919
# Automatically fix some issues.
2020
fix:
2121
# Fix the JS packages
22-
pnpm i
22+
bun i
2323

2424
# Format and lint
25-
pnpm exec biome check --fix
25+
bun exec biome check --fix
2626

2727
# Run any CI tests
2828
test:
2929
# Run the JS tests via node.
30-
pnpm test
30+
bun test
3131

3232
# Upgrade any tooling
3333
upgrade:
3434
# Update the NPM dependencies
35-
pnpm self-update
36-
pnpm update
37-
pnpm outdated
35+
bun upgrade
36+
bun outdated
3837

3938
# Build the packages
4039
build:
41-
pnpm i
42-
pnpm astro build
40+
bun i
41+
bun astro build
4342

4443
# Deploy the site to Cloudflare Pages
4544
deploy env="staging": build
46-
pnpm wrangler deploy --env {{env}}
45+
bun wrangler deploy --env {{env}}
4746

4847
dev:
49-
pnpm i
48+
bun i
5049

5150
# Run the web development server
52-
pnpm astro dev --open
51+
bun astro dev --open
5352

5453
preview: build
55-
pnpm astro preview --open
54+
bun astro preview --open

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"deploy": "wrangler deploy",
1111
"prod": "astro build --production && wrangler pages dev ./dist --open",
1212
"check": "biome ci && tsc --noEmit",
13-
"fix": "biome check --write && pnpm audit fix"
13+
"fix": "biome check --write && bun audit fix"
1414
},
1515
"dependencies": {
16-
"@moq/hang": "^0.1.0",
16+
"@kixelated/hang": "^0.6.1",
1717
"astro": "^5.8.2",
1818
"solid-js": "^1.9.7",
1919
"unique-names-generator": "^4.7.1"
@@ -31,5 +31,5 @@
3131
"@types/node": "^22.15.29",
3232
"wrangler": "^4.29.1"
3333
},
34-
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
34+
"packageManager": "bun@1.3.4"
3535
}

0 commit comments

Comments
 (0)