@neevcode/neev 0.0.0-dev-202607151341 → 0.0.0-dev-202607161023
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/bin/neevcode +9 -7
- package/package.json +13 -13
- package/postinstall.mjs +8 -5
package/bin/neevcode
CHANGED
|
@@ -57,11 +57,11 @@ if (!arch) {
|
|
|
57
57
|
arch = os.arch()
|
|
58
58
|
}
|
|
59
59
|
const base = "@neevcode/neev-" + platform + "-" + arch
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
const
|
|
60
|
+
// Platform packages ship their executable as bin/neev(.exe) — the name comes
|
|
61
|
+
// from script/build.ts's compile outfile. Pre-rebrand packages shipped
|
|
62
|
+
// bin/opencode(.exe); keep the fallback so an older platform package found up
|
|
63
|
+
// the node_modules tree still resolves.
|
|
64
|
+
const binaries = platform === "windows" ? ["neev.exe", "opencode.exe"] : ["neev", "opencode"]
|
|
65
65
|
|
|
66
66
|
function supportsAvx2() {
|
|
67
67
|
if (arch !== "x64") return false
|
|
@@ -164,8 +164,10 @@ function findBinary(startDir) {
|
|
|
164
164
|
const modules = path.join(current, "node_modules")
|
|
165
165
|
if (fs.existsSync(modules)) {
|
|
166
166
|
for (const name of names) {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
for (const binary of binaries) {
|
|
168
|
+
const candidate = path.join(modules, name, "bin", binary)
|
|
169
|
+
if (fs.existsSync(candidate)) return candidate
|
|
170
|
+
}
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
const parent = path.dirname(current)
|
package/package.json
CHANGED
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.0.0-dev-
|
|
9
|
+
"version": "0.0.0-dev-202607161023",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"@neevcode/neev-linux-x64": "0.0.0-dev-
|
|
13
|
-
"@neevcode/neev-linux-
|
|
14
|
-
"@neevcode/neev-linux-arm64": "0.0.0-dev-
|
|
15
|
-
"@neevcode/neev-
|
|
16
|
-
"@neevcode/neev-linux-x64
|
|
17
|
-
"@neevcode/neev-windows-
|
|
18
|
-
"@neevcode/neev-
|
|
19
|
-
"@neevcode/neev-
|
|
20
|
-
"@neevcode/neev-
|
|
21
|
-
"@neevcode/neev-
|
|
22
|
-
"@neevcode/neev-
|
|
23
|
-
"@neevcode/neev-darwin-x64": "0.0.0-dev-
|
|
12
|
+
"@neevcode/neev-linux-x64-musl": "0.0.0-dev-202607161023",
|
|
13
|
+
"@neevcode/neev-linux-arm64-musl": "0.0.0-dev-202607161023",
|
|
14
|
+
"@neevcode/neev-linux-arm64": "0.0.0-dev-202607161023",
|
|
15
|
+
"@neevcode/neev-windows-x64-baseline": "0.0.0-dev-202607161023",
|
|
16
|
+
"@neevcode/neev-linux-x64": "0.0.0-dev-202607161023",
|
|
17
|
+
"@neevcode/neev-windows-arm64": "0.0.0-dev-202607161023",
|
|
18
|
+
"@neevcode/neev-windows-x64": "0.0.0-dev-202607161023",
|
|
19
|
+
"@neevcode/neev-linux-x64-baseline-musl": "0.0.0-dev-202607161023",
|
|
20
|
+
"@neevcode/neev-darwin-arm64": "0.0.0-dev-202607161023",
|
|
21
|
+
"@neevcode/neev-darwin-x64-baseline": "0.0.0-dev-202607161023",
|
|
22
|
+
"@neevcode/neev-linux-x64-baseline": "0.0.0-dev-202607161023",
|
|
23
|
+
"@neevcode/neev-darwin-x64": "0.0.0-dev-202607161023"
|
|
24
24
|
}
|
|
25
25
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -35,9 +35,10 @@ const archMap = {
|
|
|
35
35
|
const platform = platformMap[os.platform()] || os.platform()
|
|
36
36
|
const arch = archMap[os.arch()] || os.arch()
|
|
37
37
|
const base = `${packageBase}-${platform}-${arch}`
|
|
38
|
-
// Platform packages ship their executable as bin/
|
|
39
|
-
// outfile) — keep in sync with
|
|
40
|
-
|
|
38
|
+
// Platform packages ship their executable as bin/neev(.exe) (script/build.ts
|
|
39
|
+
// outfile); pre-rebrand packages shipped bin/opencode(.exe) — keep in sync with
|
|
40
|
+
// the `binaries` constant in bin/neevcode.
|
|
41
|
+
const binaryNames = platform === "windows" ? ["neev.exe", "opencode.exe"] : ["neev", "opencode"]
|
|
41
42
|
|
|
42
43
|
function supportsAvx2() {
|
|
43
44
|
if (arch !== "x64") return false
|
|
@@ -115,8 +116,10 @@ function findBinary() {
|
|
|
115
116
|
for (const name of names) {
|
|
116
117
|
try {
|
|
117
118
|
const packageJsonPath = require.resolve(`${name}/package.json`)
|
|
118
|
-
const
|
|
119
|
-
|
|
119
|
+
for (const binaryName of binaryNames) {
|
|
120
|
+
const binaryPath = path.join(path.dirname(packageJsonPath), "bin", binaryName)
|
|
121
|
+
if (fs.existsSync(binaryPath)) return binaryPath
|
|
122
|
+
}
|
|
120
123
|
} catch {
|
|
121
124
|
continue
|
|
122
125
|
}
|