Skip to content

Ship evals.json in the npm package - #1

Open
devdudeio wants to merge 1 commit into
VerusCoin:masterfrom
chainvue:fix/ship-evals-json
Open

Ship evals.json in the npm package#1
devdudeio wants to merge 1 commit into
VerusCoin:masterfrom
chainvue:fix/ship-evals-json

Conversation

@devdudeio

Copy link
Copy Markdown

Problem

evals.json exists in this repository but the package.json files whitelist (["index.json", "map.js"]) excludes it from every packed install — npm/pnpm/yarn, including installs of this repo as a git dependency.

The utxo-lib-verus fork of BitGoJS requires the file at module load:

// dist/src/optccparams.js
var EVALS = require('bitcoin-ops/evals.json');

so any downstream project that installs utxo-lib-verus (and thereby this package) crashes at import time with Cannot find module 'bitcoin-ops/evals.json' unless it patches this package locally (e.g. via pnpm patches — which don't apply transitively for that project's own consumers).

Fix

Add evals.json to the files whitelist so the file the code already depends on actually ships. One line, no behavior change otherwise.

Happy to adjust if you'd prefer a different packaging approach.

evals.json exists in this repository but is excluded by the package.json
"files" whitelist, so any packed install (npm/pnpm/yarn, including git
dependencies) omits it. The utxo-lib-verus fork requires it at module
load (dist/src/optccparams.js: require('bitcoin-ops/evals.json')), which
makes downstream installs crash at import time unless they patch this
package locally.

Adding evals.json to "files" ships the file that the code already
depends on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant