fix(pkg): include auth/ and operator/ in published files[]#27
Closed
Sentinel-Bluebuilder wants to merge 1 commit intomasterfrom
Closed
fix(pkg): include auth/ and operator/ in published files[]#27Sentinel-Bluebuilder wants to merge 1 commit intomasterfrom
Sentinel-Bluebuilder wants to merge 1 commit intomasterfrom
Conversation
The 2.7.0 npm tarball is broken: index.js re-exports from ./auth/ (adr36,
keplr-signdoc, privy-cosmos-signer) and ./operator/ (auto-lease, batch-revoke,
feegrant-history, plan-ownership), but neither directory was listed in the
package.json files[] array. As a result, `import 'blue-js-sdk'` from a fresh
install fails with:
Cannot find module '.../node_modules/blue-js-sdk/auth/adr36.js'
Cannot find module '.../node_modules/blue-js-sdk/operator/auto-lease.js'
Reproduced against the published tarball (npm pack [email protected]):
tar tzf blue-js-sdk-2.7.0.tgz | grep -E '(auth|operator)/' # empty
After this patch the same command lists 7 files (3 auth + 4 operator).
The fix is to add "auth/" and "operator/" to files[]. Verified locally by
re-packing and confirming `import('blue-js-sdk')` returns 401 exports
including PrivyCosmosSigner.
Owner
Author
|
Superseded by #31 which adds the same fix plus CI tarball-install verification to prevent recurrence. |
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.
Summary
The 2.7.0 npm tarball ships incomplete:
index.jsre-exports from./auth/(adr36,keplr-signdoc,privy-cosmos-signer) and./operator/(auto-lease,batch-revoke,feegrant-history,plan-ownership), but neither directory was listed inpackage.jsonfiles[]. A freshnpm install [email protected]therefore breaks at import time:```
Cannot find module '.../node_modules/blue-js-sdk/auth/adr36.js' imported from '.../node_modules/blue-js-sdk/index.js'
Cannot find module '.../node_modules/blue-js-sdk/operator/auto-lease.js' imported from '.../node_modules/blue-js-sdk/index.js'
```
This blocks the published Privy adapter (
PrivyCosmosSigner,privyCosmosSignerFromMnemonic, etc.) from being usable downstream.Reproduction (against the live npm tarball)
```bash
npm pack [email protected]
tar tzf blue-js-sdk-2.7.0.tgz | grep -E '(auth|operator)/'
(empty — neither directory is in the tarball)
```
Fix
Add `"auth/"` and `"operator/"` to
files[].Verification
After the patch, re-packing locally:
```bash
npm pack
tar tzf blue-js-sdk-2.7.0.tgz | grep -E '(auth|operator)/'
package/auth/adr36.js
package/auth/keplr-signdoc.js
package/auth/privy-cosmos-signer.js
package/operator/auto-lease.js
package/operator/batch-revoke.js
package/operator/feegrant-history.js
package/operator/plan-ownership.js
```
And
import('blue-js-sdk')resolves cleanly with all 401 exports includingPrivyCosmosSigner.Test plan
npm packand confirmauth/+operator/appear in the tarballnode -e "import('blue-js-sdk').then(m => console.log(Object.keys(m).length))"succeeds and reports >= 401 exports