openweather-api-node
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -21,3 +21,3 @@ "use strict"; | ||
exports.OpenWeatherAPI = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
const request_1 = require("./request"); | ||
const current_parser_1 = __importDefault(require("./parsers/weather/current-parser")); | ||
@@ -492,9 +492,3 @@ const forecast_parser_1 = __importDefault(require("./parsers/weather/forecast-parser")); | ||
async fetch(url) { | ||
let res; | ||
try { | ||
res = await axios_1.default.get(url); | ||
} | ||
catch (err) { | ||
res = err.response; | ||
} | ||
const res = await (0, request_1.get)(url); | ||
const data = res.data; | ||
@@ -501,0 +495,0 @@ if (data.cod && parseInt(data.cod) !== 200) { |
{ | ||
"name": "openweather-api-node", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Simple Node.js package that makes it easy to work with OpenWeather API", | ||
@@ -31,5 +31,2 @@ "main": "dist/index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"axios": "^0.21.4" | ||
}, | ||
"devDependencies": { | ||
@@ -36,0 +33,0 @@ "@types/jest": "^29.2.4", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86833
0
58
2335
2
- Removedaxios@^0.21.4
- Removedaxios@0.21.4(transitive)
- Removedfollow-redirects@1.15.9(transitive)