Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/deno-npm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initialize from "npm:@phi-ag/argon2/node";

const argon2 = await initialize();
console.log(argon2.hash("my secret password"));
12 changes: 12 additions & 0 deletions examples/deno.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//import initialize from "jsr:@peterhirn/test@0.0.5/node";
import Argon2 from "jsr:@peterhirn/test@0.0.5";
import wasm from "jsr:@peterhirn/test@0.0.5/argon2.wasm";

const argon2 = await Argon2.initializeModule(wasm);

//const argon2 = await initialize();

const password = "my secret password";
const { encoded } = argon2.hash(password);

argon2.verify(encoded, password);
14 changes: 14 additions & 0 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@peterhirn/test",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "@peterhirn/test",
"name": "@phi-ag/argon2",

Why not having the samething that npm ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was only used for testing.

"version": "0.0.5",
"exports": {
".": "./src/index.ts",
"./node": "./src/node.ts",
"./fetch": "./src/fetch.ts",
"./argon2.wasm": "./src/argon2.wasm"
},
"publish": {
"include": ["LICENSE", "README.md", "src/*.ts", "src/argon2.wasm"],
"exclude": ["src/*.test.ts", "src/*.bench.ts"]
}
}
9 changes: 8 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
],
"packages": {
".": {
"changelog-path": "CHANGELOG.md"
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "json",
"path": "jsr.json",
"jsonpath": "$.version"
}
]
}
}
}
Loading