Commit b149eb3
committed
fix(cli): use pathToFileURL for dynamic imports in oxfmt/oxlint bin wrappers
On Windows, Node.js ESM loader rejects absolute paths like `c:\Users\...`
because it interprets the drive letter as a URL scheme. Convert resolved
paths to file:// URLs via pathToFileURL() which works on all platforms.
Also enable win32 snap tests for both wrappers since the non-LSP error
path doesn't involve dynamic imports.
Closes oxc-project/oxc-vscode#1491 parent b50a329 commit b149eb3
4 files changed
Lines changed: 4 additions & 4 deletions
File tree
- packages/cli
- bin
- snap-tests
- bin-oxfmt-wrapper
- bin-oxlint-wrapper
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
0 commit comments