Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9 install command upgrades Lockfile in CI environment #8099

Open
2 of 4 tasks
MartinRamm opened this issue May 19, 2024 · 1 comment
Open
2 of 4 tasks

v9 install command upgrades Lockfile in CI environment #8099

MartinRamm opened this issue May 19, 2024 · 1 comment

Comments

@MartinRamm
Copy link

Verify latest release

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

pnpm version

9.1.1

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

CLI, Lockfile

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

No response

Reproduction steps

Run the following shellscript

#/usr/bin/env sh

export CI='true';
echo "--------Envrionment variable CI--------";
echo "$CI"
echo -e "\n\n"

mkdir test
cd test

npx --yes pnpm@latest-8 i helloWorld
echo -e "\n\n--------Lockfile version before pnpm upgrade--------";
head -n 1 pnpm-lock.yaml
echo -e "\n\n"

npx --yes pnpm@latest i
echo -e "\n\n--------Lockfile version after pnpm upgrade--------";
head -n 1 pnpm-lock.yaml
echo -e "\n\n"

Describe the Bug

https://pnpm.io/cli/install#--frozen-lockfile states that the lockfile is not upgraded when the CI variable is present. The output of the script shows that the upgrade does occur:

--------Envrionment variable CI--------
true



Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +1
+
Progress: resolved 1, reused 1, downloaded 0, added 1, done

dependencies:
+ helloWorld 1.0.0

Done in 1.4s


--------Lockfile version before pnpm upgrade--------
lockfileVersion: '6.0'



Lockfile is up to date, resolution step is skipped
Already up to date

Done in 374ms


--------Lockfile version after pnpm upgrade--------
lockfileVersion: '9.0'

Expected Behavior

  • No upgrade when running the shellscript
  • If an update does occur, the command output notifies the user that the lockfile was upgraded

Which Node.js version are you using?

v20.10.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)

node:20-alpine3.17 (docker image)

@MartinRamm
Copy link
Author

Workaround is to add the --frozen-lockfile argument to the pnpm i commands wherever the lockfile mustn't be upgraded.

@MartinRamm MartinRamm changed the title v9 upgrades Lockfile in CI environment v9 install command upgrades Lockfile in CI environment May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant