@ai-sdk/provider-utils 4.0.42 → 4.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -475,12 +475,10 @@ async function loadNodeModule(id) {
475
475
  var _a2;
476
476
  const processWithBuiltins = globalThis.process;
477
477
  const builtinModule = (_a2 = processWithBuiltins == null ? void 0 : processWithBuiltins.getBuiltinModule) == null ? void 0 : _a2.call(processWithBuiltins, id);
478
- return builtinModule == null ? await importNodeModule(id) : builtinModule;
479
- }
480
- var dynamicImport;
481
- function importNodeModule(id) {
482
- dynamicImport != null ? dynamicImport : dynamicImport = Function("specifier", "return import(specifier)");
483
- return dynamicImport(id);
478
+ if (builtinModule == null) {
479
+ throw new Error(`Node.js built-in module ${id} is unavailable`);
480
+ }
481
+ return builtinModule;
484
482
  }
485
483
  function getCurrentModulePath() {
486
484
  const originalPrepareStackTrace = Error.prepareStackTrace;
@@ -791,7 +789,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
791
789
  }
792
790
 
793
791
  // src/version.ts
794
- var VERSION = true ? "4.0.42" : "0.0.0-test";
792
+ var VERSION = true ? "4.0.43" : "0.0.0-test";
795
793
 
796
794
  // src/get-from-api.ts
797
795
  var getOriginalFetch = () => globalThis.fetch;