Skip to content

Commit 1de92cc

Browse files
benmccannalan-agius4
authored andcommitted
refactor(@angular-devkit/build-angular): switch to tinyglobby
1 parent 722c44f commit 1de92cc

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

packages/angular_devkit/build_angular/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ ts_project(
174174
":node_modules/source-map-loader",
175175
":node_modules/source-map-support",
176176
":node_modules/terser",
177+
":node_modules/tinyglobby",
177178
":node_modules/tree-kill",
178179
":node_modules/webpack",
179180
":node_modules/webpack-dev-middleware",
@@ -198,7 +199,6 @@ ts_project(
198199
"//:node_modules/@types/watchpack",
199200
"//:node_modules/esbuild",
200201
"//:node_modules/esbuild-wasm",
201-
"//:node_modules/fast-glob",
202202
"//:node_modules/karma",
203203
"//:node_modules/karma-source-map-support",
204204
"//:node_modules/semver",
@@ -224,9 +224,9 @@ ts_project(
224224
deps = [
225225
":build_angular",
226226
":build_angular_test_utils",
227+
":node_modules/tinyglobby",
227228
":node_modules/webpack",
228229
"//:node_modules/@types/node",
229-
"//:node_modules/fast-glob",
230230
"//:node_modules/prettier",
231231
"//:node_modules/typescript",
232232
"//packages/angular_devkit/architect/testing",

packages/angular_devkit/build_angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"copy-webpack-plugin": "13.0.1",
3030
"css-loader": "7.1.2",
3131
"esbuild-wasm": "0.25.9",
32-
"fast-glob": "3.3.3",
3332
"http-proxy-middleware": "3.0.5",
3433
"istanbul-lib-instrument": "6.0.3",
3534
"jsonc-parser": "3.3.1",
@@ -53,6 +52,7 @@
5352
"source-map-loader": "5.0.0",
5453
"source-map-support": "0.5.21",
5554
"terser": "5.44.0",
55+
"tinyglobby": "0.2.15",
5656
"tree-kill": "1.2.2",
5757
"tslib": "2.8.1",
5858
"webpack": "5.101.3",

packages/angular_devkit/build_angular/src/tools/webpack/utils/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88

99
import type { ObjectPattern } from 'copy-webpack-plugin';
10-
import glob from 'fast-glob';
1110
import { createHash } from 'node:crypto';
1211
import * as path from 'node:path';
12+
import { globSync } from 'tinyglobby';
1313
import type { Configuration, WebpackOptionsNormalized } from 'webpack';
1414
import {
1515
AssetPatternClass,
@@ -126,7 +126,7 @@ export function getInstrumentationExcludedPaths(
126126

127127
for (const excludeGlob of excludedPaths) {
128128
const excludePath = excludeGlob[0] === '/' ? excludeGlob.slice(1) : excludeGlob;
129-
glob.sync(excludePath, { cwd: root }).forEach((p) => excluded.add(path.join(root, p)));
129+
globSync(excludePath, { cwd: root }).forEach((p) => excluded.add(path.join(root, p)));
130130
}
131131

132132
return excluded;

packages/angular_devkit/build_angular/src/utils/copy-assets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import glob from 'fast-glob';
109
import fs from 'node:fs';
1110
import path from 'node:path';
11+
import { glob } from 'tinyglobby';
1212

1313
export async function copyAssets(
1414
entries: {

packages/angular_devkit/build_angular/src/utils/test-files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import fastGlob, { Options as GlobOptions } from 'fast-glob';
9+
import { GlobOptions, glob as globFn } from 'tinyglobby';
1010

1111
/**
1212
* Finds all test files in the project.
@@ -21,7 +21,7 @@ export async function findTestFiles(
2121
include: string[],
2222
exclude: string[],
2323
workspaceRoot: string,
24-
glob: typeof fastGlob = fastGlob,
24+
glob: typeof globFn = globFn,
2525
): Promise<Set<string>> {
2626
const globOptions: GlobOptions = {
2727
cwd: workspaceRoot,

packages/angular_devkit/build_angular/src/utils/test-files_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88

99
// eslint-disable-next-line import/no-extraneous-dependencies
10-
import realGlob from 'fast-glob';
1110
import { promises as fs } from 'node:fs';
1211
import * as path from 'node:path';
12+
import { glob as realGlob } from 'tinyglobby';
1313
import { findTestFiles } from './test-files';
1414

1515
describe('test-files', () => {

pnpm-lock.yaml

Lines changed: 15 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)