Skip to content

v4.0.0

Compare
Choose a tag to compare
@vladfrangu vladfrangu released this 07 Nov 16:39
· 13 commits to master since this release
6949b99

The module is now ESM only

This means you have to import it by using an import expression, or the import() method. You can do so by either migrating your project to ESM, or importing got-scraping in an async context

-const { gotScraping } = require('got-scraping');
+import { gotScraping } from 'got-scraping';

If you cannot migrate to ESM, here's an example of how to import it in an async context:

let gotScraping;

async function fetchWithGotScraping(url) {
    gotScraping ??= (await import('got-scraping')).gotScraping;

    return gotScraping.get(url);
}

What's Changed

  • feat: add export of hooks and TransformHeadersAgent by @foxt451 in #102
  • feat: ESM migration of got-scraping by @vladfrangu in #109
  • feat: add Cloudflare blocking benchmarking by @barjin in #114

New Contributors

Full Changelog: v3.2.15...v4.0.0