New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webidl upgrade broke API in 8.2.0 #166
Comments
Can you test using jsdom 16.4.0? |
That does work. But:
|
|
I don't pull in whatwg-url directly, I'm pulling it whatever jsdom says is compatible. jsdom 16.2.2 requires [8.x,9.x). Personally not a huge deal for me to upgrade but does seem like an API break. |
Right, but, how did you manage to pull in an outdated version of jsdom? I'll keep an eye on this; if more people report an issue then I'll release another patch version. |
What tool automatically pulls in the latest jsdom? My toolchain required a version. |
Well, all dependents of jsdom I know of use |
I faced an issue with the recent upgrade of webidl-conversions": "^6.1.0 (whatwg-url 8.20 and 8.2.1) This package explicitly use SharedArrayBuffer :
As a whatwg-url user I browserify/babel a library who uses whatwg-url and as a consequence the webidl-conversions lib/index.js is injected in the browserify/babel processed result. With Firefox 79 and Firefox 80 the SharedArrayBuffer is not defined by default causing a crash. However in my context (IPFS) I don't have any control over the public gateway servers http headers. This code should probably be revisited to detect whether or not the SharedArrayBuffer is available. Let me know a more appropriate place to report this issue. Thanks. |
whatwg-url is only supported on Node.js. |
+exports.install = (globalObject, globalNames) => {
+ if (!globalNames.some(globalName => exposed.has(globalName))) {
+ return;
+ }
// jsdom@16.3.0 lib/jsdom/living/interfaces.js
-exports.installInterfaces = window => {
+exports.installInterfaces = (window, globalNames) => {
// Install generated interface.
for (const generatedInterface of Object.values(generatedInterfaces)) {
- generatedInterface.install(window);
+ generatedInterface.install(window, globalNames);
} For me, this error was fixed updating to |
The problem was a newer version of whatwg-url which attempted to use `globalNames.some` where `globalNames` was undefined (jsdom/whatwg-url#166). Downgrading whatwg-url manually to 8.0.0 (in package-lock.json) fixed the problem.
The problem was a newer version of whatwg-url which attempted to use `globalNames.some` where `globalNames` was undefined (jsdom/whatwg-url#166). Downgrading whatwg-url manually to 8.0.0 (in package-lock.json) fixed the problem.
The problem was a newer version of whatwg-url which attempted to use `globalNames.some` where `globalNames` was undefined (jsdom/whatwg-url#166). Downgrading whatwg-url manually to 8.0.0 (in package-lock.json) fixed the problem.
I'm not at all a JS expert but after getting silently upgraded to 8.2.0 I'm seeing the following error in my build:
Failing at this section of code:
This is using jsdom 16.1.2. Best I can tell this was probably caused by the upgrade to webidl-conversions:
The text was updated successfully, but these errors were encountered: