-
Notifications
You must be signed in to change notification settings - Fork 110
Fix pipeline #1535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pipeline #1535
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,6 @@ | |
| '@xchainjs/xchain-ethereum': patch | ||
| '@xchainjs/xchain-litecoin': patch | ||
| '@xchainjs/xchain-bitcoin': patch | ||
| 'xchainjs-estimate-swap': patch | ||
| '@xchainjs/xchain-cosmos': patch | ||
| '@xchainjs/xchain-kujira': patch | ||
| '@xchainjs/xchain-wallet': patch | ||
|
|
@@ -17,16 +16,12 @@ | |
| '@xchainjs/xchain-util': patch | ||
| '@xchainjs/xchain-bsc': patch | ||
| '@xchainjs/xchain-evm': patch | ||
| 'xchainjs-liquidity': patch | ||
| 'xchainjs-check-tx': patch | ||
| 'xchainjs-loans': patch | ||
| 'txJammer': patch | ||
| --- | ||
|
|
||
| Fix ESM (ECMAScript Module) compatibility issues | ||
|
|
||
| - Update bignumber.js to 9.1.2 for proper ESM support | ||
| - Change bitcore-lib-cash imports from namespace to default imports for ESM compatibility | ||
| - Change bitcore-lib-cash imports from namespace to default imports for ESM compatibility | ||
| - Change @dashevo/dashcore-lib imports from namespace to default imports for ESM compatibility | ||
| - Add .js extensions to coinselect/accumulative imports for ESM | ||
| - Add .js extensions to cosmjs-types imports for ESM | ||
|
Comment on lines
26
to
27
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAudit repo for missing .js extensions on ESM-only paths. Ensure all coinselect/accumulative and cosmjs-types imports include .js where required. Run: 🏁 Script executed: #!/bin/bash
# Find potential imports missing ".js" for the noted modules
rg -nP --type=ts --type=tsx --type=js --type=mjs $'from\\s+[\'"](coinselect/accumulative|cosmjs-types[^\'"]*)[\'"]' -SLength of output: 27 🏁 Script executed: #!/bin/bash
set -uo pipefail
echo "Searching repository for imports/requires/dynamic-imports referencing coinselect/accumulative or cosmjs-types (looking for missing .js extensions)..."
# Search common source file extensions (ts, tsx, js, mjs, jsx)
rg -nP -S -g '**/*.{ts,tsx,js,mjs,jsx}' "from\s+['\"][^'\"]*(?:coinselect/accumulative|cosmjs-types[^'\"]*)['\"]" || true
rg -nP -S -g '**/*.{ts,tsx,js,mjs,jsx}' "require\(['\"][^'\"]*(?:coinselect/accumulative|cosmjs-types[^'\"]*)['\"]\)" || true
rg -nP -S -g '**/*.{ts,tsx,js,mjs,jsx}' "import\(['\"][^'\"]*(?:coinselect/accumulative|cosmjs-types[^'\"]*)['\"]\)" || true
echo "Search complete."Length of output: 1037 Add missing .js extension to a cosmjs-types import
🤖 Prompt for AI Agents |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Default import for bitcore-lib-cash may be unsafe.
If bitcore-lib-cash is CommonJS, default imports require TS esModuleInterop/syntheticDefaultImports or an actual ESM default export. Please confirm the library/version and tsconfig flags.
🌐 Web query:
💡 Result:
No. bitcore-lib-cash is published as CommonJS (package.json has "main":"index.js" and no "module"/ESM export) and its type defs use export = (CommonJS style). Import with require() or a named/namespace import (e.g. import * as bitcore from 'bitcore-lib-cash') rather than a native default ESM import. [1][2]
Sources:
[1] package.json from the published package (shows "main": "index.js" and no "module" field). [unpkg]. (app.unpkg.com)
[2] DefinitelyTyped / @types/bitcore-lib-cash indicates CJS-style export (= export =). (npmjs.com)
Citations:
Don't switch bitcore-lib-cash to a default ESM import — it's CommonJS
bitcore-lib-cash is published as CommonJS (package.json only has "main" and types use
export =), soimport bitcore from 'bitcore-lib-cash'is unsafe. Revert/update the changeset entry (.changeset/ripe-heads-stop.md lines 24–25) and either keep the namespace import (import * as bitcore from 'bitcore-lib-cash'), enable esModuleInterop/allowSyntheticDefaultImports in tsconfig, or only switch once the package provides an ESM default export. Confirm which approach you choose.🤖 Prompt for AI Agents