Repro
import * as path from "node:path";
console.log("posix.join:", path.posix.join("/foo", "bar"));
console.log("posix.sep:", path.posix.sep);
console.log("win32.join:", path.win32.join("C:\\foo", "bar"));
console.log("win32.sep:", path.win32.sep);
Actual (Perry v0.5.910)
posix.join: undefined
posix.sep: /
win32.join: undefined
win32.sep: \
Expected (Node)
posix.join: /foo/bar
posix.sep: /
win32.join: C:\foo\bar
win32.sep: \
Analysis
path.posix and path.win32 are sub-namespace objects that mirror the full path API but force POSIX / Windows semantics respectively. After #741 landed, the top-level path.* functions all work — but the path.posix / path.win32 sub-objects only have their data properties populated (sep, delimiter resolve correctly) while their function properties (join, resolve, basename, dirname, normalize, etc.) are undefined.
So this is a sub-namespace function-population gap, distinct from #741's top-level fixes. Same family as #629 (namespace member visibility) but one level down.
path.win32.* is heavily used by cross-platform tooling that needs to manipulate Windows paths from a POSIX host (build tools, bundlers, path normalizers). path.posix.* similarly for the reverse.
Why this matters now
This is the only remaining divergence in test-files/test_parity_path.ts — diff is down to 2 changed lines (posix.join + win32.join), both this bug. Fixing it makes test_parity_path a full byte-for-byte PASS, joining test_parity_os, test_parity_tty, and test_parity_async_local_storage.
Acceptance
The 4-line repro prints output matching Node. (path.posix.join and path.win32.join are the canonical probes; ideally the whole posix/win32 function surface is populated, not just join.)
Related
Repro
Actual (Perry v0.5.910)
Expected (Node)
Analysis
path.posixandpath.win32are sub-namespace objects that mirror the fullpathAPI but force POSIX / Windows semantics respectively. After #741 landed, the top-levelpath.*functions all work — but thepath.posix/path.win32sub-objects only have their data properties populated (sep,delimiterresolve correctly) while their function properties (join,resolve,basename,dirname,normalize, etc.) areundefined.So this is a sub-namespace function-population gap, distinct from #741's top-level fixes. Same family as #629 (namespace member visibility) but one level down.
path.win32.*is heavily used by cross-platform tooling that needs to manipulate Windows paths from a POSIX host (build tools, bundlers, path normalizers).path.posix.*similarly for the reverse.Why this matters now
This is the only remaining divergence in
test-files/test_parity_path.ts— diff is down to 2 changed lines (posix.join+win32.join), both this bug. Fixing it makestest_parity_patha full byte-for-byte PASS, joiningtest_parity_os,test_parity_tty, andtest_parity_async_local_storage.Acceptance
The 4-line repro prints output matching Node. (
path.posix.joinandpath.win32.joinare the canonical probes; ideally the wholeposix/win32function surface is populated, not justjoin.)Related
true(TAG_TRUE) #629 (namespace member visibility), one nesting level deeper.test-files/test_parity_path.ts(diff = 4 in v0.5.910 sweep, down from 15 in v0.5.894).