Skip to content

Commit c71b7c4

Browse files
authored
Improves/size (#357)
* Improve import * update packges * Replace some forge usage * Remove more funcs * Fix crypto * Remove node-forge methods * Fix crypto when test * Remove qs * Improve type import * Remove buffer * Fix size-limit plugin * Fix pakage-lock.json * Revert ky * Isolate blaze client
1 parent 740182a commit c71b7c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+24173
-24883
lines changed

example/create_user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const main = async () => {
2020
},
2121
});
2222

23-
const { privateKey: spendPrivateKey, publicKey: spendPublicKey } = getED25519KeyPair();
23+
const { seed: spendPrivateKey, publicKey: spendPublicKey } = getED25519KeyPair();
2424
const spend_private_key = spendPrivateKey.toString('hex');
2525
console.log('user spend_private_key', spend_private_key);
2626
await userClient.pin.updateTipPin('', spendPublicKey.toString('hex'), user.tip_counter + 1);

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module.exports = {
22
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\](?!(axios|is-retry-allowed)).+\\.(js|jsx)$'],
3+
setupFilesAfterEnv: ['<rootDir>/test/crypto.ts'],
34
};

package-lock.json

Lines changed: 13518 additions & 20812 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,15 @@
5252
],
5353
"devDependencies": {
5454
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
55+
"@size-limit/esbuild": "11.1.5",
56+
"@size-limit/esbuild-why": "11.1.5",
5557
"@size-limit/preset-small-lib": "^11.1.5",
5658
"@types/eslint": "^8.4.2",
5759
"@types/eslint-config-prettier": "^6.11.2",
5860
"@types/eslint-plugin-prettier": "^3.1.0",
5961
"@types/jest": "^29.0.1",
6062
"@types/lodash.merge": "^4.6.7",
63+
"@types/md5": "^2.3.5",
6164
"@types/node": "^18.0.0",
6265
"@types/node-forge": "^1.3.8",
6366
"@types/pako": "^2.0.0",
@@ -67,35 +70,36 @@
6770
"@types/ws": "^8.5.3",
6871
"@typescript-eslint/eslint-plugin": "^5.27.0",
6972
"@typescript-eslint/parser": "^5.27.0",
73+
"buffer": "^6.0.3",
7074
"eslint": "^8.16.0",
7175
"eslint-config-airbnb-base": "^15.0.0",
7276
"eslint-config-prettier": "^9.1.0",
7377
"eslint-import-resolver-typescript": "^3.1.3",
7478
"eslint-plugin-import": "^2.26.0",
7579
"eslint-plugin-jest": "^27.0.1",
7680
"eslint-plugin-prettier": "^4.0.0",
81+
"node-forge": "^1.3.1",
7782
"prettier": "^3.3.3",
78-
"size-limit": "^8.1.0",
83+
"size-limit": "11.1.5",
7984
"tsdx": "^0.14.1",
8085
"tslib": "^2.4.0",
8186
"typescript": "^4.7.2",
8287
"yarn-upgrade-all": "^0.7.1"
8388
},
8489
"dependencies": {
90+
"@noble/ciphers": "^1.0.0",
8591
"@noble/curves": "^1.2.0",
86-
"@noble/hashes": "^1.3.2",
87-
"@types/qs": "^6.9.10",
92+
"@noble/hashes": "^1.5.0",
8893
"axios": "1.7.7",
8994
"axios-retry": "3.4.0",
9095
"bignumber.js": "^9.1.2",
9196
"bs58": "^5.0.0",
9297
"int64-buffer": "^1.0.1",
9398
"is-retry-allowed": "2.2.0",
9499
"lodash.merge": "^4.6.2",
100+
"md5": "^2.3.0",
95101
"nano-seconds": "^1.2.2",
96-
"node-forge": "^1.3.1",
97102
"pako": "^2.0.4",
98-
"qs": "^6.11.2",
99103
"serialize-javascript": "^6.0.0",
100104
"uuid": "^9.0.0",
101105
"ws": "^8.7.0"
@@ -104,6 +108,11 @@
104108
"example": "example",
105109
"test": "test"
106110
},
111+
"jest": {
112+
"moduleNameMapper": {
113+
"^axios$": "axios/dist/node/axios.cjs"
114+
}
115+
},
107116
"publishConfig": {
108117
"access": "public",
109118
"registry": "https://registry.npmjs.org/"

0 commit comments

Comments
 (0)