Skip to content

Migrate to pnpm and update development instructions#4

Merged
astrowq merged 2 commits intoanyin-ai:mainfrom
astrowq:dev/frontend
Mar 11, 2026
Merged

Migrate to pnpm and update development instructions#4
astrowq merged 2 commits intoanyin-ai:mainfrom
astrowq:dev/frontend

Conversation

@astrowq
Copy link
Contributor

@astrowq astrowq commented Mar 11, 2026

No description provided.

…lopment and build instructions in AGENTS.md, CONTRIBUTING.md, and DOCS.md. Remove package-lock.json and specify package manager in package.json.
Copilot AI review requested due to automatic review settings March 11, 2026 12:55
@astrowq astrowq added the enhancement New feature or request label Mar 11, 2026
@astrowq astrowq self-assigned this Mar 11, 2026
@astrowq astrowq requested a review from mat2ix March 11, 2026 12:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the frontend from npm to pnpm, updating lockfiles, build tooling, CI, and developer documentation to standardize installs/builds around pnpm.

Changes:

  • Add pnpm-lock.yaml, remove package-lock.json, and pin pnpm via packageManager in frontend/package.json.
  • Update the frontend Docker build to use pnpm (corepack + pnpm install --frozen-lockfile).
  • Add a dedicated GitHub Actions workflow to install/build the frontend with pnpm and update docs/instructions accordingly.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/pnpm-lock.yaml Introduces pnpm lockfile for deterministic dependency resolution.
frontend/package.json Pins pnpm via packageManager.
frontend/package-lock.json Removes npm lockfile as part of the migration.
frontend/Dockerfile Switches container build from npm to pnpm.
DOCS.md Updates local frontend dev commands to pnpm.
CONTRIBUTING.md Updates contributor build instructions to pnpm.
AGENTS.md Updates quick commands for agents/dev workflow to pnpm.
.github/workflows/frontend-ci.yml Adds pnpm-based frontend CI build workflow.
.cursor/rules/aperture-project.mdc Updates project run/build instructions to pnpm.
Files not reviewed (1)
  • frontend/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 1 to +8
FROM node:20-alpine AS builder

RUN corepack enable && corepack prepare pnpm@9 --activate

WORKDIR /app

COPY package*.json ./
RUN npm ci
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The build image is node:20-alpine, but the frontend toolchain in pnpm-lock.yaml (e.g. Vite / @vitejs/plugin-react) requires Node ^20.19.0 || >=22.12.0. node:20-alpine isn’t pinned to a minor/patch and may resolve to a Node 20 version < 20.19, which can break pnpm install/pnpm run build.

Also, corepack prepare pnpm@9 --activate pulls an arbitrary latest pnpm v9, which can drift from the pinned packageManager: pnpm@9.15.0 in package.json and reduce build reproducibility. Consider pinning the base image to node:20.19-alpine (or moving to node:22.12-alpine) and preparing the exact pnpm version from package.json (e.g. pnpm@9.15.0).

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +33
version: 9

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

CI pins pnpm to major 9 and Node to '22', but the lockfile indicates Vite and @vitejs/plugin-react require Node ^20.19.0 || >=22.12.0. Using '22' relies on whatever minor version setup-node selects; pinning to 22.12.0 (or using 20.19.0) avoids accidental engine mismatches.

For reproducibility, it would also help to align pnpm with frontend/package.json’s packageManager: pnpm@9.15.0 by setting pnpm/action-setup to version: 9.15.0 (or using corepack to honor packageManager).

Suggested change
version: 9
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
version: 9.15.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.12.0'

Copilot uses AI. Check for mistakes.
…e, and package.json for improved package management.
@astrowq astrowq merged commit 874fe04 into anyin-ai:main Mar 11, 2026
1 check passed
@astrowq astrowq deleted the dev/frontend branch March 11, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants