js: rm default process.env.RESOLC_BIN (#411)

Ran into this today, my env was set and pointing to an old version
so it's a breaking change, but I think we are better off not hardcoding
the env here, the user can do whatever they want when they invoke
compile
This commit is contained in:
PG Herveou
2025-11-13 10:16:34 +01:00
committed by GitHub
parent 878ca91689
commit 8ee1860f12
+2 -2
View File
@@ -101,7 +101,7 @@ export async function compile(
enabled: true, enabled: true,
runs: 200, runs: 200,
}, },
bin = process.env.RESOLC_BIN, bin,
} = option } = option
const input = JSON.stringify({ const input = JSON.stringify({
@@ -128,7 +128,7 @@ export async function compile(
* resolve the package root * resolve the package root
* use resolve-pkg to find the package root, and fallback to using require.resolve if the package defines an exports field * use resolve-pkg to find the package root, and fallback to using require.resolve if the package defines an exports field
* see https://github.com/sindresorhus/resolve-pkg/issues/9 * see https://github.com/sindresorhus/resolve-pkg/issues/9
**/ */
function resolvePkgRoot(basePackage: string) { function resolvePkgRoot(basePackage: string) {
const packageRoot = resolvePkg(basePackage) const packageRoot = resolvePkg(basePackage)
if (packageRoot) { if (packageRoot) {