Skip to content

Remove usage of deprecated npm install option --ignore-prepublish #3517

@ojob

Description

@ojob

search you tried in the issue tracker

ignore-prepublish, npm

describe your actual problem

With #3516, I reported that pipelines we run in Gitlab-CI fail on an warning+error raised by npm at installation of markdownlint-cli by pre-commit.

Reading the execution log from related issue, it appears that:

  • npm raises a warning about the deprecated option --ignore-prepublish.

Analysis

The --ignore-prepublish option has been introduced by pre-commit 5 years ago.

However:

  • prepublish is marked as deprecated in NPM8 (but one can consider this has been the case for almost a decade).
  • currently, running installation of, say, markdownlint-cli raises the following warning in Gitlab-CI: Unknown cli config "--ignore-prepublish". This will stop working in the next major version of npm.

What is requested

In pre_commit/languages/node.py, the --ignore-prepublish option shall be either removed, or activable on a per-project basis if backward compatibility is somehow necessary (I know nothing about Node applications).

Some additional thoughts, here since I could find no other relevant place

I understand that non-actionable issues shall be closed. But closing #3516 without any way to improve/clarify the request or even only to comment is rude, considering preparation of such an issue takes time and tries to bring value to this project. Please consider allowing some delay before disallowing comments.

pre-commit --version

4.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions