Skip to content

fix(build): drop settings-only pnpm-workspace.yaml - #388

Merged
dmnktoe merged 1 commit into
mainfrom
claude/sentiment-pnpm-packages-error-wvbeac
Aug 2, 2026
Merged

fix(build): drop settings-only pnpm-workspace.yaml#388
dmnktoe merged 1 commit into
mainfrom
claude/sentiment-pnpm-packages-error-wvbeac

Conversation

@dmnktoe

@dmnktoe dmnktoe commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Problem

Deployments fail since #387 with:

#11 [stage-0 7/11] RUN pnpm install --frozen-lockfile
#11 0.878 ERROR packages field missing or empty

#387 added a pnpm-workspace.yaml containing only a setting:

minimumReleaseAge: 1440

As soon as that file exists, pnpm treats the repo as a workspace root. Only pnpm >= 10.16 accepts a settings-only manifest without a packages field; the pnpm shipped in the Nixpacks build image (ghcr.io/railwayapp/nixpacks:ubuntu-1745885067) is older and aborts.

It went unnoticed because local dev and CI run pnpm 10 (ci.yml pins version: 10) — only the deploy image uses an older version.

Change

  • Delete pnpm-workspace.yaml — this is a single-package repo, not a workspace.
  • Move the setting to .npmrc as minimum-release-age=1440. Newer pnpm picks it up, older versions silently ignore unknown keys instead of failing.

The Renovate-side delay is unaffected — it stays configured via "minimumReleaseAge": "3 days" in .github/renovate.json.

Verification

pnpm install --frozen-lockfile runs clean with no lockfile changes (pnpm 10.33). pnpm config get minimum-release-age returns 1440, confirming the .npmrc key is honoured.

Notes

  • Adding a packageManager: "pnpm@10.x" field to package.json would additionally pin the pnpm version inside the deploy image (Nixpacks then enables Corepack). That is more robust against this class of version drift, but it changes build behaviour, so it is left out of this fix.
  • Alternatively the settings-only file could be kept if the Coolify deploy is configured to use a newer pnpm than the image default.

Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Updated package installation settings to enforce a 24-hour release age for newly published packages.
    • Consolidated this setting into the project’s package manager configuration.

The deployment image runs an older pnpm that requires a `packages`
field whenever pnpm-workspace.yaml exists, so the settings-only file
added in #387 broke `pnpm install --frozen-lockfile` with
"ERROR packages field missing or empty".

This is a single-package repo, so remove the workspace manifest and
keep the install delay as `minimum-release-age` in .npmrc, which newer
pnpm honours and older versions ignore.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EGa5VhTpdhqAvcyQbt6aPq
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request adds minimum-release-age=1440 to .npmrc and removes the equivalent minimumReleaseAge setting from pnpm-workspace.yaml.

Changes

npm release age configuration

Layer / File(s) Summary
Configure npm release age
.npmrc, pnpm-workspace.yaml
.npmrc sets the minimum release age to 1440. pnpm-workspace.yaml no longer defines the equivalent setting.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: removing the settings-only pnpm-workspace.yaml file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/sentiment-pnpm-packages-error-wvbeac

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.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.04%. Comparing base (139ad1f) to head (d0123ff).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #388   +/-   ##
=======================================
  Coverage   67.04%   67.04%           
=======================================
  Files          67       67           
  Lines         789      789           
  Branches      169      169           
=======================================
  Hits          529      529           
  Misses        260      260           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.npmrc:
- Line 3: Remove the minimum-release-age setting from .npmrc and define the
equivalent minimumReleaseAge configuration in pnpm-workspace.yaml or the global
config.yaml, preserving the 1440-minute value so supply-chain protection remains
enabled.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e3d225d-9763-4790-a6e7-cfa31d983e22

📥 Commits

Reviewing files that changed from the base of the PR and between 139ad1f and d0123ff.

📒 Files selected for processing (2)
  • .npmrc
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (1)
  • pnpm-workspace.yaml

Comment thread .npmrc
@@ -1,2 +1,3 @@
save-exact = true
strict-peer-dependencies=false
minimum-release-age=1440

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

pnpm settings .npmrc only authentication and registry settings minimumReleaseAge configuration file

💡 Result:

In pnpm,.npmrc files are primarily designated for registry and authentication settings [1][2]. Other configuration settings, including minimumReleaseAge, should generally be placed in pnpm-workspace.yaml (for workspace projects) or a global configuration file [1][3][4]. Authentication and Registry Settings.npmrc files are used to manage registry URLs, proxy settings, and authentication credentials (e.g., _authToken, _auth, username) [5][6]. As of recent versions (v10.34.2 and v11.5.3+), environment variables are no longer expanded within project-level or workspace-level.npmrc files to prevent security risks [6][7]. For sensitive credentials, it is recommended to use trusted locations such as the user-level ~/.npmrc, environment variables (e.g., pnpm_config_//registry.npmjs.org/:_authToken=...), or CLI options [5][6][7]. minimumReleaseAge Configuration The minimumReleaseAge setting is a security feature that delays the installation of newly published package versions [3][8]. - Recommended Location: It should be configured in your pnpm-workspace.yaml file [3][4]. - Configuration Format: When using pnpm-workspace.yaml, it is specified in camelCase: minimumReleaseAge: <minutes> [3][4]. -.npmrc Usage: While some users have reported that using the kebab-case format minimum-release-age=<minutes> in .npmrc may be recognized in certain contexts, it is not the standard or recommended configuration method for this setting [9][10]. Placing it in pnpm-workspace.yaml ensures it is consistently applied across the workspace [1][4]. To opt out of the default release age restriction (which is 1440 minutes, or 1 day, as of pnpm v11+), you can set minimumReleaseAge: 0 in your pnpm-workspace.yaml [3][9].

Citations:


🌐 Web query:

pnpm minimumReleaseAge pnpm-workspace.yaml config.yaml npmrc

💡 Result:

The minimumReleaseAge setting is a security feature in pnpm that delays the installation of newly published package versions to protect against supply chain attacks [1][2]. It defines the minimum number of minutes that must pass after a package version is published before pnpm will allow it to be installed [1][3]. Configuration and Behavior - The setting accepts a number in minutes [3][4]. - It applies to all dependencies, including transitive ones [1][3]. - As of pnpm v11, the default value is 1440 (1 day) [1][4]. - To opt out of this protection or disable it, you can set minimumReleaseAge: 0 [1][5]. Where to Configure The setting should be defined in your pnpm-workspace.yaml file or the global config.yaml file (e.g., ~/.config/pnpm/config.yaml) [6][3][4]. - pnpm-workspace.yaml: Configure it using camelCase, for example: minimumReleaseAge: 1440 [3][7]. -.npmrc: While pnpm documentation emphasizes that most settings belong in pnpm-workspace.yaml or global config.yaml [6][4], some users have noted that the setting can be applied in.npmrc using kebab-case (minimum-release-age=1440) [5][8][7]. However, official guidance directs users toward workspace and global configuration files [6][4]. Related Settings - minimumReleaseAgeExclude: A list of package names that should be excluded from the minimumReleaseAge restriction [2][3]. These packages will always install the newest version immediately [3]. - minimumReleaseAgeStrict: When you explicitly set minimumReleaseAge, this setting defaults to true, meaning pnpm will strictly enforce the age requirement [9]. If you want to allow pnpm to silently fall back to an immature version when no mature version satisfies the requested range, you can set minimumReleaseAgeStrict: false [9]. Note that the built-in default (1440) remains non-strict [9].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Repository files relevant to pnpm/npmrc:\n'
git ls-files | rg '(^|/)(\.npmrc|pnpm-workspace\.yaml|package\.json|pnpm-lock\.yaml)$' || true

printf '\n.npmrc contents:\n'
cat -n .npmrc 2>/dev/null || true

printf '\npackage files version/tool references:\n'
for f in $(git ls-files | rg '(^|/)(package\.json|pnpm-workspace\.yaml|\.github/workflows/.*)$'); do
  if rg -n '"pnpm"|pnpm |minimumReleaseAge|minimum-release-age|minimum-release-older-than|pnpmInstall' "$f" >/dev/null; then
    echo "--- $f"
    rg -n -C 2 '"pnpm"|pnpm |minimumReleaseAge|minimum-release-age|minimum-release-older-than|pnpmInstall' "$f" || true
  fi
done

printf '\nSearch all tracked files for minimumReleaseAge:\n'
rg -n -i 'minimumReleaseAge|minimum-release-age|minimum-release-older-than' . || true

Repository: dmnktoe/sentiment

Length of output: 1554


Move minimumReleaseAge out of .npmrc.

.npmrc is intended for registry and authentication settings, while minimumReleaseAge should live in pnpm-workspace.yaml or the global config.yaml. Keeping it here may make newer pnpm versions ignore the setting and leave supply-chain protection at its default behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.npmrc at line 3, Remove the minimum-release-age setting from .npmrc and
define the equivalent minimumReleaseAge configuration in pnpm-workspace.yaml or
the global config.yaml, preserving the 1440-minute value so supply-chain
protection remains enabled.

@dmnktoe
dmnktoe merged commit 751e89d into main Aug 2, 2026
6 checks passed
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.

2 participants