Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c39c344

Browse files
clydinalan-agius4
authored andcommitted
refactor(@angular/build): replace fast-glob usage with tinyglobby
Usage of the `fast-glob` package has been replaced with the `tinyglobby` package throughout `@angular/build`. The change reduces the number of transitive dependencies related to these packages from 17 to 2 while also maintaining equivalent functionality. Additionally, the `tinyglobby` package is used by other dependencies such as `vite` and `copy-webpack-plugin` which has the potential to further reduce overall transitive dependencies for a project.
1 parent 337bc3c commit c39c344

File tree

11 files changed

+21
-16
lines changed

11 files changed

+21
-16
lines changed

‎.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# This file should be checked into version control along with the pnpm-lock.yaml file.
44
.npmrc=-1406867100
55
modules/testing/builder/package.json=973445093
6-
package.json=52575479
7-
packages/angular/build/package.json=-42220606
6+
package.json=1411918173
7+
packages/angular/build/package.json=1920607808
88
packages/angular/cli/package.json=-1917515334
99
packages/angular/pwa/package.json=1108903917
1010
packages/angular/ssr/package.json=-2027233365
@@ -17,7 +17,7 @@ packages/angular_devkit/schematics/package.json=-1133510866
1717
packages/angular_devkit/schematics_cli/package.json=-2026655035
1818
packages/ngtools/webpack/package.json=884391309
1919
packages/schematics/angular/package.json=251715148
20-
pnpm-lock.yaml=2092314161
20+
pnpm-lock.yaml=2112966384
2121
pnpm-workspace.yaml=-1264044456
2222
tests/package.json=700948366
23-
yarn.lock=-1083761442
23+
yarn.lock=1484073494

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
"symbol-observable": "4.0.0",
195195
"tar": "^7.0.0",
196196
"terser": "5.39.0",
197+
"tinyglobby": "0.2.12",
197198
"tree-kill": "1.2.2",
198199
"ts-node": "^10.9.1",
199200
"tslib": "2.8.1",

‎packages/angular/build/BUILD.bazel‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ ts_project(
102102
"//:node_modules/browserslist",
103103
"//:node_modules/esbuild",
104104
"//:node_modules/esbuild-wasm",
105-
"//:node_modules/fast-glob",
106105
"//:node_modules/https-proxy-agent",
107106
"//:node_modules/istanbul-lib-instrument",
108107
"//:node_modules/jsonc-parser",
@@ -121,6 +120,7 @@ ts_project(
121120
"//:node_modules/sass",
122121
"//:node_modules/semver",
123122
"//:node_modules/source-map-support",
123+
"//:node_modules/tinyglobby",
124124
"//:node_modules/tslib",
125125
"//:node_modules/typescript",
126126
"//:node_modules/vite",

‎packages/angular/build/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"beasties": "0.2.0",
3030
"browserslist": "^4.23.0",
3131
"esbuild": "0.25.0",
32-
"fast-glob": "3.3.3",
3332
"https-proxy-agent": "7.0.6",
3433
"istanbul-lib-instrument": "6.0.3",
3534
"listr2": "8.2.5",
@@ -42,6 +41,7 @@
4241
"sass": "1.85.1",
4342
"semver": "7.7.1",
4443
"source-map-support": "0.5.21",
44+
"tinyglobby": "0.2.12",
4545
"vite": "6.2.0",
4646
"watchpack": "2.4.2"
4747
},

‎packages/angular/build/src/builders/karma/application_builder.ts‎

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

99
import type { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
10-
import glob from 'fast-glob';
1110
import type { Config, ConfigOptions, FilePattern, InlinePluginDef, Server } from 'karma';
1211
import { randomUUID } from 'node:crypto';
1312
import * as fs from 'node:fs/promises';
1413
import type { IncomingMessage, ServerResponse } from 'node:http';
1514
import { createRequire } from 'node:module';
1615
import * as path from 'node:path';
1716
import { ReadableStreamController } from 'node:stream/web';
17+
import { globSync } from 'tinyglobby';
1818
import { BuildOutputFileType } from '../../tools/esbuild/bundler-context';
1919
import { emitFilesToDisk } from '../../tools/esbuild/utils';
2020
import { buildApplicationInternal } from '../application/index';
@@ -614,7 +614,7 @@ function getInstrumentationExcludedPaths(root: string, excludedPaths: string[]):
614614

615615
for (const excludeGlob of excludedPaths) {
616616
const excludePath = excludeGlob[0] === '/' ? excludeGlob.slice(1) : excludeGlob;
617-
glob.sync(excludePath, { cwd: root }).forEach((p) => excluded.add(path.join(root,p)));
617+
globSync(excludePath, { absolute: true,cwd: root }).forEach((p) => excluded.add(p));
618618
}
619619

620620
return excluded;

‎packages/angular/build/src/builders/karma/find-tests.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, { isDynamicPattern } from 'fast-glob';
109
import { PathLike, constants, promises as fs } from 'node:fs';
1110
import { basename, dirname, extname, join, relative } from 'node:path';
11+
import { glob, isDynamicPattern } from 'tinyglobby';
1212

1313
/* Go through all patterns and find unique list of files */
1414
export async function findTests(

‎packages/angular/build/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.ts‎

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

99
import type { OnLoadResult, Plugin, PluginBuild } from 'esbuild';
10-
import glob from 'fast-glob';
1110
import assert from 'node:assert';
1211
import { readFile } from 'node:fs/promises';
1312
import { extname } from 'node:path';
1413
import type { Options } from 'sass';
14+
import { glob } from 'tinyglobby';
1515
import type { PostcssConfiguration } from '../../../utils/postcss-configuration';
1616
import { LoadResultCache, createCachedLoad } from '../load-result-cache';
1717

‎packages/angular/build/src/utils/load-proxy-config.ts‎

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

9-
import { isDynamicPattern } from 'fast-glob';
109
import { existsSync } from 'node:fs';
1110
import { readFile } from 'node:fs/promises';
1211
import { extname, resolve } from 'node:path';
1312
import { pathToFileURL } from 'node:url';
1413
import { makeRe as makeRegExpFromGlob } from 'picomatch';
14+
import { isDynamicPattern } from 'tinyglobby';
1515
import { assertIsError } from './error';
1616
import { loadEsmModule } from './load-esm';
1717

‎packages/angular/build/src/utils/resolve-assets.ts‎

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

9-
import glob from 'fast-glob';
109
import path from 'node:path';
10+
import { glob } from 'tinyglobby';
1111

1212
export async function resolveAssets(
1313
entries: {

‎pnpm-lock.yaml‎

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /