diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 0d658e9785a..b07fda26d51 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -37,7 +37,7 @@ "codecov": "^3.8.3", "execa": "9.4.0", "fs-extra": "^11.2.0", - "globby": "^11.0.4", + "globby": "^14.0.2", "got": "^13.0.0", "ip": "^2.0.1", "js-yaml": "^4.1.0", diff --git a/packages/scripts/src/helpers/packages.ts b/packages/scripts/src/helpers/packages.ts index 766007fa382..f9dc07e6eff 100644 --- a/packages/scripts/src/helpers/packages.ts +++ b/packages/scripts/src/helpers/packages.ts @@ -2,7 +2,7 @@ import fs from 'node:fs'; import path from 'node:path'; import fse from 'fs-extra'; import semver from 'semver'; -import globby from 'globby'; +import { isDynamicPattern, globbySync } from 'globby'; import { uniq, fastCloneDeep, get, trim } from '@terascope/utils'; @@ -59,8 +59,8 @@ function _resolveWorkspaces(workspaces: string[], rootDir: string) { .reduce( (pkgDirs, pkgGlob) => [ ...pkgDirs, - ...(globby.hasMagic(pkgGlob) - ? globby.sync(path.join(rootDir, pkgGlob), { + ...(isDynamicPattern(pkgGlob) + ? globbySync(path.join(rootDir, pkgGlob), { onlyDirectories: true, }) : [path.join(rootDir, pkgGlob)]), diff --git a/packages/teraslice-cli/package.json b/packages/teraslice-cli/package.json index 45a000d2f13..51c3ced45b9 100644 --- a/packages/teraslice-cli/package.json +++ b/packages/teraslice-cli/package.json @@ -49,8 +49,7 @@ "events": "^3.3.0", "execa": "9.4.0", "fs-extra": "^11.2.0", - "glob": "^8.0.3", - "glob-promise": "5.0.0", + "globby": "^14.0.2", "js-yaml": "^4.1.0", "pretty-bytes": "^6.1.1", "prompts": "^2.4.2", diff --git a/packages/teraslice-cli/src/helpers/asset-src.ts b/packages/teraslice-cli/src/helpers/asset-src.ts index def943fc084..694021cf175 100644 --- a/packages/teraslice-cli/src/helpers/asset-src.ts +++ b/packages/teraslice-cli/src/helpers/asset-src.ts @@ -1,6 +1,6 @@ import { execa } from 'execa'; import prettyBytes from 'pretty-bytes'; -import glob from 'glob-promise'; +import { globby } from 'globby'; import fs from 'fs-extra'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -130,7 +130,7 @@ export class AssetSrc { async operatorFiles(ext: 'js' | 'ts'): Promise { const OP_TYPE_FILE_NAMES = OP_TYPES.map(toLowerCase); const matchString = path.join(this.srcDir, 'asset', `**/{${OP_TYPE_FILE_NAMES}}.${ext}`); - return glob(matchString, { ignore: ['**/node_modules/**', '**/_*/**', '**/.*/**'] }); + return globby(matchString, { ignore: ['**/node_modules/**', '**/_*/**', '**/.*/**'] }); } /** diff --git a/yarn.lock b/yarn.lock index c7c28125a51..5733ed62e10 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1723,6 +1723,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== +"@sindresorhus/merge-streams@^2.1.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz#719df7fb41766bc143369eaa0dd56d8dc87c9958" + integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg== + "@sindresorhus/merge-streams@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz#abb11d99aeb6d27f1b563c38147a72d50058e339" @@ -2801,14 +2806,6 @@ resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== -"@types/glob@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/got@^9.6.9": version "9.6.12" resolved "https://registry.yarnpkg.com/@types/got/-/got-9.6.12.tgz#fd42a6e1f5f64cd6bb422279b08c30bb5a15a56f" @@ -2954,11 +2951,6 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - "@types/minimatch@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" @@ -6690,13 +6682,6 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-promise@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-5.0.0.tgz#aee3317ee1c211866d0425e1ac2e9089ded09c28" - integrity sha512-YQ7+beqmmQ3yUzybHoxnj7XMImztIdusIFate36/aB1gEWugR1qZI9a2u1A5mt6gYRqYldipZ7NB9s1UEq3vzw== - dependencies: - "@types/glob" "^7.2.0" - glob@^10.0.0, glob@^10.3.7: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" @@ -6732,7 +6717,7 @@ glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1, glob@^8.0.3: +glob@^8.0.1: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -6808,7 +6793,7 @@ globalthis@^1.0.1, globalthis@^1.0.3: define-properties "^1.2.1" gopd "^1.0.1" -globby@^11.0.1, globby@^11.0.4, globby@^11.1.0: +globby@^11.0.1, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -6831,6 +6816,18 @@ globby@^13.1.2: merge2 "^1.4.1" slash "^4.0.0" +globby@^14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.2.tgz#06554a54ccfe9264e5a9ff8eded46aa1e306482f" + integrity sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw== + dependencies: + "@sindresorhus/merge-streams" "^2.1.0" + fast-glob "^3.3.2" + ignore "^5.2.4" + path-type "^5.0.0" + slash "^5.1.0" + unicorn-magic "^0.1.0" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -10349,6 +10346,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path-type@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8" + integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg== + pbf@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/pbf/-/pbf-3.3.0.tgz#1790f3d99118333cc7f498de816028a346ef367f" @@ -11441,7 +11443,7 @@ slash@^4.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== -slash@^5.0.0: +slash@^5.0.0, slash@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== @@ -12521,12 +12523,7 @@ typescript-eslint@^8.5.0: "@typescript-eslint/parser" "8.7.0" "@typescript-eslint/utils" "8.7.0" -typescript@^5.2.2: - version "5.6.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" - integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== - -typescript@~5.2.2: +typescript@^5.2.2, typescript@~5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== @@ -12581,6 +12578,11 @@ undici@^6.12.0: resolved "https://registry.yarnpkg.com/undici/-/undici-6.19.8.tgz#002d7c8a28f8cc3a44ff33c3d4be4d85e15d40e1" integrity sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g== +unicorn-magic@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4" + integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== + unicorn-magic@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.3.0.tgz#4efd45c85a69e0dd576d25532fbfa22aa5c8a104"