Skip to content

Commit 9f8e699

Browse files
committed
build: update to latest glob
Updates the `glob` dependency to the latest version and fixes errors that were tripping up the bot.
1 parent 14875f1 commit 9f8e699

File tree

6 files changed

+76
-18
lines changed

6 files changed

+76
-18
lines changed

integration/linker/link-packages-test.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {NodeJSFileSystem, ConsoleLogger, LogLevel} from '@angular/compiler-cli';
88
import fs from 'fs';
99
import path from 'path';
1010
import babel from '@babel/core';
11-
import glob from 'glob';
11+
import {sync as globSync} from 'glob';
1212
import chalk from 'chalk';
1313

1414
/** File system used by the Angular linker plugin. */
@@ -62,7 +62,7 @@ if (failedPackages) {
6262
* @returns An object containing linker failures and passed files.
6363
*/
6464
function testPackage(pkg) {
65-
const entryPointFesmFiles = glob.sync(`fesm2022/**/*.mjs`, {cwd: pkg.pkgPath});
65+
const entryPointFesmFiles = globSync(`fesm2022/**/*.mjs`, {cwd: pkg.pkgPath});
6666
const passedFiles = [];
6767
const failures = [];
6868

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"esbuild": "^0.25.0",
111111
"firebase-tools": "14.4.0",
112112
"fs-extra": "^11.0.0",
113-
"glob": "^7.2.0",
113+
"glob": "^11.0.3",
114114
"highlight.js": "^11.0.0",
115115
"husky": "^9.0.1",
116116
"jasmine": "^5.6.0",

pnpm-lock.yaml

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

scripts/create-legacy-tests-bundle.mjs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import babel from '@babel/core';
44
import child_process from 'child_process';
55
import esbuild from 'esbuild';
66
import fs from 'fs';
7-
import glob from 'glob';
7+
import {sync as globSync} from 'glob';
88
import module from 'module';
9-
import path from 'path';
109
import {dirname, join, relative} from 'path';
1110
import * as sass from 'sass';
1211
import url from 'url';
@@ -51,8 +50,8 @@ async function main() {
5150
const specEntryPointFile = await createEntryPointSpecFile();
5251

5352
// Copy tsconfig so that ESBuild can leverage its path mappings.
54-
const esbuildTsconfig = path.join(legacyOutputDir, 'tsconfig-esbuild.json');
55-
await fs.promises.cp(path.join(packagesDir, 'bazel-tsconfig-build.json'), esbuildTsconfig);
53+
const esbuildTsconfig = join(legacyOutputDir, 'tsconfig-esbuild.json');
54+
await fs.promises.cp(join(packagesDir, 'bazel-tsconfig-build.json'), esbuildTsconfig);
5655

5756
const result = await esbuild.build({
5857
bundle: true,
@@ -83,7 +82,7 @@ async function main() {
8382
* explicitly added.
8483
*/
8584
async function compileSassFiles() {
86-
const sassFiles = glob.sync('src/**/!(_*|theme).scss', {cwd: projectDir, absolute: true});
85+
const sassFiles = globSync('src/**/!(_*|theme).scss', {cwd: projectDir, absolute: true});
8786
const writeTasks = [];
8887

8988
let count = 0;
@@ -132,7 +131,7 @@ async function compileProjectWithNgtsc() {
132131
* to bundle all specs in an IIFE file.
133132
*/
134133
async function createEntryPointSpecFile() {
135-
const testFiles = glob.sync('**/*.spec.js', {absolute: true, cwd: legacyOutputDir});
134+
const testFiles = globSync('**/*.spec.js', {absolute: true, cwd: legacyOutputDir});
136135

137136
let specEntryPointFile = `import './test/angular-test.init.ts';`;
138137
let i = 0;

tools/release-checks/npm-package-output/check-package.mts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Log, bold, yellow} from '@angular/ng-dev';
22
import {existsSync} from 'fs';
3-
import glob from 'glob';
3+
import {sync as globSync} from 'glob';
44
import {basename, dirname, join} from 'path';
55

66
import {
@@ -47,9 +47,9 @@ export function checkReleasePackage(
4747
failures.set(message, filePaths);
4848
};
4949

50-
const jsFiles = glob.sync(releaseJsFilesGlob, {cwd: packagePath, absolute: true});
51-
const typeDefinitions = glob.sync(releaseTypeDefinitionsGlob, {cwd: packagePath, absolute: true});
52-
const packageJsonFiles = glob.sync(packageJsonFilesGlob, {cwd: packagePath, absolute: true});
50+
const jsFiles = globSync(releaseJsFilesGlob, {cwd: packagePath, absolute: true});
51+
const typeDefinitions = globSync(releaseTypeDefinitionsGlob, {cwd: packagePath, absolute: true});
52+
const packageJsonFiles = globSync(packageJsonFilesGlob, {cwd: packagePath, absolute: true});
5353

5454
// We want to walk through each bundle within the current package and run
5555
// release validations that ensure that the bundles are not invalid.

tools/release-checks/npm-package-output/output-validations.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {existsSync, readFileSync} from 'fs';
2-
import glob from 'glob';
2+
import {sync as globSync} from 'glob';
33
import {basename, dirname, isAbsolute, join} from 'path';
44
import semver from 'semver';
55

@@ -146,7 +146,7 @@ export function checkMaterialPackage(packagePath: string): string[] {
146146
const newThemingFilePath = join(packagePath, '_index.scss');
147147
const failures: string[] = [];
148148

149-
if (glob.sync('*.css', {cwd: prebuiltThemesPath}).length === 0) {
149+
if (globSync('*.css', {cwd: prebuiltThemesPath}).length === 0) {
150150
failures.push('No prebuilt themes could be found.');
151151
}
152152

@@ -161,7 +161,7 @@ export function checkMaterialPackage(packagePath: string): string[] {
161161
* Checks whether the prebuilt CDK files are part of the release output.
162162
*/
163163
export function checkCdkPackage(packagePath: string): string[] {
164-
const prebuiltFiles = glob.sync('*-prebuilt.css', {cwd: packagePath}).map(path => basename(path));
164+
const prebuiltFiles = globSync('*-prebuilt.css', {cwd: packagePath}).map(path => basename(path));
165165
const newApiFilePath = join(packagePath, '_index.scss');
166166
const failures = ['overlay', 'a11y', 'text-field']
167167
.filter(name => !prebuiltFiles.includes(`${name}-prebuilt.css`))

0 commit comments

Comments
 (0)