cenfun / monocart-coverage-reports

A code coverage tool to generate native V8 reports or Istanbul reports.
MIT License
31 stars 5 forks source link

[FR] check in npm lockfile for contributors to assure versions are identical when contributing #43

Closed Aghassi closed 2 months ago

Aghassi commented 2 months ago

Currently there is no lockfile and it is ignored https://github.com/cenfun/monocart-coverage-reports/blob/main/.gitignore#L4

This practice makes contributing difficult and non deterministic because with ^ ranges I'm not guaranteed the same version as other authors when developing.

cenfun commented 2 months ago

I tring to add lockfile but it does not work

monocart-coverage-reports/node_modules/rollup/dist/native.js:59
        throw new Error(
              ^

Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.

see issue https://github.com/npm/cli/issues/4828 see run https://github.com/cenfun/monocart-coverage-reports/actions/runs/9605411161 so just ignore lockfile for now.

jakebailey commented 2 months ago

You could of course not use npm, but a workaround for this is to ensure that you've deleted all node_modules before generating the lockfile, which should end up with a complete set in my experience.

cenfun commented 2 months ago

it should be fixed after removing both package-lock.json and node_modules directory then run npm i again