ava dependencies missing from package-lock.json after upgrading it

225 Views Asked by At

I have just upgraded ava in one of my projects using npm install --save-dev [email protected].

To my surprise, all its dependencies are now missing from package-lock.json:

Added:

+      "version": "0.22.0",
 +      "resolved": "https://registry.npmjs.org/ava/-/ava-0.22.0.tgz",
 +      "integrity": "sha512-dYxvVDL9CeIcgaQ/FojaBVaL/rnIsXdgPVliDOMe1O5nSsIZEsPYDIzmZ1KnO/cuxeQx1PQbtW6qziiEwQZusg==",
 +      "dev": true

Removed:

-      "requires": {
 -        "@ava/babel-preset-stage-4": "1.1.0",
 -        "@ava/babel-preset-transform-test-files": "3.0.0",
 -        "@ava/write-file-atomic": "2.2.0",
 -        "@concordance/react": "1.0.0",
 -        "ansi-escapes": "2.0.0",
 -        "ansi-styles": "3.2.0",
 -        "arr-flatten": "1.1.0",
 -        "array-union": "1.0.2",
 -        "array-uniq": "1.0.3",
 ...

Other than that, my code and tests run as expected.

Why were all the dependencies removed from the package-lock.json file?

1

There are 1 best solutions below

0
On BEST ANSWER

Make sure you're consistently using the same version of npm across your team. The latest (5.4.2 at time of writing) has many fixes related to the package-lock.json file, compared to earlier releases.