chore: unify pnpm into a single root workspace#103
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Greptile SummaryThis PR unifies the repository into a single pnpm workspace rooted at the repo root, eliminating the separate
Confidence Score: 5/5Safe to merge on the repo side; the only outstanding risk is Vercel dashboard configuration, which the author has explicitly called out. All changes are mechanical: workspace settings migrated verbatim, CI paths updated consistently, and the unified lockfile covers both root and frontend packages. No logic changes, no new runtime code, and the local verification steps in the PR description cover the critical paths. No files require special attention beyond confirming the Vercel project settings are updated in the dashboard before or alongside merge.
|
| Filename | Overview |
|---|---|
| .github/workflows/ci.yml | Removes working-directory: frontend defaults and updates cache-dependency-path to root pnpm-lock.yaml for typecheck and build jobs; installs and runs correctly from workspace root. |
| package.json | Adds workspace root scripts delegating to the frontend package via --filter; adds name, private, and a lint script using biome check . |
| pnpm-workspace.yaml | New root workspace config declaring frontend as a package and migrating pnpm 10 security/build settings from frontend/pnpm-workspace.yaml. |
| pnpm-lock.yaml | New root-level lockfile replacing the deleted frontend/pnpm-lock.yaml; covers both root devDependencies (Biome) and the frontend workspace. |
| frontend/pnpm-lock.yaml | Deleted — superseded by the new root pnpm-lock.yaml that covers the unified workspace. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before
A[root pnpm install - biome only]
B[frontend pnpm install - Next.js]
A -- separate install --> B
end
subgraph After
C[root pnpm install - unified workspace]
D[frontend - Next.js app]
C -- workspace member --> D
end
subgraph CI
E[lint - biome standalone]
F[typecheck - pnpm typecheck]
G[build - pnpm build]
F --> D
G --> D
end
Reviews (2): Last reviewed commit: "chore: unify pnpm into a single root wor..." | Re-trigger Greptile
| "build": "pnpm --filter frontend build", | ||
| "start": "pnpm --filter frontend start", | ||
| "typecheck": "pnpm --filter frontend typecheck", | ||
| "lint": "biome check ." |
There was a problem hiding this comment.
lint script diverges from CI behavior
The CI lint job runs biome ci --linter-enabled=true --formatter-enabled=true directly (via biomejs/setup-biome), while the new root lint script runs biome check .. biome check without --write exits non-zero on violations like biome ci does, but the flag set differs — biome ci hard-enables both linter and formatter regardless of biome.json, whereas biome check . inherits defaults from config. If biome.json disables one of those by default, pnpm lint locally will pass on code that CI rejects, defeating the point of the script.
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 9
Comment:
**`lint` script diverges from CI behavior**
The CI `lint` job runs `biome ci --linter-enabled=true --formatter-enabled=true` directly (via `biomejs/setup-biome`), while the new root `lint` script runs `biome check .`. `biome check` without `--write` exits non-zero on violations like `biome ci` does, but the flag set differs — `biome ci` hard-enables both linter and formatter regardless of biome.json, whereas `biome check .` inherits defaults from config. If `biome.json` disables one of those by default, `pnpm lint` locally will pass on code that CI rejects, defeating the point of the script.
How can I resolve this? If you propose a fix, please make it concise.- Add root pnpm-workspace.yaml (packages: [frontend]) and move the pnpm 10 settings (minimumReleaseAge, minimumReleaseAgeExclude, onlyBuiltDependencies, allowBuilds) up from frontend/. - Add root package.json scripts delegating to the frontend workspace (dev/build/start/typecheck) plus a biome lint script. - Delete frontend/pnpm-workspace.yaml and frontend/pnpm-lock.yaml; the repo now has a single root pnpm-lock.yaml covering root (biome) + frontend. - ci.yml: typecheck/build install once at the repo root (no working-directory, cache-dependency-path: pnpm-lock.yaml) and run the root pnpm scripts. Verified locally with pnpm 10: frozen install, pnpm typecheck, pnpm build pass.
2b1f545 to
d0b4c2a
Compare
Makes the repo root the single pnpm workspace, eliminating the two separate pnpm installs (root Biome-only + self-contained
frontend/).Changes
pnpm-workspace.yamlwithpackages: [frontend], moving the pnpm-10 settings (minimumReleaseAge,minimumReleaseAgeExclude,onlyBuiltDependencies,allowBuilds) up fromfrontend/.package.jsonscripts delegating to the workspace:dev/build/start/typecheck→pnpm --filter frontend ..., pluslint→biome check ..frontend/pnpm-workspace.yamlandfrontend/pnpm-lock.yaml— there is now a single rootpnpm-lock.yamlcovering root (Biome) + frontend.ci.yml:typecheck/buildinstall once at the repo root (droppedworking-directory: frontend;cache-dependency-path: pnpm-lock.yaml) and run the root scripts.Verification (pnpm 10, Node 22, locally)
pnpm install --frozen-lockfile✓ (lockfile up to date)pnpm typecheck✓pnpm build✓ (Next 16 production build)biome ci✓ (only the pre-existingnoNonNullAssertionwarning)This moves the lockfile to the repo root and makes the project a pnpm workspace. The Vercel project settings (Root Directory, Install Command, lockfile detection) live in the dashboard, not this repo — they likely need updating or preview/production deploys can break. Suggested Vercel settings:
frontendwith "Include files outside the root directory" enabled (so the root lockfile/workspace is available), or set Root Directory to repo root with build/output configured forfrontend.pnpm install --frozen-lockfilerun at the workspace root.Please confirm/adjust the Vercel side together with this merge.