Skip to content

Commit

Permalink
bug: fix usage of * in type on Windows (#1942)
Browse files Browse the repository at this point in the history
* bug: fix usage of * in type on Windows

* Run prettier

* ci: test windows

* ci: set node version to tests

---------

Co-authored-by: Dominik Moritz <[email protected]>
  • Loading branch information
SampsaKaskela and domoritz authored May 19, 2024
1 parent 3410027 commit 3d625a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion factory/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3d625a9

Please sign in to comment.