Skip to content

[BUG] Running npm install updates package.json timestamp #2714

Closed
@coreyfarrell

Description

@coreyfarrell

Current Behavior:

Running npm install with no arguments causes the timestamp of package.json to be touched.

Expected Behavior:

package.json should not be written.

Steps To Reproduce:

  1. Enter a directory with a valid package.json, observe the timestamp.
  2. Run npm install
  3. See that the package.json timestamp is updated.
  4. Wait a minute and repeat step 2-3, you see will se timestamp update again.

Environment:

  • OS: Fedora 32
  • Node: 15.8.0
  • npm: 7.5.4

Additional comment

This creates problems/annoyances for other programs that are watching for file updates. In my case running npm install causes my text editor to ask if I want to reload the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions