diff --git a/package.json b/package.json index 874bd43a0..19de3a2b8 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@types/is-negated-glob": "^1.0.0", "@types/mocha": "^5.2.7", "@types/multimatch": "^2.1.3", - "@types/node": "^12.6.2", + "@types/node": "^12.6.3", "@types/ts-nameof": "^3.2.0", "chai": "^4.2.0", "chalk": "^2.4.2", diff --git a/src/fileSystem/DefaultFileSystemHost.ts b/src/fileSystem/DefaultFileSystemHost.ts index e1b54d915..4d6b7ae7f 100644 --- a/src/fileSystem/DefaultFileSystemHost.ts +++ b/src/fileSystem/DefaultFileSystemHost.ts @@ -153,6 +153,8 @@ export class DefaultFileSystemHost implements FileSystemHost { } glob(patterns: ReadonlyArray) { + // convert backslashes to foward + patterns = patterns.map(p => p.replace(/\\/g, "/")); // maybe this isn't full-proof? return this.globby.sync(patterns, { cwd: this.getCurrentDirectory(), absolute: true diff --git a/src/tests/projectTests.ts b/src/tests/projectTests.ts index 73ba9e928..6540aa272 100644 --- a/src/tests/projectTests.ts +++ b/src/tests/projectTests.ts @@ -836,7 +836,7 @@ describe(nameof(Project), () => { describe("mixing real files with virtual files", () => { function createProject() { - const testFilesDirPath = path.join(__dirname, "../../src/tests/testFiles").replace(/\\/g, "/"); + const testFilesDirPath = path.join(__dirname, "../../src/tests/testFiles"); const project = new Project(); project.addExistingSourceFiles(`${testFilesDirPath}/**/*.ts`); project.createSourceFile( diff --git a/yarn.lock b/yarn.lock index 3d8458de2..5a5d50a35 100644 --- a/yarn.lock +++ b/yarn.lock @@ -159,10 +159,14 @@ dependencies: "@types/minimatch" "*" -"@types/node@*", "@types/node@^12.6.2": +"@types/node@*": version "12.6.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.2.tgz#a5ccec6abb6060d5f20d256fb03ed743e9774999" +"@types/node@^12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.3.tgz#44d507c5634f85e7164707ca36bba21b5213d487" + "@types/ts-nameof@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@types/ts-nameof/-/ts-nameof-3.2.0.tgz#77c68c06471d3fab031ca1a2113fe1ffbe95c86f"