Skip to content

Conversation

@maifeeulasad
Copy link
Contributor

closes #551

Copilot AI review requested due to automatic review settings January 10, 2026 05:09
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.

Copilot wasn't able to review any files in this pull request.


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

@maifeeulasad maifeeulasad marked this pull request as draft January 10, 2026 05:09
@maifeeulasad maifeeulasad marked this pull request as ready for review January 10, 2026 05:12
Copilot AI review requested due to automatic review settings January 10, 2026 05:12
@maifeeulasad maifeeulasad changed the title draft: migrate into pnpm migrate into pnpm Jan 10, 2026
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

Copilot reviewed 3 out of 5 changed files in this pull request and generated 6 comments.


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

Copilot AI review requested due to automatic review settings January 10, 2026 05:33
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

Copilot reviewed 22 out of 24 changed files in this pull request and generated 6 comments.


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

WORKDIR /app

# Copy package files
COPY package.json package-lock.json* ./
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

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

The Dockerfile copies package-lock.json* but should copy pnpm-lock.yaml instead for pnpm. After migrating to pnpm, the lockfile has changed from package-lock.json to pnpm-lock.yaml.

Suggested change
COPY package.json package-lock.json* ./
COPY package.json pnpm-lock.yaml ./

Copilot uses AI. Check for mistakes.
Comment on lines 8 to 9
# Copy package files
COPY package.json package-lock.json* ./
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

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

The pnpm-workspace.yaml configuration file should be copied to the Docker image. Pnpm requires this workspace configuration file to properly install dependencies in a monorepo setup.

Suggested change
# Copy package files
COPY package.json package-lock.json* ./
# Copy package files (including pnpm workspace and lockfile)
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml* package-lock.json* ./

Copilot uses AI. Check for mistakes.
"dev": "tsx watch src/index.ts",
"start": "node dist/index.js",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm i -g pnpm && pnpm run build"
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

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

Installing pnpm globally during the prepublishOnly phase could fail if npm is not available in the publishing environment, or if there are permission issues. Consider using npx to run pnpm directly, or ensure pnpm is pre-installed in the publishing environment. A more robust approach would be to use corepack enable if available, or to handle the pnpm installation separately.

Suggested change
"prepublishOnly": "npm i -g pnpm && pnpm run build"
"prepublishOnly": "corepack enable && pnpm run build"

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +8
onlyBuiltDependencies:
- electron
- electron-winstaller
- esbuild
- protobufjs
- sharp
- unrs-resolver
- workerd
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

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

The pnpm-workspace.yaml file is missing the required packages: field to define workspace packages. Since this project has packages in the packages/ directory (claude-plugin and mcp-server), the workspace configuration should include a packages: array. The onlyBuiltDependencies option is also not a standard top-level pnpm configuration - this should be onlyBuiltDependencies under pnpm in package.json, or the configuration needs to follow the correct pnpm workspace format.

Suggested change
onlyBuiltDependencies:
- electron
- electron-winstaller
- esbuild
- protobufjs
- sharp
- unrs-resolver
- workerd
packages:
- "packages/*"

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +12
# Install pnpm using npm
RUN npm install -g pnpm
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

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

npm install -g pnpm pulls and executes an unpinned third-party build tool at image build time, so any compromise of the pnpm package or the npm registry could inject malicious code into your build with access to the build environment. To reduce supply-chain risk and ensure reproducible builds, pin pnpm to a specific version or use a built-in package manager mechanism (for example via packageManager/corepack) that gives you a fixed, integrity-checked toolchain.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +41
# Install pnpm using npm
RUN npm install -g pnpm
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

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

This npm install -g pnpm in the builder stage again installs and executes an unpinned third-party tool at build time, so a compromised pnpm release or npm registry incident could run attacker-controlled code with access to your build arguments and environment variables (including any secrets passed via ARG/ENV). Prefer pinning pnpm to a specific version or using a deterministic package-manager bootstrap (e.g., corepack with packageManager) so the build toolchain is stable and less susceptible to supply-chain compromise.

Copilot uses AI. Check for mistakes.
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.

[Enhancement] Use pnpm over npm | DX

1 participant