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

update react #283

Merged
merged 2 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions .github/workflows/react-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ jobs:
with:
node-version: lts/*

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

- name: Build Local React SDK
run: yarn && yarn build
working-directory: binding/react

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

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/react-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

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

- name: Build Local React SDK
run: yarn && yarn build
working-directory: binding/react

- name: Install dependencies
run: yarn install

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

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

- name: Install dependencies
run: yarn install

Expand Down
4 changes: 2 additions & 2 deletions binding/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@picovoice/cheetah-react",
"version": "1.1.0",
"version": "2.0.0",
"description": "React hook for Cheetah Web SDK",
"entry": "src/index.ts",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
"test": "cypress run --component"
},
"dependencies": {
"@picovoice/cheetah-web": "=1.1.15"
"@picovoice/cheetah-web": "=2.0.0"
},
"devDependencies": {
"@babel/core": "^7.21.3",
Expand Down
4 changes: 2 additions & 2 deletions binding/react/src/use_cheetah.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export const useCheetah = (): {
const [isListening, setIsListening] = useState<boolean>(false);
const [error, setError] = useState<Error | null>(null);

const errorCallback = useCallback((e: string) => {
setError(new Error(e));
const errorCallback = useCallback((cheetahError: Error) => {
setError(cheetahError);
}, []);

const transcriptCallback = useCallback(
Expand Down
8 changes: 4 additions & 4 deletions binding/react/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1110,10 +1110,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@picovoice/cheetah-web@=1.1.15":
version "1.1.15"
resolved "https://registry.npmjs.org/@picovoice/cheetah-web/-/cheetah-web-1.1.15.tgz"
integrity sha512-UMKOPqZopcMX3fLQaD3eDRAcUph/6CuirNxQ1SUlNXSxlWO9pdsfdpikaoZ8gx59vbw6l/c8bSB3OicV9Gl2Sw==
"@picovoice/cheetah-web@=2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@picovoice/cheetah-web/-/cheetah-web-2.0.0.tgz#d4415c25e324726356f979bed3761a94e884198e"
integrity sha512-WqxHUznNS7Rf8XfJCp0m0l+xeYFDSFhzOTg+b2DJn06x1slhpJA4CiK4egiH7FzhHiJtvqjLF0dO14LA8e1Gpg==
dependencies:
"@picovoice/web-utils" "=1.3.1"

Expand Down
4 changes: 2 additions & 2 deletions demo/react/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "cheetah-react-demo",
"version": "1.1.0",
"version": "2.0.0",
"private": true,
"description": "Cheetah React demo (made with Create React App)",
"dependencies": {
"@picovoice/cheetah-react": "~1.1.0",
"@picovoice/cheetah-react": "file:../../binding/react",
"@picovoice/web-voice-processor": "~4.0.8",
"@types/node": "^18.11.9",
"@types/react": "^18.0.17",
Expand Down
16 changes: 7 additions & 9 deletions demo/react/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1608,17 +1608,15 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@picovoice/cheetah-react@~1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@picovoice/cheetah-react/-/cheetah-react-1.1.0.tgz#6be98cb02735c9ab2bd203739c50495f59bf0fd7"
integrity sha512-v1QmQ6th+p7y6DtHGeR3u5AOel9yH6Svsab/zdSfymRNZfDk+H+GrczMRkL17D7pknm7KnB0xrFXu0Df/NX/UA==
"@picovoice/cheetah-react@file:../../binding/react":
version "2.0.0"
dependencies:
"@picovoice/cheetah-web" "=1.1.15"
"@picovoice/cheetah-web" "=2.0.0"

"@picovoice/cheetah-web@=1.1.15":
version "1.1.15"
resolved "https://registry.yarnpkg.com/@picovoice/cheetah-web/-/cheetah-web-1.1.15.tgz#9545212be4d59dec6fbbcbaba9f9800b741c8732"
integrity sha512-UMKOPqZopcMX3fLQaD3eDRAcUph/6CuirNxQ1SUlNXSxlWO9pdsfdpikaoZ8gx59vbw6l/c8bSB3OicV9Gl2Sw==
"@picovoice/cheetah-web@=2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@picovoice/cheetah-web/-/cheetah-web-2.0.0.tgz#d4415c25e324726356f979bed3761a94e884198e"
integrity sha512-WqxHUznNS7Rf8XfJCp0m0l+xeYFDSFhzOTg+b2DJn06x1slhpJA4CiK4egiH7FzhHiJtvqjLF0dO14LA8e1Gpg==
dependencies:
"@picovoice/web-utils" "=1.3.1"

Expand Down
Loading