diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad842bf5..20601901 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,5 +20,6 @@ jobs: with: node-version: '14' registry-url: https://registry.npmjs.org/ + - run: echo "Start" - run: npm i - run: npm run test-coverage diff --git a/src/index.js b/src/index.js index c7b51a5a..fffa1257 100644 --- a/src/index.js +++ b/src/index.js @@ -12,12 +12,12 @@ const contactCore = require('./core/contact'); const authCore = require('./core/auth'); const axios = require('axios'); const analytics = require('./lib/analytics'); -let package = null; +let packageJson = null; try { - package = require('./package.json'); + packageJson = require('./package.json'); } catch (e) { - package = require('../package.json'); + packageJson = require('../package.json'); } axios.defaults.headers.common['Unified-CRM-Extension-Version'] = packageJson.version; diff --git a/src/lib/analytics.js b/src/lib/analytics.js index 105da404..6c2a0013 100644 --- a/src/lib/analytics.js +++ b/src/lib/analytics.js @@ -1,14 +1,14 @@ const Mixpanel = require('mixpanel'); const parser = require('ua-parser-js'); -let package = null; +let packageJson = null; try { - package = require('../package.json'); + packageJson = require('../package.json'); } catch (e) { - package = require('../../package.json'); + packageJson = require('../../package.json'); } const appName = 'RingCentral CRM Extension'; -const version = package.version; +const version = packageJson.version; let mixpanel = null; exports.init = function init() {