@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.43
4
+
5
+ ### Patch Changes
6
+
7
+ - dab0a08: fix(provider-utils): drop Function-constructor dynamic import shim rejected by Next.js Edge Runtime builds
8
+
3
9
  ## 4.0.42
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -577,12 +577,10 @@ async function loadNodeModule(id) {
577
577
  var _a2;
578
578
  const processWithBuiltins = globalThis.process;
579
579
  const builtinModule = (_a2 = processWithBuiltins == null ? void 0 : processWithBuiltins.getBuiltinModule) == null ? void 0 : _a2.call(processWithBuiltins, id);
580
- return builtinModule == null ? await importNodeModule(id) : builtinModule;
581
- }
582
- var dynamicImport;
583
- function importNodeModule(id) {
584
- dynamicImport != null ? dynamicImport : dynamicImport = Function("specifier", "return import(specifier)");
585
- return dynamicImport(id);
580
+ if (builtinModule == null) {
581
+ throw new Error(`Node.js built-in module ${id} is unavailable`);
582
+ }
583
+ return builtinModule;
586
584
  }
587
585
  function getCurrentModulePath() {
588
586
  const originalPrepareStackTrace = Error.prepareStackTrace;
@@ -893,7 +891,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
893
891
  }
894
892
 
895
893
  // src/version.ts
896
- var VERSION = true ? "4.0.42" : "0.0.0-test";
894
+ var VERSION = true ? "4.0.43" : "0.0.0-test";
897
895
 
898
896
  // src/get-from-api.ts
899
897
  var getOriginalFetch = () => globalThis.fetch;