@ai-sdk/provider-utils 4.0.41 → 4.0.42

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.42
4
+
5
+ ### Patch Changes
6
+
7
+ - ee2bf30: fix(provider-utils): prevent Metro from parsing the Node 18 dynamic import fallback
8
+
3
9
  ## 4.0.41
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -579,8 +579,10 @@ async function loadNodeModule(id) {
579
579
  const builtinModule = (_a2 = processWithBuiltins == null ? void 0 : processWithBuiltins.getBuiltinModule) == null ? void 0 : _a2.call(processWithBuiltins, id);
580
580
  return builtinModule == null ? await importNodeModule(id) : builtinModule;
581
581
  }
582
+ var dynamicImport;
582
583
  function importNodeModule(id) {
583
- return import(id);
584
+ dynamicImport != null ? dynamicImport : dynamicImport = Function("specifier", "return import(specifier)");
585
+ return dynamicImport(id);
584
586
  }
585
587
  function getCurrentModulePath() {
586
588
  const originalPrepareStackTrace = Error.prepareStackTrace;
@@ -891,7 +893,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
891
893
  }
892
894
 
893
895
  // src/version.ts
894
- var VERSION = true ? "4.0.41" : "0.0.0-test";
896
+ var VERSION = true ? "4.0.42" : "0.0.0-test";
895
897
 
896
898
  // src/get-from-api.ts
897
899
  var getOriginalFetch = () => globalThis.fetch;