Add engines object to package.json
- Add node-check-version to be called on serve and build scripts to
warn user that the correct version of node is not running
- Run npm audit fix to resolve 1532 vulnerabilities
- Add .npmrc file that will adds new npm packages as the exact version.
This settings assures that the ^ is not used when adding the package to
the packacge.json file.
This is to assure that we are running the correct version of node
that will not update the package-lock.json file when installing new
packages. We are using lts/erbium version of node that is 12.16.1
allowing any patch version beyond .1.
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I564527c4d9a3946f4c7f08338f1d7ec111d9eb20
diff --git a/package.json b/package.json
index 4e23a0f..83a591e 100644
--- a/package.json
+++ b/package.json
@@ -3,9 +3,12 @@
"version": "0.1.0",
"private": true,
"description": "OpenBMC Web UI using the Vue.js front-end framework",
+ "engines": {
+ "node": "12.16.x"
+ },
"scripts": {
- "serve": "vue-cli-service serve",
- "build": "vue-cli-service build",
+ "serve": "check-node-version --package && vue-cli-service serve",
+ "build": "check-node-version --package && vue-cli-service build",
"test:unit": "vue-cli-service test:unit --require tests/setup.js",
"lint": "vue-cli-service lint",
"docs:build": "vuepress build docs",
@@ -18,12 +21,12 @@
"bootstrap": "4.3.1",
"bootstrap-vue": "2.5.0",
"core-js": "3.3.2",
- "js-cookie": "^2.2.1",
+ "js-cookie": "2.2.1",
"lodash": "4.17.15",
"vue": "2.6.11",
"vue-i18n": "8.15.3",
"vue-router": "3.1.3",
- "vuelidate": "^0.7.4",
+ "vuelidate": "0.7.5",
"vuex": "3.0.1"
},
"devDependencies": {
@@ -38,6 +41,7 @@
"@vue/test-utils": "1.0.0-beta.31",
"babel-eslint": "10.0.3",
"chai": "4.1.2",
+ "check-node-version": "4.0.2",
"compression-webpack-plugin": "3.0.1",
"eslint": "5.16.0",
"eslint-plugin-prettier": "3.1.1",
@@ -53,7 +57,7 @@
"sinon-chai": "3.5.0",
"vue-cli-plugin-i18n": "0.6.1",
"vue-template-compiler": "2.6.11",
- "vuepress": "^1.2.0"
+ "vuepress": "1.4.0"
},
"gitHooks": {
"pre-commit": "lint-staged"