json-machete 0.10.1-alpha-19d4e9f08.0 → 0.10.2

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.
Files changed (3) hide show
  1. package/index.js +6 -6
  2. package/index.mjs +1 -1
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -8,7 +8,7 @@ const crossHelpers = require('@graphql-mesh/cross-helpers');
8
8
  const utils = require('@graphql-tools/utils');
9
9
  const JsonPointer = _interopDefault(require('json-pointer'));
10
10
  const urlJoin = _interopDefault(require('url-join'));
11
- const crossUndiciFetch = require('cross-undici-fetch');
11
+ const fetch = require('@whatwg-node/fetch');
12
12
  const utils$1 = require('@graphql-mesh/utils');
13
13
  const toJsonSchema = _interopDefault(require('to-json-schema'));
14
14
 
@@ -273,7 +273,7 @@ function getCwd(path) {
273
273
  return isURL(path) ? getCwdForUrl(path) : crossHelpers.path.dirname(path);
274
274
  }
275
275
  // eslint-disable-next-line @typescript-eslint/ban-types
276
- async function dereferenceObject(obj, { cwd = crossHelpers.process.cwd(), externalFileCache = new Map(), refMap = new Map(), root = obj, fetchFn: fetch = crossUndiciFetch.fetch, importFn = utils$1.defaultImportFn, logger = new utils$1.DefaultLogger('dereferenceObject'), headers, } = {}) {
276
+ async function dereferenceObject(obj, { cwd = crossHelpers.process.cwd(), externalFileCache = new Map(), refMap = new Map(), root = obj, fetchFn: fetch$1 = fetch.fetch, importFn = utils$1.defaultImportFn, logger = new utils$1.DefaultLogger('dereferenceObject'), headers, } = {}) {
277
277
  var _a;
278
278
  if (obj != null && typeof obj === 'object') {
279
279
  if (isRefObject(obj)) {
@@ -292,7 +292,7 @@ async function dereferenceObject(obj, { cwd = crossHelpers.process.cwd(), extern
292
292
  let externalFile = externalFileCache.get(externalFilePath);
293
293
  if (!externalFile) {
294
294
  externalFile = await utils$1.readFileOrUrl(externalFilePath, {
295
- fetch,
295
+ fetch: fetch$1,
296
296
  headers,
297
297
  cwd,
298
298
  importFn,
@@ -349,7 +349,7 @@ async function dereferenceObject(obj, { cwd = crossHelpers.process.cwd(), extern
349
349
  throw new Error('Not implemented ' + key.toString());
350
350
  },
351
351
  }),
352
- fetchFn: fetch,
352
+ fetchFn: fetch$1,
353
353
  importFn,
354
354
  logger,
355
355
  headers,
@@ -377,7 +377,7 @@ async function dereferenceObject(obj, { cwd = crossHelpers.process.cwd(), extern
377
377
  externalFileCache,
378
378
  refMap,
379
379
  root,
380
- fetchFn: fetch,
380
+ fetchFn: fetch$1,
381
381
  importFn,
382
382
  logger,
383
383
  headers,
@@ -399,7 +399,7 @@ async function dereferenceObject(obj, { cwd = crossHelpers.process.cwd(), extern
399
399
  externalFileCache,
400
400
  refMap,
401
401
  root,
402
- fetchFn: fetch,
402
+ fetchFn: fetch$1,
403
403
  headers,
404
404
  });
405
405
  }
package/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { process, path, util } from '@graphql-mesh/cross-helpers';
2
2
  import { AggregateError } from '@graphql-tools/utils';
3
3
  import JsonPointer from 'json-pointer';
4
4
  import urlJoin from 'url-join';
5
- import { fetch } from 'cross-undici-fetch';
5
+ import { fetch } from '@whatwg-node/fetch';
6
6
  import { defaultImportFn, DefaultLogger, readFileOrUrl } from '@graphql-mesh/utils';
7
7
  import toJsonSchema from 'to-json-schema';
8
8
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "json-machete",
3
- "version": "0.10.1-alpha-19d4e9f08.0",
3
+ "version": "0.10.2",
4
4
  "sideEffects": false,
5
5
  "dependencies": {
6
6
  "@graphql-mesh/cross-helpers": "0.2.0",
7
- "@graphql-mesh/utils": "0.37.2-alpha-19d4e9f08.0",
7
+ "@graphql-mesh/utils": "0.37.3",
8
8
  "@graphql-tools/utils": "8.8.0",
9
9
  "@json-schema-tools/meta-schema": "1.6.19",
10
- "cross-undici-fetch": "^0.4.0",
10
+ "@whatwg-node/fetch": "^0.0.2",
11
11
  "json-pointer": "0.6.2",
12
12
  "to-json-schema": "0.2.5",
13
13
  "tslib": "^2.4.0",