Skip to content

Commit 3b85daf

Browse files
authored
fix(factory): Fix deprecated glob import that prevents using from code after glob upgrade (#1981)
1 parent a177f84 commit 3b85daf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

factory/program.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as glob from "glob";
21
import * as path from "node:path";
32
import normalize from "normalize-path";
43
import ts from "typescript";
54
import type { CompletedConfig, Config } from "../src/Config.js";
65
import { BuildError } from "../src/Error/Errors.js";
6+
import { globSync } from "glob";
77

88
function loadTsConfigFile(configFile: string) {
99
const raw = ts.sys.readFile(configFile);
@@ -64,7 +64,7 @@ function getTsConfig(config: Config) {
6464

6565
export function createProgram(config: CompletedConfig): ts.Program {
6666
const rootNamesFromPath = config.path
67-
? glob.sync(normalize(path.resolve(config.path))).map((rootName) => normalize(rootName))
67+
? globSync(normalize(path.resolve(config.path))).map((rootName) => normalize(rootName))
6868
: [];
6969
const tsconfig = getTsConfig(config);
7070
const rootNames = rootNamesFromPath.length ? rootNamesFromPath : tsconfig.fileNames;

0 commit comments

Comments
 (0)