Some updates to a dependency of one of our dependencies broke our build and was a bit tricky to find out what the cause of the issue was...
We finally noticed that @vue/component-compiler-utils
requires "prettier": "^1.11.1"
and - as discussed in vue webpack template missing parser that Prettier@1.13.0
causes the issue we were having, before rolling back to Prettier@1.12.0
How do we ensure that package-lock.json
"locks" dependencies to a version and do not update over time or when re-installed?
This is an example of our package.json
from which the incorrect lock file is generated:
{
...
"dependencies": {
"html-loader": "0.5.1",
"vue": "2.5.16",
"vue-class-component": "6.2.0",
"vue-property-decorator": "6.1.0",
"vue-router": "3.0.1",
"vuex": "3.0.1",
"vuex-class": "0.3.0",
...
},
"devDependencies": {
"@types/jest": "22.0.1",
"@vue/cli-plugin-babel": "3.0.0-beta.11",
"@vue/cli-plugin-eslint": "3.0.0-beta.11",
"@vue/cli-plugin-typescript": "3.0.0-beta.11",
"@vue/cli-plugin-unit-jest": "3.0.0-beta.7",
"@vue/cli-service": "3.0.0-beta.11",
"@vue/eslint-config-airbnb": "3.0.0-beta.11",
"@vue/eslint-config-typescript": "3.0.0-beta.11",
...
}
}