From 3d625a951a564f6bf426e236a619865fbcc1c2dc Mon Sep 17 00:00:00 2001 From: Sampsa Kaskela Date: Sun, 19 May 2024 21:04:31 +0300 Subject: [PATCH] bug: fix usage of * in type on Windows (#1942) * bug: fix usage of * in type on Windows * Run prettier * ci: test windows * ci: set node version to tests --------- Co-authored-by: Dominik Moritz --- .github/workflows/test.yml | 8 +++++++- factory/program.ts | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4cea268e5..10b1fc6cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,13 +12,19 @@ jobs: test: name: Test - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: + node-version: 18.20.2 cache: "yarn" - name: Install Node dependencies diff --git a/factory/program.ts b/factory/program.ts index 0e6a7c03a..3e7ffd1e0 100644 --- a/factory/program.ts +++ b/factory/program.ts @@ -60,7 +60,9 @@ function getTsConfig(config: Config) { } export function createProgram(config: CompletedConfig): ts.Program { - const rootNamesFromPath = config.path ? glob.sync(normalize(path.resolve(config.path))) : []; + const rootNamesFromPath = config.path + ? glob.sync(normalize(path.resolve(config.path))).map((rootName) => normalize(rootName)) + : []; const tsconfig = getTsConfig(config); const rootNames = rootNamesFromPath.length ? rootNamesFromPath : tsconfig.fileNames;