Skip to content

Commit

Permalink
Merge pull request #382 from dajiaji/rename-x-to-packages
Browse files Browse the repository at this point in the history
Rename x to packages.
  • Loading branch information
dajiaji authored Sep 1, 2024
2 parents bfd83bc + 9b2b313 commit 7b06bf8
Show file tree
Hide file tree
Showing 332 changed files with 105 additions and 105 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@ jobs:
# run: |
# deno fmt --check
# deno task test
# - name: Run deno test for /x/dhkem-x25519
# working-directory: ./x/dhkem-x25519
# - name: Run deno test for /packages/dhkem-x25519
# working-directory: ./packages/dhkem-x25519
# run: |
# deno fmt --check
# deno task test
# - name: Run deno test for /x/dhkem-x448
# working-directory: ./x/dhkem-x448
# - name: Run deno test for /packages/dhkem-x448
# working-directory: ./packages/dhkem-x448
# run: |
# deno fmt --check
# deno task test
# - name: Run deno test for /x/chacha20poly1305
# working-directory: ./x/chacha20poly1305
# - name: Run deno test for /packages/chacha20poly1305
# working-directory: ./packages/chacha20poly1305
# run: |
# deno fmt --check
# deno task test
# - name: Run deno test for /x/hybridkem-x25519-kyber768
# working-directory: ./x/hybridkem-x25519-kyber768
# - name: Run deno test for /packages/hybridkem-x25519-kyber768
# working-directory: ./packages/hybridkem-x25519-kyber768
# run: |
# deno fmt --check
# deno task test
# - name: Run deno test for /x/dhkem-secp256k1
# working-directory: ./x/dhkem-secp256k1
# - name: Run deno test for /packages/dhkem-secp256k1
# working-directory: ./packages/dhkem-secp256k1
# run: |
# deno fmt --check
# deno task test
32 changes: 16 additions & 16 deletions .github/workflows/ci_browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
working-directory: ./npm-packages
run: npm install
- name: Create pages directory
working-directory: ./x/hpke-js
working-directory: ./packages/hpke-js
run: |
mkdir test/runtimes/browsers/pages/core
cp -rf ../core/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/core
Expand All @@ -46,7 +46,7 @@ jobs:
mkdir test/runtimes/browsers/pages/dhkem-secp256k1
cp -rf ../dhkem-secp256k1/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-secp256k1
- name: Build docs for @hpke/core
working-directory: ./x/core
working-directory: ./packages/core
run: |
npx typedoc --name "@hpke/core $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/core/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/core/src/hpke-core.js
Expand All @@ -56,39 +56,39 @@ jobs:
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-core.js
- name: Build docs for @hpke/chacha20poly1305
working-directory: ./x/chacha20poly1305
working-directory: ./packages/chacha20poly1305
run: |
npx typedoc --name "@hpke/chacha20poly1305 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-chacha20poly1305.js
- name: Build docs for @hpke/dhkem-x25519
working-directory: ./x/dhkem-x25519
working-directory: ./packages/dhkem-x25519
run: |
npx typedoc --name "@hpke/dhkem-x25519 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/src/hpke-dhkem-x25519.js
- name: Build docs for @hpke/dhkem-x448
working-directory: ./x/dhkem-x448
working-directory: ./packages/dhkem-x448
run: |
npx typedoc --name "@hpke/dhkem-x448 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-dhkem-x448.js
- name: Build docs for @hpke/hybridkem-x25519-kyber768
working-directory: ./x/hybridkem-x25519-kyber768
working-directory: ./packages/hybridkem-x25519-kyber768
run: |
npx typedoc --name "@hpke/hybridkem-x25519-kyber768 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-hybridkem-x25519-kyber768.js
- name: Build docs for @hpke/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1
working-directory: ./packages/dhkem-secp256k1
run: |
npx typedoc --name "@hpke/dhkem-secp256k1 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-dhkem-secp256k1.js
- name: Build docs for @hpke/hpke-js
working-directory: ./x/hpke-js
working-directory: ./packages/hpke-js
run: |
npx typedoc --name "@hpke/hpke-js $(git describe --tags --abbrev=0)" --out test/runtimes/browsers/pages/docs mod.ts
deno task minify > test/runtimes/browsers/pages/src/hpke.js
- uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./x/hpke-js/test/runtimes/browsers/pages
publish_dir: ./packages/hpke-js/test/runtimes/browsers/pages

playwright-test:
needs: pages
Expand All @@ -97,17 +97,17 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: microsoft/playwright-github-action@v1
- working-directory: ./x/core/test/runtimes/browsers
- working-directory: ./packages/core/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./x/dhkem-x25519/test/runtimes/browsers
- working-directory: ./packages/dhkem-x25519/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./x/dhkem-x448/test/runtimes/browsers
- working-directory: ./packages/dhkem-x448/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./x/chacha20poly1305/test/runtimes/browsers
- working-directory: ./packages/chacha20poly1305/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/browsers
- working-directory: ./packages/hybridkem-x25519-kyber768/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./x/dhkem-secp256k1/test/runtimes/browsers
- working-directory: ./packages/dhkem-secp256k1/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./x/hpke-js/test/runtimes/browsers
- working-directory: ./packages/hpke-js/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
28 changes: 14 additions & 14 deletions .github/workflows/ci_bun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,50 +34,50 @@ jobs:
run: |
deno task npm
deno task bun-link
- name: Run test for ./x/core
working-directory: ./x/core/test/runtimes/bun
- name: Run test for ./packages/core
working-directory: ./packages/core/test/runtimes/bun
run: |
bun install
nohup bun src/index.ts &
sleep 3
deno test core.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/chacha20poly1305
working-directory: ./x/chacha20poly1305/test/runtimes/bun
- name: Run test for ./packages/chacha20poly1305
working-directory: ./packages/chacha20poly1305/test/runtimes/bun
run: |
bun install
nohup bun src/index.ts &
sleep 3
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/dhkem-x25519
working-directory: ./x/dhkem-x25519/test/runtimes/bun
- name: Run test for ./packages/dhkem-x25519
working-directory: ./packages/dhkem-x25519/test/runtimes/bun
run: |
bun install
nohup bun src/index.ts &
sleep 3
deno test dhkem-x25519.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/dhkem-x448
working-directory: ./x/dhkem-x448/test/runtimes/bun
- name: Run test for ./packages/dhkem-x448
working-directory: ./packages/dhkem-x448/test/runtimes/bun
run: |
bun install
nohup bun src/index.ts &
sleep 3
deno test dhkem-x448.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1/test/runtimes/bun
- name: Run test for ./packages/dhkem-secp256k1
working-directory: ./packages/dhkem-secp256k1/test/runtimes/bun
run: |
bun install
nohup bun src/index.ts &
sleep 3
deno test dhkem-secp256k1.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/hybridkem-x25519-kyber768
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/bun
- name: Run test for ./packages/hybridkem-x25519-kyber768
working-directory: ./packages/hybridkem-x25519-kyber768/test/runtimes/bun
run: |
bun install
nohup bun src/index.ts &
sleep 3
deno test hybridkem-x25519-kyber768.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/hpke-js
working-directory: ./x/hpke-js/test/runtimes/bun
- name: Run test for ./packages/hpke-js
working-directory: ./packages/hpke-js/test/runtimes/bun
run: |
bun install
nohup bun run src/index.ts &
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci_cloudflare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,61 +24,61 @@ jobs:
run: npm install -g esbuild
- name: Prepare test
run: deno task npm
- name: Run test for ./x/core
working-directory: ./x/core/test/runtimes/cloudflare
- name: Run test for ./packages/core
working-directory: ./packages/core/test/runtimes/cloudflare
run: |
npm install
npm link @hpke/core
nohup npm start &
sleep 3
deno test core.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/chacha20poly1305
working-directory: ./x/chacha20poly1305/test/runtimes/cloudflare
- name: Run test for ./packages/chacha20poly1305
working-directory: ./packages/chacha20poly1305/test/runtimes/cloudflare
run: |
npm install
npm link @hpke/core
npm link @hpke/chacha20poly1305
nohup npm start &
sleep 3
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/dhkem-x25519
working-directory: ./x/dhkem-x25519/test/runtimes/cloudflare
- name: Run test for ./packages/dhkem-x25519
working-directory: ./packages/dhkem-x25519/test/runtimes/cloudflare
run: |
npm install
npm link @hpke/core
npm link @hpke/dhkem-x25519
nohup npm start &
sleep 3
deno test dhkem-x25519.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/dhkem-x448
working-directory: ./x/dhkem-x448/test/runtimes/cloudflare
- name: Run test for ./packages/dhkem-x448
working-directory: ./packages/dhkem-x448/test/runtimes/cloudflare
run: |
npm install
npm link @hpke/core
npm link @hpke/dhkem-x448
nohup npm start &
sleep 3
deno test dhkem-x448.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1/test/runtimes/cloudflare
- name: Run test for ./packages/dhkem-secp256k1
working-directory: ./packages/dhkem-secp256k1/test/runtimes/cloudflare
run: |
npm install
npm link @hpke/core
npm link @hpke/dhkem-secp256k1
nohup npm start &
sleep 3
deno test dhkem-secp256k1.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/hybridkem-x25519-kyber768
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/cloudflare
- name: Run test for ./packages/hybridkem-x25519-kyber768
working-directory: ./packages/hybridkem-x25519-kyber768/test/runtimes/cloudflare
run: |
npm install
npm link @hpke/core
npm link @hpke/hybridkem-x25519-kyber768
nohup npm start &
sleep 3
deno test hybridkem-x25519-kyber768.spec.ts --allow-net --config ../../../deno.json
- name: Run test for ./x/hpke-js
working-directory: ./x/hpke-js/test/runtimes/cloudflare
- name: Run test for ./packages/hpke-js
working-directory: ./packages/hpke-js/test/runtimes/cloudflare
run: |
npm install
npm link hpke-js
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/ci_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,58 +26,58 @@ jobs:
run: |
npm install -g esbuild
- name: Run dnt & minify for /core
working-directory: ./x/core
working-directory: ./packages/core
run: |
deno task dnt
deno task minify > ../../npm-packages/x/core/hpke-core.min.js
- name: Publish to npm (dry) for /x/core
- name: Publish to npm (dry) for /packages/core
working-directory: ./npm-packages/x/core
run: npm publish --dry-run
- name: Run dnt & minify for /x/chacha20poly1305
working-directory: ./x/chacha20poly1305
- name: Run dnt & minify for /packages/chacha20poly1305
working-directory: ./packages/chacha20poly1305
run: |
deno task dnt
deno task minify > ../../npm-packages/x/chacha20poly1305/hpke-chacha20poly1305.min.js
- name: Publish to npm (dry) for /x/chacha20poly1305
- name: Publish to npm (dry) for /packages/chacha20poly1305
working-directory: ./npm-packages/x/chacha20poly1305
run: npm publish --dry-run
- name: Run dnt & minify for /x/dhkem-x25519
working-directory: ./x/dhkem-x25519
- name: Run dnt & minify for /packages/dhkem-x25519
working-directory: ./packages/dhkem-x25519
run: |
deno task dnt
deno task minify > ../../npm-packages/x/dhkem-x25519/hpke-dhkem-x25519.min.js
- name: Publish to npm (dry) for /x/dhkem-x25519
- name: Publish to npm (dry) for /packages/dhkem-x25519
working-directory: ./npm-packages/x/dhkem-x25519
run: npm publish --dry-run
- name: Run dnt & minify for /x/dhkem-x448
working-directory: ./x/dhkem-x448
- name: Run dnt & minify for /packages/dhkem-x448
working-directory: ./packages/dhkem-x448
run: |
deno task dnt
deno task minify > ../../npm-packages/x/dhkem-x448/hpke-dhkem-x448.min.js
- name: Publish to npm (dry) for /x/dhkem-x448
- name: Publish to npm (dry) for /packages/dhkem-x448
working-directory: ./npm-packages/x/dhkem-x448
run: npm publish --dry-run
- name: Run dnt & minify for /x/hybridkem-x25519-kyber768
working-directory: ./x/hybridkem-x25519-kyber768
- name: Run dnt & minify for /packages/hybridkem-x25519-kyber768
working-directory: ./packages/hybridkem-x25519-kyber768
run: |
deno task dnt
deno task minify > ../../npm-packages/x/hybridkem-x25519-kyber768/hpke-hybridkem-x25519-kyber768.min.js
- name: Publish to npm (dry) for /x/hybridkem-x25519-kyber768
- name: Publish to npm (dry) for /packages/hybridkem-x25519-kyber768
working-directory: ./npm-packages/x/hybridkem-x25519-kyber768
run: npm publish --dry-run
- name: Run dnt & minify for /x/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1
- name: Run dnt & minify for /packages/dhkem-secp256k1
working-directory: ./packages/dhkem-secp256k1
run: |
deno task dnt
deno task minify > ../../npm-packages/x/dhkem-secp256k1/hpke-dhkem-secp256k1.min.js
- name: Publish to npm (dry) for /x/dhkem-secp256k1
- name: Publish to npm (dry) for /packages/dhkem-secp256k1
working-directory: ./npm-packages/x/dhkem-secp256k1
run: npm publish --dry-run
- name: Run dnt & minify for /x/hpke-js
working-directory: ./x/hpke-js
- name: Run dnt & minify for /packages/hpke-js
working-directory: ./packages/hpke-js
run: |
deno task dnt
deno task minify > ../../npm-packages/x/hpke-js/hpke.min.js
- name: Publish to npm (dry) for /x/hpke-js
- name: Publish to npm (dry) for /packages/hpke-js
working-directory: ./npm-packages/x/hpke-js
run: npm publish --dry-run
Loading

0 comments on commit 7b06bf8

Please sign in to comment.