Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0 web #35

Merged
merged 8 commits into from
Nov 6, 2023
Merged
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
6 changes: 5 additions & 1 deletion .github/workflows/web-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -35,6 +35,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Build Web SDK
run: yarn && yarn copywasm && yarn build
working-directory: binding/web

- name: Pre-build dependencies
run: npm install yarn

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions binding/web/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
lib
rollup.config.js
.eslintrc.js
5 changes: 3 additions & 2 deletions binding/web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ module.exports = {
ignoreParameters: true,
ignoreProperties: true
}
]
],
'@typescript-eslint/no-shadow': 2
}
},
{
Expand Down Expand Up @@ -257,7 +258,7 @@ module.exports = {
// disallow shadowing of names such as arguments
'no-shadow-restricted-names': 2,
// disallow declaration of variables already declared in the outer scope
'no-shadow': 2,
'no-shadow': 0,
// disallow use of undefined when initializing variables
'no-undef-init': 0,
// disallow use of undeclared variables unless mentioned in a /*global */ block
Expand Down
13 changes: 7 additions & 6 deletions binding/web/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { defineConfig } from "cypress";
import { defineConfig } from 'cypress';

export default defineConfig({
env: {
"NUM_TEST_ITERATIONS": 20,
"PROC_PERFORMANCE_THRESHOLD_SEC": 0.8
NUM_TEST_ITERATIONS: 20,
PROC_PERFORMANCE_THRESHOLD_SEC: 0.8,
},
e2e: {
supportFile: "cypress/support/index.ts",
specPattern: "test/*.test.{js,jsx,ts,tsx}",
defaultCommandTimeout: 30000,
supportFile: 'cypress/support/index.ts',
specPattern: 'test/*.test.{js,jsx,ts,tsx}',
video: false,
screenshotOnRunFailure: false
screenshotOnRunFailure: false,
},
});
4 changes: 2 additions & 2 deletions binding/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Koala Noise Suppression engine for web browsers (via WebAssembly)",
"author": "Picovoice Inc",
"license": "Apache-2.0",
"version": "1.0.3",
"version": "2.0.0",
"keywords": [
"koala",
"web",
Expand Down Expand Up @@ -67,6 +67,6 @@
"wasm-feature-detect": "^1.5.0"
},
"engines": {
"node": ">=14"
"node": ">=16"
}
}
2 changes: 2 additions & 0 deletions binding/web/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Koala } from './koala';
import { KoalaWorker } from './koala_worker';
import * as KoalaErrors from './koala_errors';

import {
KoalaModel,
Expand All @@ -25,6 +26,7 @@ KoalaWorker.setWasmSimd(koalaWasmSimd);

export {
Koala,
KoalaErrors,
KoalaModel,
KoalaOptions,
KoalaWorker,
Expand Down
Loading