Socket
Socket
Sign inDemoInstall

@nestia/fetcher

Package Overview
Dependencies
Maintainers
0
Versions
402
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestia/fetcher - npm Package Compare versions

Comparing version 3.2.5 to 3.2.6-dev.20240624

22

lib/internal/FetcherBase.js

@@ -290,10 +290,2 @@ "use strict";

var polyfill = new Singleton_1.Singleton(function () { return __awaiter(void 0, void 0, void 0, function () {
function is_node_process(m) {
return (m !== null &&
typeof m.process === "object" &&
m.process !== null &&
typeof m.process.versions === "object" &&
m.process.versions !== null &&
typeof m.process.versions.node !== "undefined");
}
var m, _a, _b;

@@ -304,4 +296,13 @@ var _c;

case 0:
if (!(typeof global === "object" && is_node_process(global))) return [3 /*break*/, 4];
m = global;
m = (function () {
if (typeof globalThis === "object")
return globalThis;
else if (typeof global === "object")
return global;
else if (typeof window === "object")
return window;
else if (typeof self === "object")
return self;
throw new Error("Unknown platform. No global object found.");
})();
if (!((_c = m.fetch) !== null && _c !== void 0)) return [3 /*break*/, 1];

@@ -319,3 +320,2 @@ _a = _c;

return [2 /*return*/, m.fetch];
case 4: return [2 /*return*/, self.fetch];
}

@@ -322,0 +322,0 @@ });

{
"name": "@nestia/fetcher",
"version": "3.2.5",
"version": "3.2.6-dev.20240624",
"description": "Fetcher library of Nestia SDK",

@@ -33,3 +33,3 @@ "main": "lib/index.js",

"rimraf": "^3.0.2",
"typescript": "5.4.5"
"typescript": "<5.5.0"
},

@@ -36,0 +36,0 @@ "peerDependencies": {

@@ -200,18 +200,11 @@ import import2 from "import2";

const polyfill = new Singleton(async (): Promise<typeof fetch> => {
function is_node_process(m: typeof global | null): boolean {
return (
m !== null &&
typeof m.process === "object" &&
m.process !== null &&
typeof m.process.versions === "object" &&
m.process.versions !== null &&
typeof m.process.versions.node !== "undefined"
);
}
if (typeof global === "object" && is_node_process(global)) {
const m: any = global as any;
m.fetch ??= ((await import2("node-fetch")) as any).default;
return (m as any).fetch;
}
return self.fetch;
const m: typeof globalThis | null = (() => {
if (typeof globalThis === "object") return globalThis;
else if (typeof global === "object") return global;
else if (typeof window === "object") return window;
else if (typeof self === "object") return self;
throw new Error("Unknown platform. No global object found.");
})();
m.fetch ??= ((await import2("node-fetch")) as any).default;
return m.fetch;
});

@@ -218,0 +211,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc