Move to Bun

This commit is contained in:
2026-02-24 17:51:12 -07:00
parent c5fc1cedd7
commit 22d3b9d7df
9 changed files with 29 additions and 4843 deletions

View File

@@ -1,23 +1,17 @@
FROM node:24-alpine AS builder
FROM oven/bun:1.3.9-alpine AS builder
WORKDIR /app
RUN apk add --no-cache libc6-compat && \
corepack enable && corepack prepare pnpm@latest --activate
COPY package.json bun.lock* ./
COPY package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile || pnpm install
RUN bun install --frozen-lockfile || bun install
COPY . .
RUN pnpm run build
RUN pnpm prune --prod
RUN bun run build
RUN rm -rf node_modules && bun install --production
FROM node:24-alpine AS runtime
FROM oven/bun:1.3.9-alpine AS runtime
WORKDIR /app
RUN apk add --no-cache libc6-compat
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY package.json ./
@@ -26,4 +20,4 @@ ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
CMD ["node", "./dist/server/entry.mjs"]
CMD ["bun", "run", "./dist/server/entry.mjs"]

View File

@@ -22,14 +22,12 @@
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs_24
nodePackages.pnpm
bun
];
shellHook = ''
echo "<atashdotdev dev shell>"
echo "Node version: $(node --version)"
echo "pnpm version: $(pnpm --version)"
echo "Bun version: $(bun --version)"
'';
};
});

View File

@@ -11,7 +11,6 @@
"dependencies": {
"@astrojs/node": "10.0.0-beta.5",
"@astrojs/vue": "6.0.0-beta.1",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource-variable/roboto-slab": "^5.2.8",
"@tailwindcss/vite": "^4.2.1",
"astro": "6.0.0-beta.15",
@@ -24,5 +23,6 @@
"@types/node": "^25.3.0",
"@types/nodemailer": "^7.0.11",
"daisyui": "^5.5.19"
}
},
"packageManager": "bun@1.3.9"
}

4815
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -22,14 +22,13 @@ import { Image } from "astro:assets";
<ul
tabindex="0"
class="menu menu-sm dropdown-content bg-base-100 rounded-xl z-50 mt-3 w-56 p-3 shadow-xl border border-base-200"
role="menu"
aria-label="Navigation Button"
>
{
siteConfig.header.nav.map(({ text, href }) => (
<li role="none">
<li>
<a
href={href}
role="menuitem"
class="py-3 px-4 rounded-lg font-medium hover:bg-primary/10 hover:text-primary transition-colors"
>
{text}
@@ -60,13 +59,12 @@ import { Image } from "astro:assets";
</a>
</div>
<nav class="navbar-center hidden lg:flex" aria-label="Main navigation">
<ul class="menu menu-horizontal gap-1" role="menubar">
<ul class="menu menu-horizontal gap-1">
{
siteConfig.header.nav.map(({ text, href }) => (
<li role="none">
<li>
<a
href={href}
role="menuitem"
class="font-medium px-4 py-2 rounded-lg hover:bg-primary/10 hover:text-primary transition-colors"
>
{text}
@@ -80,7 +78,7 @@ import { Image } from "astro:assets";
<a
href={siteConfig.header.cta.href}
class="btn btn-primary btn-sm lg:btn-md shadow-md hover:shadow-lg transition-all"
role="button"
aria-label={siteConfig.header.cta.text}
>
{siteConfig.header.cta.text}
</a>

View File

@@ -77,7 +77,9 @@ ${message.value}`,
</legend>
<input
type="text"
id="firstName"
name="firstName"
:aria-label="siteConfig.contact.form.firstName"
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
required
v-model="firstName"
@@ -96,7 +98,9 @@ ${message.value}`,
</legend>
<input
type="text"
id="lastName"
name="lastName"
:aria-label="siteConfig.contact.form.lastName"
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
required
v-model="lastName"
@@ -117,7 +121,9 @@ ${message.value}`,
</legend>
<input
type="email"
id="email"
name="email"
:aria-label="siteConfig.contact.form.email"
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
required
v-model="email"
@@ -136,7 +142,9 @@ ${message.value}`,
</legend>
<input
type="text"
id="company"
name="company"
:aria-label="siteConfig.contact.form.company"
class="input input-bordered w-full bg-base-100 focus:border-primary focus:outline-primary"
v-model="company"
:disabled="status === 'sending'"
@@ -215,6 +223,7 @@ ${message.value}`,
<textarea
id="project-details"
name="message"
:aria-label="siteConfig.contact.form.message"
class="textarea textarea-bordered h-36 w-full resize-none bg-base-100 focus:border-primary focus:outline-primary"
:placeholder="
siteConfig.contact.form.placeholders.message

View File

@@ -22,7 +22,7 @@ const rotatingText = (siteConfig.hero as any).rotatingText as
<div class="relative max-w-7xl mx-auto px-6">
<div class="text-center max-w-4xl mx-auto">
<StatusIndicator client:load />
<StatusIndicator client:idle />
<h1
class="text-4xl sm:text-5xl lg:text-6xl xl:text-7xl font-extrabold text-white leading-tight tracking-tight mb-6"

View File

@@ -63,6 +63,8 @@ const isProd = import.meta.env.PROD;
/>
<meta property="og:image:type" content={resolvedOgImage.type} />
<meta property="og:image:alt" content={resolvedOgImage.alt} />
<meta name="theme-color" content="#ffffff" />
<link rel="canonical" href={siteUrl} />
<title>{metaTitle}</title>
{
isProd && (

View File

@@ -19,7 +19,7 @@ export const GET: APIRoute = async () => {
status: 200,
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache, no-store, must-revalidate",
"Cache-Control": "public, max-age=60, stale-while-revalidate=300",
},
},
);