Skip to content

Commit 3337815

Browse files
Fix pipeline
1 parent f8abe52 commit 3337815

File tree

2 files changed

+43
-6
lines changed

2 files changed

+43
-6
lines changed

.changeset/ripe-heads-stop.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
'@xchainjs/xchain-ethereum': patch
88
'@xchainjs/xchain-litecoin': patch
99
'@xchainjs/xchain-bitcoin': patch
10-
'xchainjs-estimate-swap': patch
1110
'@xchainjs/xchain-cosmos': patch
1211
'@xchainjs/xchain-kujira': patch
1312
'@xchainjs/xchain-wallet': patch
@@ -17,16 +16,12 @@
1716
'@xchainjs/xchain-util': patch
1817
'@xchainjs/xchain-bsc': patch
1918
'@xchainjs/xchain-evm': patch
20-
'xchainjs-liquidity': patch
21-
'xchainjs-check-tx': patch
22-
'xchainjs-loans': patch
23-
'txJammer': patch
2419
---
2520

2621
Fix ESM (ECMAScript Module) compatibility issues
2722

2823
- Update bignumber.js to 9.1.2 for proper ESM support
29-
- Change bitcore-lib-cash imports from namespace to default imports for ESM compatibility
24+
- Change bitcore-lib-cash imports from namespace to default imports for ESM compatibility
3025
- Change @dashevo/dashcore-lib imports from namespace to default imports for ESM compatibility
3126
- Add .js extensions to coinselect/accumulative imports for ESM
3227
- Add .js extensions to cosmjs-types imports for ESM

compromised.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
const fs = require('fs')
2+
3+
// Lista de versiones comprometidas conocidas (ejemplos, actualiza cuando salga la lista oficial)
4+
const compromised = {
5+
chalk: ['5.3.0', '5.3.1'],
6+
debug: ['4.3.5', '4.3.6'],
7+
'ansi-styles': ['6.2.1'],
8+
'strip-ansi': ['7.1.1'],
9+
'color-convert': ['2.1.2'],
10+
}
11+
12+
function checkYarnLock(file) {
13+
const content = fs.readFileSync(file, 'utf8')
14+
const results = []
15+
16+
for (const [pkg, versions] of Object.entries(compromised)) {
17+
versions.forEach((ver) => {
18+
// Yarn.lock tiene entradas tipo: chalk@^5.0.0:
19+
const regex = new RegExp(`\\n${pkg}@[^:]+:\\n[\\s\\S]*?version "\\s*${ver}\\s*"`, 'g')
20+
if (regex.test(content)) {
21+
results.push({ name: pkg, version: ver })
22+
}
23+
})
24+
}
25+
26+
return results
27+
}
28+
29+
const file = 'yarn.lock'
30+
if (!fs.existsSync(file)) {
31+
console.error(`No se encontró ${file}`)
32+
process.exit(1)
33+
}
34+
35+
const bad = checkYarnLock(file)
36+
37+
if (bad.length === 0) {
38+
console.log('✅ No se encontraron dependencias comprometidas.')
39+
} else {
40+
console.log('⚠️ Se encontraron dependencias comprometidas:')
41+
console.table(bad)
42+
}

0 commit comments

Comments
 (0)