@oh-my-pi/pi-natives 10.6.2 → 11.0.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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-natives",
3
- "version": "10.6.2",
3
+ "version": "11.0.1",
4
4
  "description": "Native Rust functionality via N-API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -32,7 +32,7 @@
32
32
  "directory": "packages/natives"
33
33
  },
34
34
  "dependencies": {
35
- "@oh-my-pi/pi-utils": "10.6.2"
35
+ "@oh-my-pi/pi-utils": "11.0.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^25.2.0"
package/src/grep/types.ts CHANGED
@@ -130,11 +130,6 @@ export interface SearchResult {
130
130
  error?: string;
131
131
  }
132
132
 
133
- /** Legacy alias for WASM match output. */
134
- export type WasmMatch = SearchMatch;
135
- /** Legacy alias for WASM search output. */
136
- export type WasmSearchResult = SearchResult;
137
-
138
133
  /** Options for fuzzy file path search. */
139
134
  export interface FuzzyFindOptions extends Cancellable {
140
135
  /** Substring query to match against file paths (case-insensitive). */
package/src/native.ts CHANGED
@@ -8,7 +8,9 @@ import * as fs from "node:fs";
8
8
  import { createRequire } from "node:module";
9
9
  import * as os from "node:os";
10
10
  import * as path from "node:path";
11
- import packageJson from "../package.json" with { type: "json" };
11
+ import { $env } from "@oh-my-pi/pi-utils";
12
+
13
+ import packageJson from "../package.json";
12
14
  import type { NativeBindings } from "./bindings";
13
15
  import { embeddedAddon } from "./embedded-addon";
14
16
 
@@ -64,7 +66,7 @@ const compiledCandidates = [
64
66
  ];
65
67
 
66
68
  const releaseCandidates = isCompiledBinary ? [...compiledCandidates, ...baseReleaseCandidates] : baseReleaseCandidates;
67
- const candidates = process.env.OMP_DEV ? [...debugCandidates, ...releaseCandidates] : releaseCandidates;
69
+ const candidates = $env.PI_DEV ? [...debugCandidates, ...releaseCandidates] : releaseCandidates;
68
70
 
69
71
  function maybeExtractEmbeddedAddon(errors: string[]): string | null {
70
72
  if (!isCompiledBinary || !embeddedAddon) return null;
@@ -109,12 +111,12 @@ function loadNative(): NativeBindings {
109
111
  try {
110
112
  const bindings = require(candidate) as NativeBindings;
111
113
  validateNative(bindings, candidate);
112
- if (process.env.OMP_DEV) {
114
+ if ($env.PI_DEV) {
113
115
  console.log(`Loaded native addon from ${candidate}`);
114
116
  }
115
117
  return bindings;
116
118
  } catch (err) {
117
- if (process.env.OMP_DEV) {
119
+ if ($env.PI_DEV) {
118
120
  console.error(`Error loading native addon from ${candidate}:`, err);
119
121
  }
120
122
  const message = err instanceof Error ? err.message : String(err);