Skip to content

Commit 883657e

Browse files
style: run prettier on modified files
1 parent 420b2dc commit 883657e

File tree

14 files changed

+53
-68
lines changed

14 files changed

+53
-68
lines changed

packages/wasm-utxo/.mocharc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extensions": ["ts", "tsx", "js", "jsx"],
33
"spec": ["test/**/*.ts"],
4-
"node-option": [
5-
"import=tsx/esm",
6-
"experimental-wasm-modules"
7-
]
4+
"node-option": ["import=tsx/esm", "experimental-wasm-modules"]
85
}

packages/wasm-utxo/bundler-test/test-cjs-import.cjs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,46 @@
33
* Run with: node bundler-test/test-cjs-import.cjs
44
*/
55

6-
console.log('Testing CommonJS require() compatibility...\n');
6+
console.log("Testing CommonJS require() compatibility...\n");
77

88
// Use standard CommonJS require
99
let wasmUtxo;
1010
try {
11-
wasmUtxo = require('../dist/cjs/index.js');
11+
wasmUtxo = require("../dist/cjs/index.js");
1212
} catch (error) {
13-
console.error('✗ require() failed:', error.message);
13+
console.error("✗ require() failed:", error.message);
1414
process.exit(1);
1515
}
1616

17-
console.log('✓ require() successful from CJS context');
18-
console.log('✓ Available exports:', Object.keys(wasmUtxo).join(', '));
17+
console.log("✓ require() successful from CJS context");
18+
console.log("✓ Available exports:", Object.keys(wasmUtxo).join(", "));
1919

2020
// Test that we can access the main APIs
2121
if (wasmUtxo.Descriptor) {
22-
console.log('✓ Descriptor API available');
22+
console.log("✓ Descriptor API available");
2323
}
2424
if (wasmUtxo.Psbt) {
25-
console.log('✓ Psbt API available');
25+
console.log("✓ Psbt API available");
2626
}
2727
if (wasmUtxo.address) {
28-
console.log('✓ address namespace available');
28+
console.log("✓ address namespace available");
2929
}
3030
if (wasmUtxo.fixedScriptWallet) {
31-
console.log('✓ fixedScriptWallet namespace available');
31+
console.log("✓ fixedScriptWallet namespace available");
3232
}
3333

3434
// Try to use the Descriptor API
3535
try {
3636
const descriptor = wasmUtxo.Descriptor.fromString(
37-
'wpkh(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/0/*)',
38-
'derivable'
37+
"wpkh(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/0/*)",
38+
"derivable",
3939
);
40-
console.log('✓ Descriptor.fromString() works');
41-
console.log(' Descriptor type:', descriptor.descType());
40+
console.log("✓ Descriptor.fromString() works");
41+
console.log(" Descriptor type:", descriptor.descType());
4242
} catch (err) {
43-
console.log('✗ Descriptor test failed:', err.message);
43+
console.log("✗ Descriptor test failed:", err.message);
4444
process.exit(1);
4545
}
4646

47-
console.log('\n✅ All CJS compatibility tests passed!');
48-
console.log('\nCJS consumers can use standard require() with this package.');
49-
47+
console.log("\n✅ All CJS compatibility tests passed!");
48+
console.log("\nCJS consumers can use standard require() with this package.");

packages/wasm-utxo/bundler-test/test-esm-import.mjs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,33 @@
33
* Run with: node --experimental-wasm-modules bundler-test/test-esm-import.mjs
44
*/
55

6-
import { Descriptor, Psbt, address, fixedScriptWallet } from '../dist/esm/index.js';
6+
import { Descriptor, Psbt, address, fixedScriptWallet } from "../dist/esm/index.js";
77

8-
console.log('Testing ESM import...\n');
8+
console.log("Testing ESM import...\n");
99

10-
console.log('✓ ESM import successful');
11-
console.log('✓ Descriptor API available');
12-
console.log('✓ Psbt API available');
13-
console.log('✓ address namespace available');
14-
console.log('✓ fixedScriptWallet namespace available');
10+
console.log("✓ ESM import successful");
11+
console.log("✓ Descriptor API available");
12+
console.log("✓ Psbt API available");
13+
console.log("✓ address namespace available");
14+
console.log("✓ fixedScriptWallet namespace available");
1515

1616
// Test that we can use the Descriptor API
1717
try {
1818
const descriptor = Descriptor.fromString(
19-
'wpkh(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/0/*)',
20-
'derivable'
19+
"wpkh(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/0/*)",
20+
"derivable",
2121
);
22-
console.log('✓ Descriptor.fromString() works');
23-
console.log(' Descriptor type:', descriptor.descType());
24-
22+
console.log("✓ Descriptor.fromString() works");
23+
console.log(" Descriptor type:", descriptor.descType());
24+
2525
// Test address derivation
2626
const derived = descriptor.atDerivationIndex(0);
27-
console.log('✓ Descriptor derivation works');
28-
console.log(' Script pubkey length:', derived.scriptPubkey().length);
27+
console.log("✓ Descriptor derivation works");
28+
console.log(" Script pubkey length:", derived.scriptPubkey().length);
2929
} catch (err) {
30-
console.log('✗ Descriptor test failed:', err.message);
30+
console.log("✗ Descriptor test failed:", err.message);
3131
process.exit(1);
3232
}
3333

34-
console.log('\n✅ All ESM tests passed!');
35-
console.log('\nThis is the primary/recommended way to use this package.');
36-
34+
console.log("\n✅ All ESM tests passed!");
35+
console.log("\nThis is the primary/recommended way to use this package.");

packages/wasm-utxo/test/address/utxolibCompat.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import { dirname } from "node:path";
55

66
import * as utxolib from "@bitgo/utxo-lib";
77
import assert from "node:assert";
8-
import { utxolibCompat, address as addressNs, type CoinName, AddressFormat } from "../../js/index.js";
8+
import {
9+
utxolibCompat,
10+
address as addressNs,
11+
type CoinName,
12+
AddressFormat,
13+
} from "../../js/index.js";
914

1015
const __filename = fileURLToPath(import.meta.url);
1116
const __dirname = dirname(__filename);

packages/wasm-utxo/test/fixtures/0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"ast": {
1313
"pk": "03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd"
1414
}
15-
}
15+
}

packages/wasm-utxo/test/fixtures/1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"ast": {
1313
"pk": "03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd"
1414
}
15-
}
15+
}

packages/wasm-utxo/test/fixtures/10.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
"ast": {
99
"pkh": "04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235"
1010
}
11-
}
11+
}

packages/wasm-utxo/test/fixtures/11.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
"ast": {
99
"pkh": "04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235"
1010
}
11-
}
11+
}

packages/wasm-utxo/test/fixtures/12.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
"pk": "03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd"
1717
}
1818
}
19-
}
19+
}

packages/wasm-utxo/test/fixtures/13.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
"pk": "03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd"
1717
}
1818
}
19-
}
19+
}

0 commit comments

Comments
 (0)