@mdx-js/esbuild
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -16,3 +16,2 @@ /** | ||
import {URL} from 'url' | ||
import assert from 'node:assert' | ||
@@ -22,3 +21,3 @@ import {promises as fs} from 'node:fs' | ||
import process from 'node:process' | ||
import got from 'got' | ||
import fetch from 'node-fetch' | ||
import {VFile} from 'vfile' | ||
@@ -103,4 +102,14 @@ import {createFormatAwareProcessors} from '@mdx-js/mdx/lib/util/create-format-aware-processors.js' | ||
console.log('%s: downloading `%s`', remoteNamespace, href) | ||
const contents = (await got(href, {cache})).body | ||
/** @type {string} */ | ||
let contents | ||
const cachedContents = cache.get(href) | ||
if (cachedContents) { | ||
contents = cachedContents | ||
} else { | ||
contents = await (await fetch(href)).text() | ||
cache.set(href, contents) | ||
} | ||
return filter.test(href) | ||
@@ -107,0 +116,0 @@ ? onload({ |
{ | ||
"name": "@mdx-js/esbuild", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "esbuild plugin for MDX", | ||
@@ -42,3 +42,3 @@ "license": "MIT", | ||
"@mdx-js/mdx": "^2.0.0", | ||
"got": "^11.0.0", | ||
"node-fetch": "^3.0.0", | ||
"vfile": "^5.0.0" | ||
@@ -45,0 +45,0 @@ }, |
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 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
16437
235
1
+ Addednode-fetch@^3.0.0
+ Addeddata-uri-to-buffer@4.0.1(transitive)
+ Addedfetch-blob@3.2.0(transitive)
+ Addedformdata-polyfill@4.0.10(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@3.3.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)
- Removedgot@^11.0.0
- Removed@sindresorhus/is@4.6.0(transitive)
- Removed@szmarczak/http-timer@4.0.6(transitive)
- Removed@types/cacheable-request@6.0.3(transitive)
- Removed@types/http-cache-semantics@4.0.4(transitive)
- Removed@types/keyv@3.1.4(transitive)
- Removed@types/node@22.10.2(transitive)
- Removed@types/responselike@1.0.3(transitive)
- Removedcacheable-lookup@5.0.4(transitive)
- Removedcacheable-request@7.0.4(transitive)
- Removedclone-response@1.0.3(transitive)
- Removeddecompress-response@6.0.0(transitive)
- Removeddefer-to-connect@2.0.1(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedget-stream@5.2.0(transitive)
- Removedgot@11.8.6(transitive)
- Removedhttp-cache-semantics@4.1.1(transitive)
- Removedhttp2-wrapper@1.0.3(transitive)
- Removedjson-buffer@3.0.1(transitive)
- Removedkeyv@4.5.4(transitive)
- Removedlowercase-keys@2.0.0(transitive)
- Removedmimic-response@1.0.13.1.0(transitive)
- Removednormalize-url@6.1.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-cancelable@2.1.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedquick-lru@5.1.1(transitive)
- Removedresolve-alpn@1.2.1(transitive)
- Removedresponselike@2.0.1(transitive)
- Removedundici-types@6.20.0(transitive)
- Removedwrappy@1.0.2(transitive)