preactjs / compressed-size-action

GitHub Action that adds compressed size changes to your PRs.
https://github.com/marketplace/actions/compressed-size-action
MIT License
602 stars 84 forks source link

[feature] Add install script inputs #85

Closed jeffreys-cat closed 7 months ago

jeffreys-cat commented 2 years ago

We install dependencies with NPM install, Action's installScript npm ci needs a package-lock.json file, otherwise will throw an error. But in some cases, the library use optionalDependencies, package-lock.json is different on different platforms.

For example, vercel's turborepo,I run npm install on my MAC and create a package-lock.json, but only turbo-darwin-arm64 exist in package-lock.json, while pushed it to GitHub and run this Action, because turbo-linux-64 needs on Linux. Then I got an error. I need to use a custom install method npm install --no-package-lock to make it works.

I would like to add an installScript to support custom installation scripts like buildScript.

nicklmart commented 1 year ago

also have a need for this, would like to run npm ci --ignore-scripts instead of npm ci

Is this a suitable solution @developit?