diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 49ca56bd05..fa865824b0 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - fix case sensitive import for schema entities in codegen (#2211) +### Fixed +- Glob sync issue ## [5.2.1] - 2024-08-12 ### Changed diff --git a/packages/cli/package.json b/packages/cli/package.json index ed3e8e2b4f..80b09a363b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -17,6 +17,7 @@ "ejs": "^3.1.10", "fs-extra": "^11.2.0", "fuzzy": "^0.1.3", + "glob": "^10.4", "json5": "^2.2.3", "node-fetch": "2.7.0", "rimraf": "^5.0.10", diff --git a/packages/cli/src/commands/build/index.ts b/packages/cli/src/commands/build/index.ts index fec0667a70..34f7ba6966 100644 --- a/packages/cli/src/commands/build/index.ts +++ b/packages/cli/src/commands/build/index.ts @@ -5,7 +5,7 @@ import assert from 'assert'; import {existsSync, lstatSync, readFileSync} from 'fs'; import path from 'path'; import {Command, Flags} from '@oclif/core'; -import glob from 'glob'; +import {globSync} from 'glob'; import {runWebpack} from '../../controller/build-controller'; import {resolveToAbsolutePath, buildManifestFromLocation, getTsManifest} from '../../utils'; @@ -50,12 +50,12 @@ export default class Build extends Command { let buildEntries: Record = { index: defaultEntry, }; - glob.sync(path.join(directory, 'src/test/**/*.test.ts')).forEach((testFile) => { + globSync(path.join(directory, 'src/test/**/*.test.ts')).forEach((testFile) => { const testName = path.basename(testFile).replace('.ts', ''); buildEntries[`test/${testName}`] = testFile; }); - glob.sync(path.join(directory, 'src/tests/**/*.test.ts')).forEach((testFile) => { + globSync(path.join(directory, 'src/tests/**/*.test.ts')).forEach((testFile) => { const testName = path.basename(testFile).replace('.ts', ''); buildEntries[`tests/${testName}`] = testFile; }); diff --git a/yarn.lock b/yarn.lock index 6b640af103..03b45d81ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6659,6 +6659,7 @@ __metadata: ethers: ^5.7.2 fs-extra: ^11.2.0 fuzzy: ^0.1.3 + glob: ^10.4 json5: ^2.2.3 node-fetch: 2.7.0 oclif: ^3.15.0 @@ -13387,7 +13388,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.3.7": +"glob@npm:^10.3.7, glob@npm:^10.4": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: