Visitar URL original
pnpm i -- frozen-lockfile will cause GitLab CI to cache again · Issue #16929 · pnpm/pnpm · GitHub
Skip to content

pnpm i -- frozen-lockfile will cause GitLab CI to cache again #16929

Closed

Description

@xyhxx

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

12.13.0

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI, Store

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

pnpm-store has already been cached in GitLab CI and there are no new packages. After using pnpm i --frozen-lockfile, the last modification time of pnpm-store/v11 changed, causing GitLab CI to repackage and upload the cache

There is no such issue in v9.12.1

gitlab-ci.yaml

  - export PATH="$PNPM_HOME/bin:$PATH"
  - corepack install
  - pnpm config set store-dir .pnpm-store
  - pnpm config set cache-dir .pnpm-cache
  - stat -c '%y %n' .pnpm-store/v11
  - pnpm i --frozen-lockfile
  - stat -c '%y %n' .pnpm-store/v11

pnpm-workspace.yaml

packages:
  - 'packages/*'

enablePrePostScripts: false
trustLockfile: true
minimumReleaseAge: 0
engineStrict: true
peerDependencyRules:
  ignoreMissing:
    - eslint
    - typescript
    - postcss
patchedDependencies:
  overlayscrollbars@2.10.0: patches/overlayscrollbars@2.10.0.patch
overrides:
  'react-contexify>clsx': '^2.1.1'
allowBuilds:
  core-js: true
  es5-ext: true
  unrs-resolver: true

Describe the Bug

pnpm i --frozen-lockfile even if the lock file remains unchanged, it will still cause a change in the last modification time of pnpm-store

Expected Behavior

The last modification time remains unchanged, and Gitlab CI skips caching

Which Node.js version are you using?

24.21.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Contributing a fix

  • I am working on a fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions