@oh-my-pi/pi-utils 18.1.14 → 18.1.16
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 +6 -0
- package/dist/types/which.d.ts +3 -1
- package/package.json +2 -2
- package/src/which.ts +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.1.16] - 2026-09-09
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed `$which` capturing `Bun.which` at import on Linux and Windows, so `Bun.which` stubs installed later (e.g. per-test spies) are honoured and PATH-only language servers no longer leak into test results.
|
|
10
|
+
|
|
5
11
|
## [18.1.13] - 2026-09-07
|
|
6
12
|
|
|
7
13
|
### Fixed
|
package/dist/types/which.d.ts
CHANGED
|
@@ -26,7 +26,8 @@ export interface WhichOptions extends Bun.WhichOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
cache?: WhichCachePolicy;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
declare function darwinWhich(command: string, options?: Bun.WhichOptions): string | null;
|
|
30
|
+
export declare const whichFresh: typeof darwinWhich;
|
|
30
31
|
/**
|
|
31
32
|
* Locate binary on PATH (with flexible caching).
|
|
32
33
|
*
|
|
@@ -35,3 +36,4 @@ export declare const whichFresh: typeof Bun.which;
|
|
|
35
36
|
* @returns Filesystem path if found, else null
|
|
36
37
|
*/
|
|
37
38
|
export declare function $which(command: string, options?: WhichOptions): string | null;
|
|
39
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-utils",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.16",
|
|
4
4
|
"description": "Shared utilities for pi packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@oh-my-pi/pi-natives": "18.1.
|
|
57
|
+
"@oh-my-pi/pi-natives": "18.1.16"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/bun": "^1.3.14"
|
package/src/which.ts
CHANGED
|
@@ -192,8 +192,13 @@ function darwinWhich(command: string, options?: Bun.WhichOptions): string | null
|
|
|
192
192
|
return null;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
// Which function that incorporates Darwin Xcode logic if platform reports as 'darwin'
|
|
196
|
-
|
|
195
|
+
// Which function that incorporates Darwin Xcode logic if platform reports as 'darwin'.
|
|
196
|
+
// Look `Bun.which` up per call rather than capturing it at import, so a `Bun.which`
|
|
197
|
+
// stub installed later (the per-test seam) is honoured on every platform.
|
|
198
|
+
export const whichFresh =
|
|
199
|
+
os.platform() === "darwin"
|
|
200
|
+
? darwinWhich
|
|
201
|
+
: (command: string, options?: Bun.WhichOptions): string | null => Bun.which(command, options);
|
|
197
202
|
|
|
198
203
|
// Derive stable cache key from command and lookup options
|
|
199
204
|
function cacheKey(command: string, options?: Bun.WhichOptions): CacheKey {
|