diff --git a/package.json b/package.json index b8030012..81890e54 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "bundlesize": [ { "path": "./packages/client/dist/xmpp.min.js", - "maxSize": "16 KB" + "maxSize": "17 KB" } ], "lint-staged": { diff --git a/packages/resolve/example.js b/packages/resolve/example.js index 2b8e98e5..c5b6efa3 100644 --- a/packages/resolve/example.js +++ b/packages/resolve/example.js @@ -1,5 +1,3 @@ import { resolve } from "@xmpp/resolve"; -// For you -// import { resolve } from "@xmpp/resolve"; resolve("jabberfr.org").then(console.log).catch(console.error); diff --git a/packages/resolve/lib/http.js b/packages/resolve/lib/http.js index 065057e7..03b8b3a3 100644 --- a/packages/resolve/lib/http.js +++ b/packages/resolve/lib/http.js @@ -1,11 +1,14 @@ -// eslint-disable-next-line n/no-unsupported-features/node-builtins -const fetch = globalThis.fetch || import("node-fetch"); + +// FIXME +// const fetch = globalThis.fetch || import("node-fetch"); import parse from "@xmpp/xml/lib/parse.js"; import { compare as compareAltConnections } from "./alt-connections.js"; export function resolve(domain) { - return fetch(`https://${domain}/.well-known/host-meta`) + // eslint-disable-next-line n/no-unsupported-features/node-builtins + return globalThis + .fetch(`https://${domain}/.well-known/host-meta`) .then((res) => res.text()) .then((res) => { return parse(res)