dsh-plugin-wsl-env 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/docs/root-fs-routing.md +3 -2
- package/lib/fs-routing.d.ts +6 -5
- package/lib/fs-routing.js +7 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,20 @@ were part of the record.
|
|
|
16
16
|
|
|
17
17
|
## [Unreleased]
|
|
18
18
|
|
|
19
|
+
## [0.23.1] - 2026-11-10
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **The distro root refuses cleanly again instead of reaching the Windows
|
|
24
|
+
opener.** 0.23.0 stripped the share root's trailing separator so
|
|
25
|
+
`verifyDesktopPath` would close for `\\wsl.localhost\<distro>`; the check
|
|
26
|
+
passed, then the Host handed that share root to Explorer as
|
|
27
|
+
`file://wsl.localhost/<distro>`, which Windows rejects with a network-error
|
|
28
|
+
dialog. The root keeps the substrate's trailing separator, so the Host-path
|
|
29
|
+
check refuses it with the documented `Path has no verified Host path`; paths
|
|
30
|
+
inside the distro are unaffected. Supporting the root itself needs the opener
|
|
31
|
+
to accept a share root (upstream), and is not claimed here.
|
|
32
|
+
|
|
19
33
|
## [0.23.0] - 2026-11-10
|
|
20
34
|
|
|
21
35
|
One headline: the root filesystem answers host spelling where the Host's path
|
package/docs/root-fs-routing.md
CHANGED
|
@@ -89,8 +89,9 @@ home 缓存,所以同一个根平面可以同时服务多个发行版;`distr
|
|
|
89
89
|
`ui-deliverables` 的交付物打开路由(`present-open.ts`)用同一等式,一并失败。
|
|
90
90
|
workspace-files 的 change feed 与 `stat.absolutePath` 因此同为 UNC 形态,两者
|
|
91
91
|
一致;Linux 形态保留在目标的 `displayPath`(模型看到的那一面)。共享根
|
|
92
|
-
(distro
|
|
93
|
-
|
|
92
|
+
(distro 根)保留 substrate 的尾分隔符:宿主 `resolve` 会去掉它,因此根目标
|
|
93
|
+
通不过宿主路径校验;根目录本身不可 open/reveal(Windows 的 opener 也不接受
|
|
94
|
+
共享根 URL),根下面的路径不受影响。
|
|
94
95
|
**代价**:客户端 `fileMediaUrl` 拒绝 `\\` 开头的路径,WSL 工作区里 Markdown
|
|
95
96
|
预览的相对图片因此不渲染;聊天侧此前就已如此(其 `cwd` 本就是 UNC)。
|
|
96
97
|
- **watch 的事件粒度**:无限深目录且有 `inotifywait` 时,distro 侧优先使用
|
package/lib/fs-routing.d.ts
CHANGED
|
@@ -286,11 +286,12 @@ export declare class WslRoutingFileSystem extends LocalFileSystem {
|
|
|
286
286
|
* and `contains` still compares POSIX coordinates; only this accessor — the
|
|
287
287
|
* one the Host's path-taking consumers read — speaks host spelling.
|
|
288
288
|
*
|
|
289
|
-
* The share root is
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
289
|
+
* The share root is deliberately left alone: `posixToUnc(distro, "/")`
|
|
290
|
+
* renders `\\wsl.localhost\<distro>\` with a trailing separator, and the
|
|
291
|
+
* Host's `path.resolve` drops it, so the Host-path check refuses the root
|
|
292
|
+
* instead of passing a share-root spelling to an opener that cannot open it
|
|
293
|
+
* (0.23.0 stripped the separator; Explorer then showed a network error for
|
|
294
|
+
* `file://wsl.localhost/<distro>`). Paths inside the distro are unaffected.
|
|
294
295
|
*
|
|
295
296
|
* @param target - the resolved target.
|
|
296
297
|
* @returns the canonical UNC for a distro target, the host path otherwise.
|
package/lib/fs-routing.js
CHANGED
|
@@ -377,18 +377,19 @@ export class WslRoutingFileSystem extends LocalFileSystem {
|
|
|
377
377
|
* and `contains` still compares POSIX coordinates; only this accessor — the
|
|
378
378
|
* one the Host's path-taking consumers read — speaks host spelling.
|
|
379
379
|
*
|
|
380
|
-
* The share root is
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
380
|
+
* The share root is deliberately left alone: `posixToUnc(distro, "/")`
|
|
381
|
+
* renders `\\wsl.localhost\<distro>\` with a trailing separator, and the
|
|
382
|
+
* Host's `path.resolve` drops it, so the Host-path check refuses the root
|
|
383
|
+
* instead of passing a share-root spelling to an opener that cannot open it
|
|
384
|
+
* (0.23.0 stripped the separator; Explorer then showed a network error for
|
|
385
|
+
* `file://wsl.localhost/<distro>`). Paths inside the distro are unaffected.
|
|
385
386
|
*
|
|
386
387
|
* @param target - the resolved target.
|
|
387
388
|
* @returns the canonical UNC for a distro target, the host path otherwise.
|
|
388
389
|
*/
|
|
389
390
|
processPath(target) {
|
|
390
391
|
if (targetIsDistro(target.targetKey))
|
|
391
|
-
return String(target.targetKey)
|
|
392
|
+
return String(target.targetKey);
|
|
392
393
|
return super.processPath(target);
|
|
393
394
|
}
|
|
394
395
|
}
|
package/package.json
CHANGED