Ship evals.json in the npm package - #1
Open
devdudeio wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
evals.jsonexists in this repository but thepackage.jsonfileswhitelist (["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-verusfork of BitGoJS requires the file at module load:so any downstream project that installs
utxo-lib-verus(and thereby this package) crashes at import time withCannot 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.jsonto thefileswhitelist 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.