markdownlint-cli2: v0.9.0: shinkwrap causes all dev dependencies to be installed

When I run npm install markdownlint-cli2@0.8.1, I get markdownlint-cli2 and all its dependencies.

When I run npm install markdownlint-cli2@0.9.0, I get this and all of the dev dependencies.

I don’t recommend using a shrinkwrap, but if you must, you will want to run npm prune --production before generating it.

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 2
  • Comments: 24 (23 by maintainers)

Commits related to this issue

Most upvoted comments

This should be fixed in v0.9.2; I deleted npm-shrinkwrap.json entirely. I could not find a way to use it without cross-platform problems.

v0.9.0:

@DavidAnson ➜ /workspaces/markdownlint-cli2 (main) $ npm install markdownlint-cli2@0.9.0
npm WARN deprecated date-format@0.0.2: 0.x is no longer supported. Please upgrade to 4.x or higher.

added 442 packages in 4s

9 packages are looking for funding
  run `npm fund` for details
@DavidAnson ➜ /workspaces/markdownlint-cli2 (main) $ npm clean-install
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin"} (current: {"os":"linux"})
npm ERR! notsup Valid os:  darwin
npm ERR! notsup Actual os: linux

npm ERR! A complete log of this run can be found in: /home/codespace/.npm/_logs/2023-08-26T04_22_27_378Z-debug-0.log
@DavidAnson ➜ /workspaces/markdownlint-cli2 (main) $

v0.9.2:

@DavidAnson ➜ /workspaces/markdownlint-cli2 (main) $ npm install markdownlint-cli2@0.9.2

added 35 packages in 2s

7 packages are looking for funding
  run `npm fund` for details
@DavidAnson ➜ /workspaces/markdownlint-cli2 (main) $ npm clean-install

added 35 packages, and audited 36 packages in 1s

7 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
@DavidAnson ➜ /workspaces/markdownlint-cli2 (main) $

FWIW this is exactly how to reproduce the problem:

# updates package-lock.json, but does not install fsevents because it's optional
$ npm install markdownlint-cli2@0.9.0
# clean install using package-lock.json as source of truth
$ npm ci
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin"} (current: {"os":"linux"})
...