From 7df738c8a71140cb765d7eca43fcac11e124b954 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:41:06 -0800 Subject: [PATCH] chore(deps): switch to tinyglobby --- packages/plugin/package.json | 4 ++-- packages/plugin/src/documents.ts | 4 ++-- packages/plugin/src/schema.ts | 4 ++-- pnpm-lock.yaml | 27 ++++++++++++++++++++++++--- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 4676865f5a2..80dc7ba535c 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -63,10 +63,10 @@ "@graphql-tools/graphql-tag-pluck": "^8.3.4", "@graphql-tools/utils": "^10.0.0", "debug": "^4.3.4", - "fast-glob": "^3.2.12", "graphql-config": "^5.1.3", "graphql-depth-limit": "^1.1.0", - "lodash.lowercase": "^4.3.0" + "lodash.lowercase": "^4.3.0", + "tinyglobby": "^0.2.11" }, "devDependencies": { "@apollo/subgraph": "^2.9.3", diff --git a/packages/plugin/src/documents.ts b/packages/plugin/src/documents.ts index 8b98b57729b..81d011f8a1c 100644 --- a/packages/plugin/src/documents.ts +++ b/packages/plugin/src/documents.ts @@ -1,6 +1,6 @@ import path from 'node:path'; import debugFactory from 'debug'; -import fg from 'fast-glob'; +import { globSync } from 'tinyglobby'; import { GraphQLProjectConfig } from 'graphql-config'; import { Source } from '@graphql-tools/utils'; import { ModuleCache } from './cache.js'; @@ -47,7 +47,7 @@ export const getDocuments = (project: GraphQLProjectConfig): Source[] => { }); if (debug.enabled) { debug('Loaded %d operations', documents.length); - const operationsPaths = fg.sync(project.documents as Pointer, { absolute: true }); + const operationsPaths = globSync(project.documents as Pointer, { absolute: true, expandDirectories: false }); debug('Operations pointers %O', operationsPaths); } siblings = handleVirtualPath(documents); diff --git a/packages/plugin/src/schema.ts b/packages/plugin/src/schema.ts index 30c2ad2eacb..8da40d49904 100644 --- a/packages/plugin/src/schema.ts +++ b/packages/plugin/src/schema.ts @@ -1,5 +1,5 @@ import debugFactory from 'debug'; -import fg from 'fast-glob'; +import { globSync } from 'tinyglobby'; import { BREAK, GraphQLSchema, visit } from 'graphql'; import { GraphQLProjectConfig } from 'graphql-config'; import { ModuleCache } from './cache.js'; @@ -57,7 +57,7 @@ export function getSchema(project: GraphQLProjectConfig): Schema { if (debug.enabled) { debug('Schema loaded: %o', schema instanceof GraphQLSchema); - const schemaPaths = fg.sync(project.schema as Pointer, { absolute: true }); + const schemaPaths = globSync(project.schema as Pointer, { absolute: true, expandDirectories: false }); debug('Schema pointers %O', schemaPaths); } schemaCache.set(schemaKey, schema); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33474b8f490..b5d973a7820 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -268,9 +268,6 @@ importers: eslint: specifier: '>=8.44.0' version: 9.16.0(patch_hash=t64n7kxodazs6lnwu42sgf5voe)(jiti@2.4.1) - fast-glob: - specifier: ^3.2.12 - version: 3.3.2 graphql-config: specifier: ^5.1.3 version: 5.1.3(@types/node@22.10.6)(graphql@16.9.0)(typescript@5.7.2) @@ -280,6 +277,9 @@ importers: lodash.lowercase: specifier: ^4.3.0 version: 4.3.0 + tinyglobby: + specifier: ^0.2.11 + version: 0.2.11 devDependencies: '@apollo/subgraph': specifier: ^2.9.3 @@ -4374,6 +4374,14 @@ packages: picomatch: optional: true + fdir@6.4.3: + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} @@ -6748,6 +6756,10 @@ packages: resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.11: + resolution: {integrity: sha512-32TmKeeKUahv0Go8WmQgiEp9Y21NuxjwjqiRC1nrUB51YacfSwuB44xgXD+HdIppmMRgjQNPdrHyA6vIybYZ+g==} + engines: {node: '>=12.0.0'} + tinypool@1.0.2: resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -11872,6 +11884,10 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fdir@6.4.3(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + fflate@0.8.2: {} file-entry-cache@8.0.0: @@ -14789,6 +14805,11 @@ snapshots: fdir: 6.4.2(picomatch@4.0.2) picomatch: 4.0.2 + tinyglobby@0.2.11: + dependencies: + fdir: 6.4.3(picomatch@4.0.2) + picomatch: 4.0.2 + tinypool@1.0.2: {} tinyrainbow@1.2.0: {}