diff --git a/package.json b/package.json index 162e8f0ae74..6d5a4e158cd 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,6 @@ "@sanity/tsdoc": "1.0.105", "@sanity/ui": "^2.8.9", "@sanity/uuid": "^3.0.2", - "@types/glob": "^7.2.0", "@types/lodash": "^4.17.7", "@types/node": "^18.19.8", "@types/react": "^18.3.5", @@ -147,7 +146,7 @@ "eslint-plugin-unicorn": "^52.0.0", "eslint-plugin-unused-imports": "^3.2.0", "execa": "^2.0.0", - "glob": "^7.2.0", + "glob": "^10.4.0", "globby": "^10.0.0", "husky": "^9.0.11", "jest": "^29.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bfb45f06393..6b1ba2773b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,9 +66,6 @@ importers: '@sanity/uuid': specifier: ^3.0.2 version: 3.0.2 - '@types/glob': - specifier: ^7.2.0 - version: 7.2.0 '@types/lodash': specifier: ^4.17.7 version: 4.17.7 @@ -163,8 +160,8 @@ importers: specifier: ^2.0.0 version: 2.1.0 glob: - specifier: ^7.2.0 - version: 7.2.3 + specifier: ^10.4.0 + version: 10.4.5 globby: specifier: ^10.0.0 version: 10.0.2 @@ -7508,7 +7505,7 @@ packages: resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==} engines: {node: '>= 4.0'} os: [darwin] - deprecated: Upgrade to fsevents v2 to mitigate potential security issues + deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} diff --git a/scripts/normalizeDependencyVersions.ts b/scripts/normalizeDependencyVersions.ts index 48c7508d193..994021de9bf 100644 --- a/scripts/normalizeDependencyVersions.ts +++ b/scripts/normalizeDependencyVersions.ts @@ -3,7 +3,7 @@ import fs from 'node:fs' import path from 'node:path' import chalk from 'chalk' -import glob from 'glob' +import {globSync} from 'glob' import semver from 'semver' interface LernaConfig { @@ -42,7 +42,7 @@ const sortRanges = (ranges: string[]) => const patterns = config.packages.map((pkg) => path.join(pkg, 'package.json')) const pkgs = patterns - .flatMap((pattern) => glob.sync(pattern)) + .flatMap((pattern) => globSync(pattern)) .map((file) => path.join(rootPath, file)) .map((file) => ({contents: fs.readFileSync(file, 'utf8'), file})) .map(({contents, file}) => ({file, pkg: JSON.parse(contents)})) diff --git a/scripts/utils/getPackagePaths.ts b/scripts/utils/getPackagePaths.ts index b99bd2196f2..cb7db0a4eea 100644 --- a/scripts/utils/getPackagePaths.ts +++ b/scripts/utils/getPackagePaths.ts @@ -2,7 +2,7 @@ import fs from 'node:fs' import path from 'node:path' -import glob from 'glob' +import {globSync} from 'glob' interface LernaConfig { packages: string[] @@ -22,7 +22,7 @@ const patterns = config.packages.map((pkg) => path.join(pkg, 'package.json')) * @internal */ export function getManifestPaths(): string[] { - return patterns.flatMap((pattern) => glob.sync(pattern)) + return patterns.flatMap((pattern) => globSync(pattern)) } /**