@vvansh739/weather-package
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -1,11 +0,5 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getWeather = getWeather; | ||
const axios_1 = __importDefault(require("axios")); | ||
const dotenv_1 = __importDefault(require("dotenv")); | ||
import axios from 'axios'; | ||
import dotenv from 'dotenv'; | ||
// Load environment variables from .env file | ||
dotenv_1.default.config(); | ||
dotenv.config(); | ||
const API_KEY = process.env.API_KEY; | ||
@@ -16,5 +10,5 @@ const BASE_URL = 'https://api.openweathermap.org/data/2.5/weather'; | ||
} | ||
async function getWeather(city) { | ||
export async function getWeather(city) { | ||
try { | ||
const response = await axios_1.default.get(BASE_URL, { | ||
const response = await axios.get(BASE_URL, { | ||
params: { | ||
@@ -21,0 +15,0 @@ q: city, |
{ | ||
"name": "@vvansh739/weather-package", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A simple module to fetch and display current weather information", | ||
@@ -22,3 +22,2 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@vvansh739/weather-package": "^1.0.4", | ||
"axios": "^1.7.2", | ||
@@ -25,0 +24,0 @@ "dotenv": "^16.4.5" |
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"module": "CommonJS", | ||
"module": "ES2020", | ||
"moduleResolution": "node", | ||
"outDir": "./dist", | ||
@@ -9,7 +10,7 @@ "rootDir": "./src", | ||
"esModuleInterop": true, | ||
"skipLibCheck": true | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules"], | ||
"declaration":true | ||
"exclude": ["node_modules", "**/*.spec.ts"] | ||
} |
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
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
2
2246
49
- Removed@vvansh739/weather-package@^1.0.4