Skip to content

Commit fddef8a

Browse files
committed
versions and tests
1 parent ecea9d5 commit fddef8a

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/CI-CD.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030

3131
steps:
3232
- name: Checkout source
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v6
3434

3535
- name: Install Node ${{ matrix.node }}
36-
uses: actions/setup-node@v4
36+
uses: actions/setup-node@v6
3737
with:
3838
node-version: ${{ matrix.node }}
3939

@@ -65,10 +65,10 @@ jobs:
6565

6666
steps:
6767
- name: Checkout source
68-
uses: actions/checkout@v4
68+
uses: actions/checkout@v6
6969

7070
- name: Install Node
71-
uses: actions/setup-node@v4
71+
uses: actions/setup-node@v6
7272
with:
7373
node-version: lts/*
7474

@@ -110,8 +110,8 @@ jobs:
110110
contents: write
111111
id-token: write
112112
steps:
113-
- uses: actions/checkout@v4
114-
- uses: actions/setup-node@v4
113+
- uses: actions/checkout@v6
114+
- uses: actions/setup-node@v6
115115
with:
116116
node-version: lts/*
117117
registry-url: https://registry.npmjs.org

lib/util/url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const jsonPointerTilde = /~0/g;
77

88
import { isWindows } from "./is-windows.js";
99

10-
const isAbsoluteWin32Path = /^[a-zA-Z]:\\/;
10+
const isAbsoluteWin32Path = /^[a-zA-Z]:[\\/]/;
1111

1212
// RegExp patterns to URL-encode special characters in local filesystem paths
1313
const urlEncodePatterns = [

test/specs/util/url.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ if (!process.env.BROWSER) {
3737
.and.toSatisfy((msg: string) => msg.startsWith("Y:/A/Random/Path"));
3838
});
3939

40+
it("should treat forward-slash drive-letter paths as absolute", async () => {
41+
const result = $url.fromFileSystemPath("C:/A/Random/Path/file.json");
42+
expect(result)
43+
.to.be.a("string")
44+
.and.toSatisfy((msg: string) => msg.startsWith("C:/A/Random/Path/file.json"));
45+
});
46+
4047
it("should handle relative paths", async () => {
4148
const result = $url.fromFileSystemPath("Path\\file.json");
4249
const pwd = convertPathToPosix(cwd());

0 commit comments

Comments
 (0)