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

Add pnpm #2279

Closed
7 tasks done
meadowsys opened this issue Dec 16, 2020 · 4 comments
Closed
7 tasks done

Add pnpm #2279

meadowsys opened this issue Dec 16, 2020 · 4 comments

Comments

@meadowsys
Copy link

Tool information

  • Tool name: pnpm
  • Tool license: MIT
  • Add or update? add
  • Desired version: latest (but dont update randomly, obviously)
  • Approximate size: 10.9MB unpacked (according to npm)
  • If this is an add request:
    • Brief description of tool: performant npm/yarn alternative for managing node.js dependencies
    • URL for tool's homepage: https://pnpm.js.org/
    • Provide a basic test case to validate the tool's functionality:

Area for Triage:

JavaScript and Node.js

Question, Bug, or Feature?:

feature

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Can this tool be installed during the build?

yes

  1. use this action somewhere in the build process https://github.com/marketplace/actions/setup-pnpm
  2. its added to the path, so you can use it as if you did a npm global install (can run pnpm install for example)

Tool installation time in runtime

~3-5 seconds

Are you willing to submit a PR?

not completely sure how the runner works so I'll have to take a look around in the repo, but I'm willing to PR

@AlenaSviridenko
Copy link
Contributor

Hi @autumnblazey,
given the small installation time in runtime and the existence of action with a wider functionality where you can select which version you want to use, we'd prefer not to pre-install this tool on images.
Usage of action is more safe and reliable way to install and use any tool that will guarantee that your workflow won't be broken with unexpected tool upgrade.

I am closing this issue. Please, feel free to create a new one in case if any other help is needed.

@meadowsys
Copy link
Author

meadowsys commented Jan 15, 2021

edit: fixed! I believe pnpm/[email protected] contains the fix so use that or later

FYI to anyone who finds this, the action hasn't had any updates since after the add-path command was deprecated and disabled, so a workaround (for now at least) is to use the setup node action (it doesnt work without using this, i've tried), then running npm i -g pnpm@version

steps:
- name: Setup Node.js environment
  uses: actions/[email protected]
  with:
    node-version: "15"

- name: install pnpm
  run: npm i -g pnpm

@nickserv
Copy link

Once actions/setup-node#482 is merged, you can use corepack instead

@meadowsys
Copy link
Author

that would be nice, thanks for the heads up!

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

4 participants