Skip to content

Persistent pending approve-builds #9240

@cghiurea

Description

@cghiurea

Verify latest release

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

pnpm version

No response

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

CLI

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

No response

Reproduction steps

If you install a package that enters the awaiting approval stage, running any other pnpm install command clears the list instead of adding to it:

Example:

❯ pnpm i bcrypt
Packages: +27
+++++++++++++++++++++++++++
Progress: resolved 810, reused 767, downloaded 0, added 0, done

dependencies:
+ bcrypt 5.1.1

Ignored build scripts: bcrypt. Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.

❯ pnpm i
Lockfile is up to date, resolution step is skipped
Already up to date

❯ pnpm approve-builds
There are no packages awaiting approval

As you can see, the initial install works and notifies you of pending approval for builds. However, if you run another install command, such as for Day.js, it resets the pending approval builds list.

❯ pnpm i bcrypt
Packages: +27
+++++++++++++++++++++++++++
Progress: resolved 810, reused 767, downloaded 0, added 0, done

dependencies:
+ bcrypt 5.1.1

Ignored build scripts: bcrypt. Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.

❯ pnpm i dayjs
Packages: +1
+
Progress: resolved 811, reused 768, downloaded 0, added 1, done

dependencies:
+ dayjs 1.11.13


❯ pnpm approve-builds
There are no packages awaiting approval

As you can see it resets the packages awaiting approval
Or if I for example install bcrypt then @swc/core which both require pnpm approve-builds it will only display pending approval for @swc/core

Describe the Bug

If you install a package that enters the awaiting approval stage, running any other pnpm install command clears the list instead of adding to it and maintaining a persistent list for your project.

Expected Behavior

It should maintain the list of packages pending approval for example.

❯pnpm i bcrypt
❯pnpm i @swc/core
❯pnpm approve-builds
? Choose which packages to build (Press <space> to select, <a> to toggle all, <i> to invert selection) ... 
❯ ○ bcrypt
❯ ○ @swc/core

Both packages should show not just @swc/core

Which Node.js version are you using?

20.11.1

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)

Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy