Skip to content

Commit

Permalink
Use globally available web crypto API instead of nodeJS crypto module (
Browse files Browse the repository at this point in the history
…#122)

* Use globally available web crypto API instead of nodeJS crypto module

* add bun test step

* try fix bun

* only build on bun

* use bun to build

* Use vite enviornment to run different test simulations

* fix lockfile

* Create famous-nails-shave.md
  • Loading branch information
lukasIO authored Dec 8, 2023
1 parent 1c2e183 commit 5d41df0
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 71 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-nails-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-server-sdk": minor
---

Use globally available web crypto API instead of nodeJS crypto module
12 changes: 9 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
test-node:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -36,5 +35,12 @@ jobs:
- name: Prettier
run: pnpm format:check

- name: Test
- name: Test Node
run: pnpm test

- name: Test browser
run: pnpm test:browser

- name: Test edge runtime
run: pnpm test:edge

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"lint": "eslint .",
"format": "prettier --write src",
"format:check": "prettier --check src",
"test": "vitest run"
"test": "vitest --environment node run",
"test:browser": "vitest --environment happy-dom run",
"test:edge": "vitest --environment edge-runtime run"
},
"dependencies": {
"@bufbuild/protobuf": "^1.3.0",
Expand All @@ -28,18 +30,20 @@
"devDependencies": {
"@bufbuild/protoc-gen-es": "^1.3.0",
"@changesets/cli": "^2.27.1",
"@edge-runtime/vm": "^3.1.7",
"@livekit/changesets-changelog-github": "^0.0.4",
"@types/node": "^20.10.1",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"eslint": "^7.32.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.24.0",
"happy-dom": "^12.10.3",
"prettier": "^2.6.2",
"typedoc": "^0.25.4",
"typescript": "4.6.x",
"vite": "^5.0.5",
"vitest": "^0.34.6"
"vitest": "^1.0.2"
},
"engines": {
"node": ">=18"
Expand Down
Loading

0 comments on commit 5d41df0

Please sign in to comment.