diff --git a/.github/workflows/ci_bun.yml b/.github/workflows/ci_bun.yml index ab2d2b520..0fcc2011d 100644 --- a/.github/workflows/ci_bun.yml +++ b/.github/workflows/ci_bun.yml @@ -33,7 +33,7 @@ jobs: - name: Prepare test for ./x/core working-directory: ./x/core run: | - deno run -A dnt.ts 0.0.0 + deno run -A dnt.ts deno task minify > ../dhkem-x25519/test/runtimes/hpke-core.js deno task minify > ../dhkem-x448/test/runtimes/hpke-core.js deno task minify > ../hybridkem-x25519-kyber768/test/runtimes/hpke-core.js @@ -51,7 +51,7 @@ jobs: - name: Prepare test for ./x/chacha20poly1305 working-directory: ./x/chacha20poly1305 run: | - deno run -A dnt.ts 0.0.0 + deno run -A dnt.ts - name: Run npm pack for ./x/chacha20poly1305 working-directory: ./npm-packages/x/chacha20poly1305 run: npm pack @@ -109,7 +109,7 @@ jobs: - name: Prepare test for ./x/hpke-js working-directory: ./x/hpke-js run: | - deno run -A dnt.ts 0.0.0 + deno run -A dnt.ts deno task minify > test/runtimes/hpke.js - name: Run npm pack for ./x/hpke-js working-directory: ./npm-packages/x/hpke-js diff --git a/.github/workflows/ci_cloudflare.yml b/.github/workflows/ci_cloudflare.yml index 9007d7048..eb4aec162 100644 --- a/.github/workflows/ci_cloudflare.yml +++ b/.github/workflows/ci_cloudflare.yml @@ -25,7 +25,7 @@ jobs: - name: Prepare test for ./x/core working-directory: ./x/core run: | - deno run -A dnt.ts 0.0.0 + deno run -A dnt.ts deno task minify > ../chacha20poly1305/test/runtimes/hpke-core.js deno task minify > ../dhkem-x25519/test/runtimes/hpke-core.js deno task minify > ../dhkem-x448/test/runtimes/hpke-core.js @@ -103,7 +103,7 @@ jobs: deno test dhkem-secp256k1.spec.ts --allow-net --config ../../../deno.json - name: Prepare test for hpke-js working-directory: ./x/hpke-js - run: deno run -A dnt.ts 0.0.0 + run: deno run -A dnt.ts - name: Run npm pack for ./x/hpke-js working-directory: ./npm-packages/x/hpke-js run: npm pack diff --git a/x/chacha20poly1305/deno.json b/x/chacha20poly1305/deno.json index 09aa04410..38b174444 100644 --- a/x/chacha20poly1305/deno.json +++ b/x/chacha20poly1305/deno.json @@ -46,7 +46,7 @@ "tasks": { "test": "deno fmt && deno lint && deno test test -A --fail-fast --doc --coverage=coverage --parallel --allow-read", "cov": "deno coverage ./coverage --lcov --exclude='test'", - "dnt": "deno run -A dnt.ts $(git describe --tags $(git rev-list --tags --max-count=1))", + "dnt": "deno run -A dnt.ts", "minify": "esbuild ../../npm-packages/x/chacha20poly1305/esm/chacha20poly1305/mod.js --bundle --format=esm --minify" } } diff --git a/x/chacha20poly1305/dnt.ts b/x/chacha20poly1305/dnt.ts index eaaee6e77..f8c9d2218 100644 --- a/x/chacha20poly1305/dnt.ts +++ b/x/chacha20poly1305/dnt.ts @@ -2,6 +2,8 @@ import { build, emptyDir } from "@deno/dnt"; await emptyDir("../../npm-packages/x/chacha20poly1305"); +const denoPkg = JSON.parse(await Deno.readTextFile("./deno.json")); + await build({ entryPoints: ["./mod.ts"], outDir: "../../npm-packages/x/chacha20poly1305", @@ -17,8 +19,8 @@ await build({ deno: "dev", }, package: { - name: "@hpke/chacha20poly1305", - version: Deno.args[0], + name: denoPkg.name, + version: denoPkg.version, description: "A Hybrid Public Key Encryption (HPKE) module extension for ChaCha20/Poly1305", repository: { diff --git a/x/chacha20poly1305/test/runtimes/bun/package.json b/x/chacha20poly1305/test/runtimes/bun/package.json index 77378ef80..25357e7ee 100644 --- a/x/chacha20poly1305/test/runtimes/bun/package.json +++ b/x/chacha20poly1305/test/runtimes/bun/package.json @@ -9,7 +9,7 @@ "typescript": "^5.0.0" }, "dependencies": { - "@hpke/chacha20poly1305": "file:../../../../../npm-packages/x/chacha20poly1305/hpke-chacha20poly1305-0.0.0.tgz", - "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz" + "@hpke/chacha20poly1305": "file:../../../../../npm-packages/x/chacha20poly1305/hpke-chacha20poly1305-1.2.9.tgz", + "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-1.2.9.tgz" } } diff --git a/x/core/deno.json b/x/core/deno.json index a3a09f995..47d62637a 100644 --- a/x/core/deno.json +++ b/x/core/deno.json @@ -50,7 +50,7 @@ "tasks": { "test": "deno fmt && deno lint && deno test test -A --fail-fast --doc --coverage=coverage --parallel --allow-read", "cov": "deno coverage ./coverage --lcov --exclude='test'", - "dnt": "deno run -A dnt.ts $(git describe --tags $(git rev-list --tags --max-count=1))", + "dnt": "deno run -A dnt.ts", "minify": "esbuild ../../npm-packages/x/core/esm/mod.js --bundle --format=esm --minify" } } diff --git a/x/core/dnt.ts b/x/core/dnt.ts index 511bbaf2c..d41a43429 100644 --- a/x/core/dnt.ts +++ b/x/core/dnt.ts @@ -2,6 +2,8 @@ import { build, emptyDir } from "@deno/dnt"; await emptyDir("../../npm-packages/x/core"); +const denoPkg = JSON.parse(await Deno.readTextFile("./deno.json")); + await build({ entryPoints: ["./mod.ts"], outDir: "../../npm-packages/x/core", @@ -17,8 +19,8 @@ await build({ deno: "dev", }, package: { - name: "@hpke/core", - version: Deno.args[0], + name: denoPkg.name, + version: denoPkg.version, description: "A Hybrid Public Key Encryption (HPKE) core module for various JavaScript runtimes", repository: { diff --git a/x/core/test/runtimes/bun/package.json b/x/core/test/runtimes/bun/package.json index 05c66a699..067ba477a 100644 --- a/x/core/test/runtimes/bun/package.json +++ b/x/core/test/runtimes/bun/package.json @@ -9,6 +9,6 @@ "typescript": "^5.0.0" }, "dependencies": { - "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz" + "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-1.2.9.tgz" } } diff --git a/x/core/test/runtimes/cloudflare/package.json b/x/core/test/runtimes/cloudflare/package.json index 5d351ca3a..480b7f12d 100644 --- a/x/core/test/runtimes/cloudflare/package.json +++ b/x/core/test/runtimes/cloudflare/package.json @@ -10,6 +10,6 @@ "deploy": "wrangler publish" }, "dependencies": { - "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz" + "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-1.2.9.tgz" } } diff --git a/x/dhkem-secp256k1/deno.json b/x/dhkem-secp256k1/deno.json index 45c1e3cfc..d2d6a5c0c 100644 --- a/x/dhkem-secp256k1/deno.json +++ b/x/dhkem-secp256k1/deno.json @@ -46,7 +46,7 @@ "tasks": { "test": "deno fmt && deno lint && deno test test -A --fail-fast --doc --coverage=coverage --parallel --allow-read", "cov": "deno coverage ./coverage --lcov --exclude='test'", - "dnt": "deno run -A dnt.ts $(git describe --tags $(git rev-list --tags --max-count=1))", + "dnt": "deno run -A dnt.ts", "minify": "esbuild ../../npm-packages/x/dhkem-secp256k1/esm/dhkem-secp256k1/mod.js --bundle --format=esm --minify" } } diff --git a/x/dhkem-secp256k1/dnt.ts b/x/dhkem-secp256k1/dnt.ts index 36380fb74..30e04070a 100644 --- a/x/dhkem-secp256k1/dnt.ts +++ b/x/dhkem-secp256k1/dnt.ts @@ -2,6 +2,8 @@ import { build, emptyDir } from "@deno/dnt"; await emptyDir("../../npm-packages/x/dhkem-secp256k1"); +const denoPkg = JSON.parse(await Deno.readTextFile("./deno.json")); + await build({ entryPoints: ["./mod.ts"], outDir: "../../npm-packages/x/dhkem-secp256k1", @@ -17,8 +19,8 @@ await build({ deno: "dev", }, package: { - name: "@hpke/dhkem-secp256k1", - version: Deno.args[0], + name: denoPkg.name, + version: denoPkg.version, description: "A Hybrid Public Key Encryption (HPKE) module extension for secp256k1 curve (EXPERIMENTAL)", repository: { diff --git a/x/dhkem-x25519/deno.json b/x/dhkem-x25519/deno.json index 6d657f401..dfe1dffb2 100644 --- a/x/dhkem-x25519/deno.json +++ b/x/dhkem-x25519/deno.json @@ -46,7 +46,7 @@ "tasks": { "test": "deno fmt && deno lint && deno test test -A --fail-fast --doc --coverage=coverage --parallel --allow-read", "cov": "deno coverage ./coverage --lcov --exclude='test'", - "dnt": "deno run -A dnt.ts $(git describe --tags $(git rev-list --tags --max-count=1))", + "dnt": "deno run -A dnt.ts", "minify": "esbuild ../../npm-packages/x/dhkem-x25519/esm/dhkem-x25519/mod.js --bundle --format=esm --minify" } } diff --git a/x/dhkem-x25519/dnt.ts b/x/dhkem-x25519/dnt.ts index 45e3ad8e4..170b70fa5 100644 --- a/x/dhkem-x25519/dnt.ts +++ b/x/dhkem-x25519/dnt.ts @@ -2,6 +2,8 @@ import { build, emptyDir } from "@deno/dnt"; await emptyDir("../../npm-packages/x/dhkem-x25519"); +const denoPkg = JSON.parse(await Deno.readTextFile("./deno.json")); + await build({ entryPoints: ["./mod.ts"], outDir: "../../npm-packages/x/dhkem-x25519", @@ -17,8 +19,8 @@ await build({ deno: "dev", }, package: { - name: "@hpke/dhkem-x25519", - version: Deno.args[0], + name: denoPkg.name, + version: denoPkg.version, description: "A Hybrid Public Key Encryption (HPKE) module extension for X25519", repository: { diff --git a/x/dhkem-x448/deno.json b/x/dhkem-x448/deno.json index e5042bd16..0b543744e 100644 --- a/x/dhkem-x448/deno.json +++ b/x/dhkem-x448/deno.json @@ -46,7 +46,7 @@ "tasks": { "test": "deno fmt && deno lint && deno test test -A --fail-fast --doc --coverage=coverage --parallel --allow-read", "cov": "deno coverage ./coverage --lcov --exclude='test'", - "dnt": "deno run -A dnt.ts $(git describe --tags $(git rev-list --tags --max-count=1))", + "dnt": "deno run -A dnt.ts", "minify": "esbuild ../../npm-packages/x/dhkem-x448/esm/dhkem-x448/mod.js --bundle --format=esm --minify" } } diff --git a/x/dhkem-x448/dnt.ts b/x/dhkem-x448/dnt.ts index 84f90269e..aeffcf4e0 100644 --- a/x/dhkem-x448/dnt.ts +++ b/x/dhkem-x448/dnt.ts @@ -2,6 +2,8 @@ import { build, emptyDir } from "@deno/dnt"; await emptyDir("../../npm-packages/x/dhkem-x448"); +const denoPkg = JSON.parse(await Deno.readTextFile("./deno.json")); + await build({ entryPoints: ["./mod.ts"], outDir: "../../npm-packages/x/dhkem-x448", @@ -17,8 +19,8 @@ await build({ deno: "dev", }, package: { - name: "@hpke/dhkem-x448", - version: Deno.args[0], + name: denoPkg.name, + version: denoPkg.version, description: "A Hybrid Public Key Encryption (HPKE) module extension for X448", repository: { diff --git a/x/hpke-js/deno.json b/x/hpke-js/deno.json index 1a1f669d0..93146d3f2 100644 --- a/x/hpke-js/deno.json +++ b/x/hpke-js/deno.json @@ -46,7 +46,7 @@ "tasks": { "test": "deno fmt && deno lint && deno test test -A --fail-fast --doc --coverage=coverage --parallel --allow-read", "cov": "deno coverage ./coverage --lcov --exclude='test'", - "dnt": "deno run -A dnt.ts $(git describe --tags $(git rev-list --tags --max-count=1))", + "dnt": "deno run -A dnt.ts", "minify": "esbuild ../../npm-packages/x/hpke-js/esm/hpke-js/mod.js --bundle --format=esm --minify" } } diff --git a/x/hpke-js/dnt.ts b/x/hpke-js/dnt.ts index 58f6075ca..c0e6ce938 100644 --- a/x/hpke-js/dnt.ts +++ b/x/hpke-js/dnt.ts @@ -2,6 +2,8 @@ import { build, emptyDir } from "@deno/dnt"; await emptyDir("../../npm-packages/x/hpke-js"); +const denoPkg = JSON.parse(await Deno.readTextFile("./deno.json")); + await build({ entryPoints: ["./mod.ts"], outDir: "../../npm-packages/x/hpke-js", @@ -17,8 +19,8 @@ await build({ deno: "dev", }, package: { - name: "hpke-js", - version: Deno.args[0], + name: denoPkg.name, + version: denoPkg.version, description: "A Hybrid Public Key Encryption (HPKE) module for various JavaScript runtimes", repository: { diff --git a/x/hpke-js/test/runtimes/bun/package.json b/x/hpke-js/test/runtimes/bun/package.json index 22985c5e3..739ca87f9 100644 --- a/x/hpke-js/test/runtimes/bun/package.json +++ b/x/hpke-js/test/runtimes/bun/package.json @@ -9,7 +9,7 @@ "typescript": "^5.0.0" }, "dependencies": { - "@hpke/hpke-js": "file:../../../../../npm-packages/x/hpke-js/hpke-js-0.0.0.tgz", - "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz" + "@hpke/hpke-js": "file:../../../../../npm-packages/x/hpke-js/hpke-js-1.2.9.tgz", + "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-1.2.9.tgz" } } diff --git a/x/hpke-js/test/runtimes/cloudflare/package.json b/x/hpke-js/test/runtimes/cloudflare/package.json index 42db62731..dbfada411 100644 --- a/x/hpke-js/test/runtimes/cloudflare/package.json +++ b/x/hpke-js/test/runtimes/cloudflare/package.json @@ -10,6 +10,6 @@ "deploy": "wrangler publish" }, "dependencies": { - "@hpke/hpke-js": "file:../../../../../npm-packages/x/hpke-js/hpke-js-0.0.0.tgz" + "@hpke/hpke-js": "file:../../../../../npm-packages/x/hpke-js/hpke-js-1.2.9.tgz" } } diff --git a/x/hybridkem-x25519-kyber768/deno.json b/x/hybridkem-x25519-kyber768/deno.json index 1a34cb66b..0b27586c6 100644 --- a/x/hybridkem-x25519-kyber768/deno.json +++ b/x/hybridkem-x25519-kyber768/deno.json @@ -46,7 +46,7 @@ "tasks": { "test": "deno fmt && deno lint && deno test test -A --fail-fast --doc --coverage=coverage --parallel --allow-read", "cov": "deno coverage ./coverage --lcov --exclude='test'", - "dnt": "deno run -A dnt.ts $(git describe --tags $(git rev-list --tags --max-count=1))", + "dnt": "deno run -A dnt.ts", "minify": "esbuild ../../npm-packages/x/hybridkem-x25519-kyber768/esm/hybridkem-x25519-kyber768/mod.js --bundle --format=esm --minify" } } diff --git a/x/hybridkem-x25519-kyber768/dnt.ts b/x/hybridkem-x25519-kyber768/dnt.ts index 13560d097..5a817d651 100644 --- a/x/hybridkem-x25519-kyber768/dnt.ts +++ b/x/hybridkem-x25519-kyber768/dnt.ts @@ -2,6 +2,8 @@ import { build, emptyDir } from "@deno/dnt"; await emptyDir("../../npm-packages/x/hybridkem-x25519-kyber768"); +const denoPkg = JSON.parse(await Deno.readTextFile("./deno.json")); + await build({ entryPoints: ["./mod.ts"], outDir: "../../npm-packages/x/hybridkem-x25519-kyber768", @@ -17,8 +19,8 @@ await build({ deno: "dev", }, package: { - name: "@hpke/hybridkem-x25519-kyber768", - version: Deno.args[0], + name: denoPkg.name, + version: denoPkg.version, description: "A Hybrid Public Key Encryption (HPKE) module extension for a hybrid post-quantum KEM, X25519Kyber768Draft00", repository: {