Skip to content

Commit

Permalink
retry using dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
sofisl committed Dec 12, 2024
1 parent f07c571 commit a1b539e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion gax/esm/src/fallbackServiceStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/* global window */
/* global AbortController */

import {getNodeFetch} from './importNodeFetchDynamically.js';
import {Response as NodeFetchResponse} from 'node-fetch';
import {AbortController as NodeAbortController} from 'abort-controller';

Expand All @@ -42,6 +41,9 @@ export interface FallbackServiceStub {

export type FetchParametersMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';

async function getNodeFetch() {
return await import('node-fetch');
}
export interface FetchParameters {
headers: {[key: string]: string};
body: Buffer | Uint8Array | string;
Expand Down
4 changes: 0 additions & 4 deletions gax/esm/src/importNodeFetchDynamically.ts

This file was deleted.

0 comments on commit a1b539e

Please sign in to comment.