algolia / youtube-captions-scraper

Fetch youtube user submitted or fallback to auto-generated captions
249 stars 67 forks source link

chore: bump axios from 0.17.1 to 1.6.7 #29

Closed dfdeagle47 closed 6 months ago

dfdeagle47 commented 6 months ago

Checks

Context

As explained in the GitHub issue, the axios package has a number of CVEs, the latest of which is fixed in versions > 1.6.0.

Description

This PR updates the axios package to the latest version (1.6.7) to address the open CVEs.

The use of axios in this library is fairly basic, it only uses axios.get here. I checked the following documentation:

I did not detect a breaking change that would affect the use of axios here:

Testing notes

I ran the test using npm run test and they still work fine:

> npm run test

> youtube-captions-scraper@2.0.2 test
> ava

  2 passed

I also built the package locally (npm run build), and used the output to run the following script:

const { getSubtitles } = require('./dist/index');

async function main() {
  const subtitles = await getSubtitles({ videoID: 'dQw4w9WgXcQ' });

  console.log(subtitles);
}

main();

and the result is as expected:

image

Misc

Some dependencies in yarn.lock file are also updated, mostly because they're sub-dependencies of axios.