2
{
  "name": "my-library",
  "devDependencies": {
    "3d-party": "^4.0.0"
  }
}

Imagine that my-library should support 3.x and 4.x version of 3d-party package. my-library is well tested.

Is there something that I can run locally, like Travis CI, that:

  • Run npm install, requiring a specific version at time (3.x and 4.x)
  • Run my test to ensure that my-library works with both version
gremo
  • 47,186
  • 75
  • 257
  • 421

1 Answers1

0

youd have to dupe the package.json and change the 3rd-party version to a specific version - then run npm install

make sure to remove the ^ as that signifies - get latest version

so you should do "3d-party": "3.5.5"

to automate this you can use gulp and create a project folder for each 3rd party dep with its own specific package.json

then you write a gulp build that dupes your source into each folder and runs npm install

you can then run each version and see if it crashes :)

Dan
  • 3,755
  • 4
  • 27
  • 38