From f2245d1fd5059a4eac2aa7480201bab20dd2a519 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:34:03 -0500 Subject: [PATCH] build: convert build/test scripts to use fast-glob (#53397) The repository currently has two globbing packages. To minimize the number of packages in the framework repository, the uses of the `glob` package are being converted to `fast-glob` which is used by the tooling repository. The change is mostly mechanical and in this change the build and test scripts are converted. PR Close #53397 --- integration/ng_update_migrations/test.js | 2 +- integration/update-lock-files.mjs | 2 +- packages/common/locales/generate-locales-tool/BUILD.bazel | 3 +-- packages/common/locales/generate-locales-tool/cldr-data.ts | 2 +- tools/legacy-saucelabs/build-saucelabs-test-bundle.mjs | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/integration/ng_update_migrations/test.js b/integration/ng_update_migrations/test.js index e4ebcdabefb..b2ed7af9e02 100644 --- a/integration/ng_update_migrations/test.js +++ b/integration/ng_update_migrations/test.js @@ -9,7 +9,7 @@ const path = require('path'); const fs = require('fs'); const child_process = require('child_process'); -const glob = require('glob'); +const glob = require('fast-glob'); const chalk = require('chalk'); const diff = require('diff'); diff --git a/integration/update-lock-files.mjs b/integration/update-lock-files.mjs index cc997cfb30e..a573b748fae 100644 --- a/integration/update-lock-files.mjs +++ b/integration/update-lock-files.mjs @@ -11,7 +11,7 @@ import childProcess from 'child_process'; import url from 'url'; import path from 'path'; -import glob from 'glob'; +import glob from 'fast-glob'; import fs from 'fs'; const containingDir = path.dirname(url.fileURLToPath(import.meta.url)); diff --git a/packages/common/locales/generate-locales-tool/BUILD.bazel b/packages/common/locales/generate-locales-tool/BUILD.bazel index c795b94d5ad..28bc4e0cb96 100644 --- a/packages/common/locales/generate-locales-tool/BUILD.bazel +++ b/packages/common/locales/generate-locales-tool/BUILD.bazel @@ -8,10 +8,9 @@ ts_library( deps = [ "@npm//@bazel/runfiles", "@npm//@types/cldrjs", - "@npm//@types/glob", "@npm//@types/node", "@npm//cldr", "@npm//cldrjs", - "@npm//glob", + "@npm//fast-glob", ], ) diff --git a/packages/common/locales/generate-locales-tool/cldr-data.ts b/packages/common/locales/generate-locales-tool/cldr-data.ts index a828dab652f..fd2397d9110 100644 --- a/packages/common/locales/generate-locales-tool/cldr-data.ts +++ b/packages/common/locales/generate-locales-tool/cldr-data.ts @@ -9,7 +9,7 @@ import {runfiles} from '@bazel/runfiles'; import cldrjs, {type CldrStatic} from 'cldrjs'; import fs from 'fs'; -import glob from 'glob'; +import glob from 'fast-glob'; /** * Globs that match CLDR JSON data files that should be fetched. We limit these intentionally diff --git a/tools/legacy-saucelabs/build-saucelabs-test-bundle.mjs b/tools/legacy-saucelabs/build-saucelabs-test-bundle.mjs index bd45d05c317..6006a97fe85 100644 --- a/tools/legacy-saucelabs/build-saucelabs-test-bundle.mjs +++ b/tools/legacy-saucelabs/build-saucelabs-test-bundle.mjs @@ -11,7 +11,7 @@ import multimatch from 'multimatch'; import esbuild from 'esbuild'; import fs from 'fs'; -import glob from 'glob'; +import glob from 'fast-glob'; import {dirname, join, isAbsolute, relative} from 'path'; import url from 'url'; import ts from 'typescript';