@neevcode/neev 0.0.0-dev-202607151341 → 0.0.0-dev-202607161626

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 CHANGED
@@ -57,11 +57,11 @@ if (!arch) {
57
57
  arch = os.arch()
58
58
  }
59
59
  const base = "@neevcode/neev-" + platform + "-" + arch
60
- // The platform packages ship their executable as bin/opencode(.exe) — that name
61
- // comes from script/build.ts's compile outfile, not from this wrapper. It must
62
- // stay "opencode" here until the build pipeline renames the shipped artifact,
63
- // or every published @neevcode/neev-* package stops resolving.
64
- const binary = platform === "windows" ? "opencode.exe" : "opencode"
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
- const candidate = path.join(modules, name, "bin", binary)
168
- if (fs.existsSync(candidate)) return candidate
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-202607151341",
9
+ "version": "0.0.0-dev-202607161626",
10
10
  "license": "MIT",
11
11
  "optionalDependencies": {
12
- "@neevcode/neev-linux-x64": "0.0.0-dev-202607151341",
13
- "@neevcode/neev-linux-x64-baseline-musl": "0.0.0-dev-202607151341",
14
- "@neevcode/neev-linux-arm64": "0.0.0-dev-202607151341",
15
- "@neevcode/neev-linux-x64-musl": "0.0.0-dev-202607151341",
16
- "@neevcode/neev-linux-x64-baseline": "0.0.0-dev-202607151341",
17
- "@neevcode/neev-windows-x64-baseline": "0.0.0-dev-202607151341",
18
- "@neevcode/neev-darwin-arm64": "0.0.0-dev-202607151341",
19
- "@neevcode/neev-windows-x64": "0.0.0-dev-202607151341",
20
- "@neevcode/neev-windows-arm64": "0.0.0-dev-202607151341",
21
- "@neevcode/neev-linux-arm64-musl": "0.0.0-dev-202607151341",
22
- "@neevcode/neev-darwin-x64-baseline": "0.0.0-dev-202607151341",
23
- "@neevcode/neev-darwin-x64": "0.0.0-dev-202607151341"
12
+ "@neevcode/neev-linux-x64-musl": "0.0.0-dev-202607161626",
13
+ "@neevcode/neev-linux-arm64-musl": "0.0.0-dev-202607161626",
14
+ "@neevcode/neev-linux-arm64": "0.0.0-dev-202607161626",
15
+ "@neevcode/neev-windows-x64-baseline": "0.0.0-dev-202607161626",
16
+ "@neevcode/neev-linux-x64": "0.0.0-dev-202607161626",
17
+ "@neevcode/neev-windows-arm64": "0.0.0-dev-202607161626",
18
+ "@neevcode/neev-windows-x64": "0.0.0-dev-202607161626",
19
+ "@neevcode/neev-linux-x64-baseline-musl": "0.0.0-dev-202607161626",
20
+ "@neevcode/neev-darwin-arm64": "0.0.0-dev-202607161626",
21
+ "@neevcode/neev-darwin-x64-baseline": "0.0.0-dev-202607161626",
22
+ "@neevcode/neev-linux-x64-baseline": "0.0.0-dev-202607161626",
23
+ "@neevcode/neev-darwin-x64": "0.0.0-dev-202607161626"
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/opencode(.exe) (script/build.ts
39
- // outfile) — keep in sync with the `binary` constant in bin/neevcode.
40
- const binaryName = platform === "windows" ? "opencode.exe" : "opencode"
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 binaryPath = path.join(path.dirname(packageJsonPath), "bin", binaryName)
119
- if (fs.existsSync(binaryPath)) return binaryPath
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
  }