keyshade icon indicating copy to clipboard operation
keyshade copied to clipboard

chore: Enforce pnpm as the package manager in package.json (fixes #366)

Open itsaryan72 opened this issue 4 months ago • 6 comments

User description

GENERAL: Only allow PNPM #366

#description Restriction on Package Manager Usage To ensure consistency in our project, I've added a preinstall script in package.json. "preinstall": "if [[ "$npm_config_user_agent" != pnpm ]]; then echo 'This project uses pnpm. Please run using pnpm.'; exit 1; fi",

This script checks the package manager before installation and displays an error if anything other than PNPM is used, promoting uniformity among contributors.

Fixes #366 GENERAL: Only allow PNPM #366

Dependencies

No additional packages or dependencies are required for the preinstall script

Developer's checklist

  • [Y] My PR follows the style guidelines of this project
  • [Y] I have performed a self-check on my work

If changes are made in the code:

  • [Y] I have followed the coding guidelines
  • [Y] My changes in code generate no new warnings
  • [ ] My changes are breaking another fix/feature of the project
  • [ ] I have added test cases to show that my feature works
  • [ ] I have added relevant screenshots in my PR
  • [Y] There are no UI/UX issues

Documentation Update

  • [ ] This PR requires an update to the documentation at docs.keyshade.xyz
  • [ ] I have made the necessary updates to the documentation, or no documentation changes are required.

PR Type

enhancement, configuration changes


Description

  • Added a preinstall script in package.json to enforce the use of PNPM as the package manager.
  • The script checks the npm_config_user_agent and exits with an error message if a package manager other than PNPM is used.
  • This change ensures consistency and uniformity among contributors by restricting package manager usage.

Changes walkthrough 📝

Relevant files
Configuration changes
package.json
Enforce PNPM as the package manager in preinstall script 

package.json

  • Added a preinstall script to enforce the use of PNPM.
  • The script checks the package manager and exits with an error if not
    PNPM.
  • +1/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    itsaryan72 avatar Sep 25 '24 17:09 itsaryan72