feat(ESM): Converted code base to ESM format, away from CommonJS

This commit is contained in:
Chris Troutner
2025-11-16 13:37:04 -08:00
parent 76442208a2
commit 8e3fa6dcf1
109 changed files with 1012 additions and 456 deletions
+5 -11
View File
@@ -1,6 +1,7 @@
{
"name": "@psf/bch-js",
"version": "6.0.0",
"type": "module",
"description": "A JavaScript library for working with Bitcoin Cash, eCash, and SLP Tokens",
"author": "Chris Troutner <chris.troutner@gmail.com>",
"contributors": [
@@ -9,7 +10,7 @@
],
"main": "src/bch-js",
"scripts": {
"test": "nyc mocha --trace-warnings --unhandled-rejections=strict --timeout 30000 test/unit/",
"test": "c8 mocha --trace-warnings --unhandled-rejections=strict --timeout 30000 test/unit/",
"test:integration": "npm run test:integration:bchn",
"test:integration:nft": "export RESTURL=https://bchn.fullstack.cash/v5/ && export IS_USING_FREE_TIER=true && mocha --timeout 30000 -g '#nft1' test/integration/chains/bchn/slp.js",
"test:integration:abc": "export RESTURL=https://abc.fullstack.cash/v5/ && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/abc/",
@@ -21,10 +22,6 @@
"test:integration:decatur:bchn": "export RESTURL=http://192.168.2.127:3000/v5/ && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/bchn/",
"test:integration:decatur:abc": "export RESTURL=http://192.168.2.142:3000/v5/ && mocha --timeout 30000 test/integration && mocha --timeout 30000 test/integration/chains/abc/",
"test:integration:temp:bchn": "export RESTURL=http://157.90.174.219:3000/v5/ && mocha --timeout 30000 test/integration/",
"test:temp": "export RESTURL=http://localhost:3000/v5/ && mocha --timeout 30000 -g '#Encryption' test/integration/",
"test:temp2": "mocha --timeout=30000 -g '#TransactionLib' test/unit/",
"test:temp3": "export RESTURL=https://bchn.fullstack.cash/v5/ && mocha --timeout 30000 -g '#DSProof' test/integration/chains/",
"test:temp4": "export RESTURL=http://localhost:3000/v5/ && mocha --timeout 30000 -g '#decodeOpReturn' test/integration/",
"coverage": "nyc --reporter=html mocha --timeout 25000 test/unit/",
"docs": "./node_modules/.bin/apidoc -i src/ -o docs",
"lint": "standard --env mocha --fix"
@@ -63,6 +60,8 @@
},
"devDependencies": {
"apidoc": "0.50.5",
"assert": "2.1.0",
"c8": "10.1.3",
"chai": "4.1.2",
"husky": "4.3.8",
"lodash.clonedeep": "4.5.0",
@@ -70,15 +69,10 @@
"nyc": "15.1.0",
"semantic-release": "19.0.5",
"sinon": "9.2.2",
"standard": "^16.0.4"
"standard": "16.0.4"
},
"apidoc": {
"title": "bch-js",
"url": "bchjs."
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
}
}