andresz1 / size-limit-action

Compare the real cost to run your JS app or lib to keep good performance in every pull request
ISC License
449 stars 83 forks source link

FEAT option to include install flags #82

Open Soviut opened 2 years ago

Soviut commented 2 years ago

NPM 8 throws an error on peer dependency mismatches. I have an intentional mismatch that I need to ignore with the --legacy-peer-deps install flag.

It would be great if there was an option to pass install flags to the install step.

- uses: andresz1/size-limit-action@v1
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    install_flags: '--legacy-peer-deps'

Right now, I'm trying to use skip_step: install so that I can manually install, but I'm having issues with that approach https://github.com/andresz1/size-limit-action/issues/81

It seems like it would only be a matter of splitting and passing the flags as the second argument array to exec on this line. https://github.com/andresz1/size-limit-action/blob/87e49194c9020051b41ac87ea73289e2ae73b0a0/src/Term.ts#L36

I might try to make a PR to help out.

stazcp commented 1 year ago

did anyone create a PR for install_flags? skip: install also not working for me