Skip to content

Commit

Permalink
Rename scoped pacakage to @hpke.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Jul 27, 2023
1 parent cccd245 commit b824381
Show file tree
Hide file tree
Showing 26 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.lcov
flags: unittests
- name: Run deno test for /x/dhkemSecp256k1HkdfSha256
working-directory: ./x/dhkemSecp256k1HkdfSha256
- name: Run deno test for /x/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1
run: |
deno fmt --check
deno task test
12 changes: 6 additions & 6 deletions .github/workflows/ci_browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
npm install -g esbuild
deno task dnt
deno task minify > test/runtimes/browsers/pages/src/hpke.js
mkdir test/runtimes/browsers/pages/dhkemSecp256k1HkdfSha256
cp -rf x/dhkemSecp256k1HkdfSha256/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkemSecp256k1HkdfSha256
deno task minify > test/runtimes/browsers/pages/dhkemSecp256k1HkdfSha256/src/hpke.js
- working-directory: ./x/dhkemSecp256k1HkdfSha256
mkdir test/runtimes/browsers/pages/dhkem-secp256k1
cp -rf x/dhkem-secp256k1/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-secp256k1
deno task minify > test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke.js
- working-directory: ./x/dhkem-secp256k1
run: |
deno task dnt
deno task minify > ../../test/runtimes/browsers/pages/dhkemSecp256k1HkdfSha256/src/hpke-dhkemSecp256k1HkdfSha256.js
deno task minify > ../../test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-dhkem-secp256k1.js
- uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand All @@ -48,5 +48,5 @@ jobs:
npm ci
npx playwright install --with-deps
npx playwright test
- working-directory: ./x/dhkemSecp256k1HkdfSha256/test/runtimes/browsers
- working-directory: ./x/dhkem-secp256k1/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
12 changes: 6 additions & 6 deletions .github/workflows/ci_bun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
npm install -g esbuild
deno task dnt
deno task minify > test/runtimes/hpke.js
deno task minify > x/dhkemSecp256k1HkdfSha256/test/runtimes/hpke.js
- working-directory: ./x/dhkemSecp256k1HkdfSha256/
deno task minify > x/dhkem-secp256k1/test/runtimes/hpke.js
- working-directory: ./x/dhkem-secp256k1/
run: |
deno task dnt
deno task minify > test/runtimes/hpke-dhkemSecp256k1HkdfSha256.js
deno task minify > test/runtimes/hpke-dhkem-secp256k1.js
- uses: antongolub/action-setup-bun@v1
with:
bun-version: ${{ matrix.bun-version }}
Expand All @@ -43,9 +43,9 @@ jobs:
nohup bun src/index.js &
sleep 3
deno test hpke.spec.ts --allow-net
- name: Run test for dhkemSecp256k1HkdfSha256
working-directory: ./x/dhkemSecp256k1HkdfSha256/test/runtimes/bun
- name: Run test for dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1/test/runtimes/bun
run: |
nohup bun src/index.js &
sleep 3
deno test dhkemSecp256k1HkdfSha256.spec.ts --allow-net
deno test dhkem-secp256k1.spec.ts --allow-net
12 changes: 6 additions & 6 deletions .github/workflows/ci_cloudflare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ jobs:
npm install -g esbuild
deno task dnt
deno task minify > test/runtimes/hpke.js
deno task minify > x/dhkemSecp256k1HkdfSha256/test/runtimes/hpke.js
- working-directory: ./x/dhkemSecp256k1HkdfSha256/
deno task minify > x/dhkem-secp256k1/test/runtimes/hpke.js
- working-directory: ./x/dhkem-secp256k1/
run: |
deno task dnt
deno task minify > test/runtimes/hpke-dhkemSecp256k1HkdfSha256.js
deno task minify > test/runtimes/hpke-dhkem-secp256k1.js
- name: Run test
working-directory: ./test/runtimes/cloudflare
run: |
npm install
nohup npm start &
sleep 3
deno test hpke.spec.ts --allow-net
- name: Run test for dhkemSecp256k1HkdfSha256
working-directory: ./x/dhkemSecp256k1HkdfSha256/test/runtimes/cloudflare
- name: Run test for dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1/test/runtimes/cloudflare
run: |
npm install
nohup npm start &
sleep 3
deno test dhkemSecp256k1HkdfSha256.spec.ts --allow-net
deno test dhkem-secp256k1.spec.ts --allow-net
6 changes: 3 additions & 3 deletions .github/workflows/ci_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
npm install -g esbuild
deno task dnt
deno task minify > ./npm/hpke.min.js
- name: Run dnt & minify for /x/dhkemSecp256k1HkdfSha256
working-directory: ./x/dhkemSecp256k1HkdfSha256
- name: Run dnt & minify for /x/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1
run: |
deno task dnt
deno task minify > ./npm/hpke-dhkemSecp256k1.min.js
deno task minify > ./npm/hpke-dhkem-secp256k1.min.js
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-dhkemSecp256k1HkdfSha256:
publish-dhkem-secp256k1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -38,12 +38,12 @@ jobs:
with:
deno-version: v1.x
- name: Run dnt & minify
working-directory: ./x/dhkemSecp256k1HkdfSha256
working-directory: ./x/dhkem-secp256k1
run: |
npm install -g esbuild
deno task dnt
deno task minify > ./npm/hpke-dhkemSecp256k1HkdfSha256.min.js
- working-directory: ./x/dhkemSecp256k1HkdfSha256/npm
deno task minify > ./npm/hpke-dhkem-secp256k1.min.js
- working-directory: ./x/dhkem-secp256k1/npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions x/dhkemSecp256k1HkdfSha256/dnt.ts → x/dhkem-secp256k1/dnt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ await build({
deno: "dev",
},
package: {
name: "@hpke-js/dhkemSecp256k1HkdfSha256",
name: "@hpke/dhkem-secp256k1",
version: Deno.args[0],
description:
"A Hybrid Public Key Encryption (HPKE) module extension for secp256k1 curve",
Expand All @@ -27,12 +27,12 @@ await build({
},
homepage: "https://github.com/dajiaji/hpke-js#readme",
license: "MIT",
main: "./script/x/dhkemSecp256k1HkdfSha256/mod.js",
types: "./script/x/dhkemSecp256k1HkdfSha256/mod.d.ts",
main: "./script/x/dhkem-secp256k1/mod.js",
types: "./script/x/dhkem-secp256k1/mod.d.ts",
exports: {
".": {
"import": "./esm/x/dhkemSecp256k1HkdfSha256/mod.js",
"require": "./script/x/dhkemSecp256k1HkdfSha256/mod.js",
"import": "./esm/x/dhkem-secp256k1/mod.js",
"require": "./script/x/dhkem-secp256k1/mod.js",
},
"./package.json": "./package.json",
},
Expand Down
1 change: 1 addition & 0 deletions x/dhkem-secp256k1/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { DhkemSecp256k1HkdfSha256 } from "./src/dhkem-secp256k1.ts";
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
KemId,
} from "https://deno.land/x/hpke/mod.ts";

import { DhkemSecp256k1HkdfSha256 } from "../src/dhkemSecp256k1HkdfSha256.ts";
import { DhkemSecp256k1HkdfSha256 } from "../src/dhkem-secp256k1.ts";

const isBrowser = () => typeof window !== "undefined";

Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion x/dhkemSecp256k1HkdfSha256/mod.ts

This file was deleted.

0 comments on commit b824381

Please sign in to comment.