-
-
Notifications
You must be signed in to change notification settings - Fork 235
Closed
Description
The browser compatibility claimed by this package is only due to bundlers’ polyfills, which are increasingly missing:
- Can't using in Vite2 #257
- No polyfills for node modules http and https with Webpack 5 (via CRA 5) #254
- Remove import of inspect from utils JS-DevTools/ono#17
- Error: Uncaught (in promise): ReferenceError: process is not defined #137
- [Build] Don't work production build with @apidevtools/json-schema-ref-parser, but development mode it's work #267
json-schema-ref-parser/lib/util/url.js
Lines 25 to 26 in 5d7f895
exports.parse = require("url").parse; exports.resolve = require("url").resolve; let isWindows = /^win/.test(process.platform),
http
and https
can be replaced by fetch
, which is available in Node 18 and can already be used everywhere with https://github.com/matthew-andrews/isomorphic-fetch. I think this would also avoid Buffer
issues
URLs can be parsed with the URL
constructor, available globally in Node 10.
They can all be replaced by their modern and cross-platform equivalents or they can use something like globalThis.process?.platform
to ensure that they don't immediately fail when missing.
wparad, m-mohr, KevinRatdal, Lazyuki and thienandangthanh
Metadata
Metadata
Assignees
Labels
No labels