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

Give support to pnpm workspace #37

Open
smoglica opened this issue Mar 27, 2024 · 4 comments · Fixed by #39 · May be fixed by #42
Open

Give support to pnpm workspace #37

smoglica opened this issue Mar 27, 2024 · 4 comments · Fixed by #39 · May be fixed by #42

Comments

@smoglica
Copy link

smoglica commented Mar 27, 2024

I'm having this issue in my github action.

image

My repo is a monorepo handled with pnpm workspace. In the root package.json file I have some package referencies like:

{
  "devDependencies": {
    "@package-a": "workspace:*",
    "@package-b": "workspace:*",
    "@package-c": "workspace:*"
  }
}

For fixing this, probably should be enough to detect which package manager the repo is using and use the correct CLI command.

@charlespwd
Copy link
Contributor

👋 I think this is fair, but I don't have the time to look at this right now (juggling with too many things).

If this can't wait, it should be rather easy to add to https://github.com/Shopify/theme-check-action/blob/main/src/steps/installCli.ts#L6-L22

A PR would be absolutely welcome!

@charlespwd
Copy link
Contributor

Pushed to v2.1.0, v2.1, and v1

@charlespwd
Copy link
Contributor

Had to revert #39 because of an issue with pnpm now being required if there's a pnpm lock file. Which forces folks to do setup-node with pnpm, and then there was another problem.

@charlespwd charlespwd reopened this Apr 4, 2024
@charlespwd
Copy link
Contributor

Following up on the comment in #39: I'm not sure I'd like a major bump for this. Ideally we want low friction and toil and asking for folks to upgrade is a lot of friction. The goal is to be almost invisible. Set it, forget it and let it do its job.

Given how we had to revert because it used to work and now no longer does. I feel like we could fallback to npm when pnpm is not available. We might be really close to have what we need.

  • use detect logic to figure out what is being used by the repo
  • make sure the one detected is available
    • fallback to npm when it isn't
  • figure out why pnpm doesn't like --no-lockfile (or figure out the proper flag that lets you install without lockfile changes)
  • consider making a global install (?)

@andershagbard andershagbard linked a pull request Apr 29, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants