Skip to content

Commit

Permalink
build(render): fix by upath
Browse files Browse the repository at this point in the history
dirname(import.meta) returns with \ on Windows,
while globby, which uses fast-glob under the hood,
does not treat as path delimiter.
Thus upath is introduced to solve this issue.

REF: sindresorhus/globby#130
REF: https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
  • Loading branch information
jjangga0214 committed Jan 15, 2024
1 parent 3b98485 commit f38f605
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"prettier": "^3.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"upath": "^2.0.1",
"yaml": "^2.3.4"
}
}
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion workflows/csvlint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable unicorn/no-process-exit */
import path from 'node:path'
import fs from 'node:fs/promises'
import path from 'upath'
import { dirname, filename } from 'dirname-filename-esm'
import chalk from 'chalk-template'

Expand Down
2 changes: 1 addition & 1 deletion workflows/render.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'node:path'
import fs from 'node:fs/promises'
import path from 'upath'
import { globby } from 'globby'
import { dirname, filename } from 'dirname-filename-esm'
import mustache from 'mustache'
Expand Down

0 comments on commit f38f605

Please sign in to comment.