Skip to content

Migrate frontend from Deno to Node/pnpm#190

Merged
larsekhansen merged 3 commits into
mainfrom
feat/deno-to-npm
May 11, 2026
Merged

Migrate frontend from Deno to Node/pnpm#190
larsekhansen merged 3 commits into
mainfrom
feat/deno-to-npm

Conversation

@larsekhansen
Copy link
Copy Markdown
Contributor

@larsekhansen larsekhansen commented May 8, 2026

Fjerner Deno fra frontend, går til Node + pnpm. Roten i den vedvarende dual-lockfile-friksjonen var at Trivy/Dependabot leste npm-lockfilen mens bygget kjørte på Deno, så security-bumps og lokale builds drev fra hverandre.

  • Dockerfile: denoland/deno:2.6.5node:22-alpine (multi-stage med corepack + pnpm install --frozen-lockfile)
  • CI: setup-denopnpm/action-setup + setup-node med pnpm-cache
  • apps/frontend/pnpm-lock.yaml erstatter package-lock.json
  • Root pnpm-stubs slettet (workspace-glob matchet aldri apps/*, kan legges tilbake hvis vi får delte pakker)
  • Root package.json scripts (frontend:dev, frontend:build) bruker pnpm
  • Docs (README, azure-deployment, dependabot-kommentar) oppdatert
  • Slettet /deno.lock-entry fra .gitignore

Astro-adapter (@astrojs/node) var allerede i deps. Ingen Deno-spesifikke API-er i src/. Bygg + runtime verifisert lokalt.

Removes the dual-package-manager friction that bit us repeatedly:
Trivy scans the npm lockfile while builds ran on Deno, so security
bumps via Dependabot and local builds drifted apart. Single lockfile
now (package-lock.json), tooling ecosystem expects npm anyway.

- Dockerfile: denoland/deno:2.6.5 -> node:22-alpine (multi-stage,
  builder + runtime, npm ci with --omit=dev at runtime)
- CI: setup-deno -> setup-node@v5 with built-in npm cache
- package.json: add scripts (dev/build/preview/start/test:e2e*)
- Delete deno.json + deno.lock

Astro adapter (@astrojs/node) was already in deps. No source changes
needed (no Deno.* APIs in src/). Verified locally: npm ci, npm run
build, node dist/server/entry.mjs serves HTTP 200.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9a2d18cf-27b4-49d6-86a1-65fe2229ed10

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/deno-to-npm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Barsnes
Copy link
Copy Markdown
Member

Barsnes commented May 11, 2026

can we update to use pnpm as well? 🙏🏻

larsekhansen and others added 2 commits May 11, 2026 10:08
Aligns with the pnpm stub already present in the repo. Single
package, not part of a workspace (root pnpm-workspace.yaml deleted
since it never matched apps/*; can be added back if we ever extract
shared packages).

Changes:
- apps/frontend: pnpm-lock.yaml replaces package-lock.json
- Dockerfile: corepack enable + pnpm install --frozen-lockfile
- CI: pnpm/action-setup + setup-node cache=pnpm
- Root scripts (frontend:dev/build): pnpm instead of deno task
- Docs (README, azure-deployment): commands updated
- .gitignore: drop /deno.lock (Deno path retired)
- dependabot.yml: comment updated; npm ecosystem reads pnpm-lock too
- playwright.config.cjs webServer: pnpm run dev

CMS folder unchanged. No Deno or stale npm artefacts left.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@larsekhansen larsekhansen changed the title Migrate frontend from Deno to Node/npm Migrate frontend from Deno to Node/pnpm May 11, 2026
Comment thread .github/workflows/ci.yml
- uses: actions/checkout@v6

- uses: denoland/setup-deno@v2
- uses: pnpm/action-setup@v4
@larsekhansen larsekhansen merged commit f87f8f0 into main May 11, 2026
8 checks passed
@larsekhansen larsekhansen deleted the feat/deno-to-npm branch May 11, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants