From b346406f3aa407869a3c868fb14322fc529673a3 Mon Sep 17 00:00:00 2001 From: Derick Montague Date: Thu, 26 Mar 2020 16:04:24 -0500 Subject: 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 Change-Id: I564527c4d9a3946f4c7f08338f1d7ec111d9eb20 --- package.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 4e23a0ff..83a591eb 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" -- cgit v1.2.3