Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
realaravinth committed Oct 28, 2023
1 parent 31554eb commit f565ed0
Show file tree
Hide file tree
Showing 3 changed files with 2,341 additions and 2,065 deletions.
50 changes: 27 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
"name": "@mcaptcha/pow_sha256-polyfill",
"version": "0.1.0-alpha-1",
"license": "(MIT OR Apache-2.0)",
"keywords": ["mCaptcha", "CAPTCHA", "proof of work"],
"keywords": [
"mCaptcha",
"CAPTCHA",
"proof of work"
],
"browser": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist"],

"files": [
"dist"
],
"homepage": "https://mcaptcha.org",
"bugs": {
"url": "https://github.com/mCaptcha/pow_sha256-polyfill/issues",
Expand Down Expand Up @@ -35,7 +40,6 @@
"url": "https://liberapay.com/realaravinth"
}
],

"scripts": {
"build": "webpack --mode production",
"doc": "yarn typedoc src/index.ts",
Expand All @@ -44,26 +48,26 @@
"test": "yarn jest"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/jsdom": "^16.2.13",
"@types/node": "^16.10.6",
"@types/sinon": "^10.0.4",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"copy-webpack-plugin": "^9.0.1",
"@types/jest": "^29.5.6",
"@types/jsdom": "^21.1.4",
"@types/node": "^20.8.9",
"@types/sinon": "^10.0.20",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"copy-webpack-plugin": "^11.0.0",
"dart-sass": "^1.25.0",
"eslint": "^8.4.1",
"jest": "^27.2.5",
"jsdom": "^18.0.0",
"rimraf": "^3.0.0",
"sinon": "^11.1.2",
"ts-jest": "^27.0.5",
"ts-loader": "^9.2.6",
"ts-node": "^10.3.0",
"typedoc": "^0.22.10",
"typescript": "^4.4.4",
"webpack": "^5.58.2",
"eslint": "^8.52.0",
"jest": "^29.7.0",
"jsdom": "^22.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"ts-jest": "^29.1.1",
"ts-loader": "^9.5.0",
"ts-node": "^10.9.1",
"typedoc": "^0.25.2",
"typescript": "^5.2.2",
"webpack": "^5.89.0",
"webpack-cli": "^4.9.0",
"webpack-dev-server": "^4.3.1"
"webpack-dev-server": "^4.15.1"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const generate_work = async (
const base = salt + serialized_phrase;
let nonce = 0;
let result: BigInt = BigInt(0);
const difficulty_new = U128_MAX - U128_MAX / BigInt(difficulty);
const difficulty_new: BigInt = U128_MAX - U128_MAX / BigInt(difficulty);
while (result < difficulty_new) {
nonce += 1;
const hash = await digest(base + nonce.toString());
Expand Down
Loading

0 comments on commit f565ed0

Please sign in to comment.