Skip to content

Commit

Permalink
Merge pull request #15157 from Automattic/vkarpov15/remove-dev-deps
Browse files Browse the repository at this point in the history
refactor: remove dotenv and axios from dev dependencies
  • Loading branch information
vkarpov15 authored Jan 4, 2025
2 parents 35e3454 + bc61e3e commit bf0140a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@
"acquit-ignore": "0.2.1",
"acquit-require": "0.1.1",
"assert-browserify": "2.0.0",
"axios": "1.1.3",
"babel-loader": "8.2.5",
"broken-link-checker": "^0.7.8",
"buffer": "^5.6.0",
"cheerio": "1.0.0",
"crypto-browserify": "3.12.1",
"dotenv": "16.4.5",
"dox": "1.0.0",
"eslint": "8.57.0",
"eslint-plugin-markdown": "^5.0.0",
Expand Down
11 changes: 4 additions & 7 deletions scripts/loadSponsorData.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ try {
process.exit(-1);
}
}
const axios = require('axios');

const fs = require('fs');
const mongoose = require('../');

Expand Down Expand Up @@ -79,12 +79,9 @@ async function run() {
const jobs = await Job.find().select({ logo: 1, company: 1, title: 1, location: 1, description: 1, url: 1 });
fs.writeFileSync(`${docsDir}/data/jobs.json`, JSON.stringify(jobs, null, ' '));

const opencollectiveSponsors = await axios.get('https://opencollective.com/mongoose/members.json').
then(res => res.data).
then(sponsors => {
return sponsors.filter(result => result.tier == 'sponsor' && result.isActive);
}).
catch(() => null);
const opencollectiveSponsors = await fetch('https://opencollective.com/mongoose/members.json')
.then(res => res.json())
.then(res => res.filter(result => result.tier === 'sponsor' && result.isActive));

for (const sponsor of opencollectiveSponsors) {
const override = await OpenCollectiveSponsor.findOne({ openCollectiveId: sponsor['MemberId'] });
Expand Down

0 comments on commit bf0140a

Please sign in to comment.