From e6ccd3579b814306618a94a2db41be7ecaeb3867 Mon Sep 17 00:00:00 2001 From: PKulkoRaccoonGang Date: Mon, 30 Oct 2023 17:14:22 +0200 Subject: [PATCH] refactor: refactoring after review --- component-generator/utils.js | 1 - package-lock.json | 5 +++-- package.json | 2 +- utils.js | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/component-generator/utils.js b/component-generator/utils.js index c06bbd6ced..f742c3bff5 100644 --- a/component-generator/utils.js +++ b/component-generator/utils.js @@ -1,7 +1,6 @@ const { InvalidOptionArgumentError } = require('commander'); const fs = require('fs'); const path = require('path'); -const axios = require('axios'); const { exec } = require('child_process'); require('dotenv').config(); diff --git a/package-lock.json b/package-lock.json index 11ae322957..db03eb5a55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ ], "dependencies": { "@popperjs/core": "^2.11.4", + "axios": "^0.27.2", "bootstrap": "^4.6.2", "chalk": "^4.1.2", "child_process": "^1.0.2", @@ -86,7 +87,6 @@ "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.22.0", "@typescript-eslint/parser": "^5.22.0", - "axios": "^0.27.2", "axios-mock-adapter": "^1.21.1", "babel-jest": "^28.1.2", "babel-loader": "^8.2.4", @@ -9639,7 +9639,8 @@ }, "node_modules/axios": { "version": "0.27.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dependencies": { "follow-redirects": "^1.14.9", "form-data": "^4.0.0" diff --git a/package.json b/package.json index 2e13950768..80cc9590a0 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ }, "dependencies": { "@popperjs/core": "^2.11.4", + "axios": "^0.27.2", "bootstrap": "^4.6.2", "chalk": "^4.1.2", "child_process": "^1.0.2", @@ -125,7 +126,6 @@ "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.22.0", "@typescript-eslint/parser": "^5.22.0", - "axios": "^0.27.2", "axios-mock-adapter": "^1.21.1", "babel-jest": "^28.1.2", "babel-loader": "^8.2.4", diff --git a/utils.js b/utils.js index e36e96b2dd..4481b11112 100644 --- a/utils.js +++ b/utils.js @@ -3,6 +3,7 @@ const axios = require('axios'); /** * Sends request to the Netlify function to inform about specified event. * @param {string} eventName - tracking event name + * @param {string} trackFunctionName - tracking function name */ function sendTrackInfo(eventName, trackFunctionName) { const { BASE_URL, TRACK_ANONYMOUS_ANALYTICS } = process.env;