Skip to content

fix(pkg): include auth/ and operator/ in published files[]#27

Closed
Sentinel-Bluebuilder wants to merge 1 commit intomasterfrom
fix/files-array-missing-auth-operator
Closed

fix(pkg): include auth/ and operator/ in published files[]#27
Sentinel-Bluebuilder wants to merge 1 commit intomasterfrom
fix/files-array-missing-auth-operator

Conversation

@Sentinel-Bluebuilder
Copy link
Copy Markdown
Owner

Summary

The 2.7.0 npm tarball ships incomplete: 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 package.json files[]. A fresh npm 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 including PrivyCosmosSigner.

Test plan

  • npm pack and confirm auth/ + operator/ appear in the tarball
  • node -e "import('blue-js-sdk').then(m => console.log(Object.keys(m).length))" succeeds and reports >= 401 exports
  • Republish 2.7.1 (or 2.7.0 retag) once merged

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.
@Sentinel-Bluebuilder
Copy link
Copy Markdown
Owner Author

Superseded by #31 which adds the same fix plus CI tarball-install verification to prevent recurrence.

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