Skip to content

Commit

Permalink
Added jsr.json
Browse files Browse the repository at this point in the history
  • Loading branch information
zigazajc007 committed Aug 31, 2024
1 parent 1e0c186 commit 1076294
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 17 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish
on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Publish package
run: npx jsr publish
2 changes: 1 addition & 1 deletion browser/argon2id_worker.js

Large diffs are not rendered by default.

Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/argon2id_worker.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@rabbit-company/argon2id",
"version": "2.0.1",
"exports": "./src/argon2id.ts",
"publish": {
"include": [
"LICENSE",
"README.md",
"src/argon2id.ts",
"src/argon2id_worker.ts",
"src/argon2id_wasm.js",
"src/argon2id_wasm.d.ts",
"src/argon2id_wasm_bg.wasm",
"src/argon2id_wasm_bg.wasm.d.ts"
]
}
}
6 changes: 1 addition & 5 deletions module/argon2id_worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rabbit-company/argon2id",
"version": "2.0.0",
"version": "2.0.1",
"description": "Argon2id hash function",
"main": "./module/argon2id.js",
"browser": "./module/argon2id.js",
Expand Down Expand Up @@ -41,12 +41,12 @@
"security"
],
"devDependencies": {
"@types/bun": "latest",
"@types/bun": "^1.1.8",
"bun-plugin-dts": "^0.2.3",
"wasm-pack": "^0.13.0",
"@rabbit-company/logger": "^4.0.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
"typescript": "^5.5.4"
}
}
12 changes: 5 additions & 7 deletions src/argon2id_worker.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import init, {argon2id_hash} from "./argon2id_wasm.js";
import init, { argon2id_hash } from "./argon2id_wasm.js";

onmessage = (e) => {
init().then(() => {
postMessage({ output: argon2id_hash(e.data[0], e.data[1], e.data[2], e.data[3], e.data[4], e.data[5]) });
}).catch(error =>{
postMessage({error})
});
}
init()
.then(() => postMessage({ output: argon2id_hash(e.data[0], e.data[1], e.data[2], e.data[3], e.data[4], e.data[5]) }))
.catch((error) => postMessage({ error }));
};

0 comments on commit 1076294

Please sign in to comment.