Skip to content

Commit 8ea1788

Browse files
authored
chore: fix peerDependencies to react 17 or 18 ranges. (#76)
* chore: upgrade tts-react version in story, lockdown react peerDep versions. * test: upgrade test deps, add types for jest-dom. * chore: upgrade deploy dep, eslint deps, typescript.
1 parent 48f7e52 commit 8ea1788

File tree

7 files changed

+2000
-1759
lines changed

7 files changed

+2000
-1759
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Pack
3131
run: npm pack --pack-destination=packages/tts-react --workspace=tts-react
3232
- name: Push to NPM registry
33-
uses: JS-DevTools/npm-publish@v3.0.1
33+
uses: JS-DevTools/npm-publish@v3.1.1
3434
with:
3535
token: ${{ secrets.NPM_AUTH_TOKEN }}
3636
package: packages/tts-react

package-lock.json

Lines changed: 1967 additions & 1728 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,29 @@
2828
"@babel/preset-env": "^7.23.7",
2929
"@babel/preset-react": "^7.23.3",
3030
"@babel/preset-typescript": "^7.23.3",
31-
"@testing-library/jest-dom": "^6.1.4",
32-
"@testing-library/react": "^14.0.0",
33-
"@testing-library/user-event": "^14.4.3",
34-
"@types/react": "^17.0.49",
35-
"@types/react-dom": "^17.0.17",
36-
"@typescript-eslint/eslint-plugin": "^5.35.1",
37-
"@typescript-eslint/parser": "^5.35.1",
31+
"@testing-library/jest-dom": "^6.4.5",
32+
"@testing-library/react": "^15.0.6",
33+
"@testing-library/user-event": "^14.5.2",
34+
"@types/jest": "^29.5.12",
35+
"@types/react": "^18.3.1",
36+
"@types/react-dom": "^18.3.0",
37+
"@typescript-eslint/eslint-plugin": "^7.8.0",
38+
"@typescript-eslint/parser": "^7.8.0",
3839
"@vitejs/plugin-react": "^4.2.1",
3940
"babel-dual-package": "^1.1.2",
40-
"babel-jest": "^29.5.0",
41+
"babel-jest": "^29.7.0",
4142
"babel-plugin-react-remove-properties": "^0.3.0",
4243
"codecov": "^4.0.0-0",
43-
"eslint": "^8.23.0",
44-
"eslint-plugin-jsx-a11y": "^6.6.1",
45-
"eslint-plugin-react": "^7.31.1",
46-
"eslint-plugin-react-hooks": "^4.6.0",
44+
"eslint": "^8.57.0",
45+
"eslint-plugin-jsx-a11y": "^6.8.0",
46+
"eslint-plugin-react": "^7.34.1",
47+
"eslint-plugin-react-hooks": "^4.6.2",
4748
"http-server": "^14.1.1",
48-
"jest": "^29.5.0",
49-
"jest-environment-jsdom": "^29.5.0",
49+
"jest": "^29.7.0",
50+
"jest-environment-jsdom": "^29.7.0",
5051
"prettier": "^3.2.5",
5152
"ts-jest-resolver": "^2.0.1",
52-
"typescript": "^5.0.4",
53+
"typescript": "^5.4.5",
5354
"vite": "^5.2.8"
5455
}
5556
}

packages/story/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
"license": "MIT",
1414
"dependencies": {
1515
"@faker-js/faker": "^7.6.0",
16-
"@storybook/addon-a11y": "^8.0.5",
17-
"@storybook/addon-actions": "^8.0.5",
18-
"@storybook/addon-controls": "^8.0.5",
19-
"@storybook/addon-docs": "^8.0.5",
16+
"@storybook/addon-a11y": "^8.0.10",
17+
"@storybook/addon-actions": "^8.0.10",
18+
"@storybook/addon-controls": "^8.0.10",
19+
"@storybook/addon-docs": "^8.0.10",
2020
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
21-
"@storybook/react": "^8.0.5",
22-
"@storybook/react-webpack5": "^8.0.5",
21+
"@storybook/react": "^8.0.10",
22+
"@storybook/react-webpack5": "^8.0.10",
2323
"html-react-parser": "^3.0.16",
24-
"react": "^18.2.0",
25-
"react-dom": "^18.2.0",
26-
"storybook": "^8.0.5",
27-
"tts-react": "^3.0.2"
24+
"react": "^18.3.1",
25+
"react-dom": "^18.3.1",
26+
"storybook": "^8.0.10",
27+
"tts-react": "^3.0.7"
2828
}
2929
}

packages/tts-react/__tests__/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"extends": "../../../tsconfig.json",
33
"compilerOptions": {
44
"rootDir": "..",
5-
"declaration": false
5+
"declaration": false,
6+
"types": ["@testing-library/jest-dom"]
67
},
78
"include": ["*.ts", "*.tsx"]
89
}

packages/tts-react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tts-react",
3-
"version": "3.0.6",
3+
"version": "3.0.7",
44
"description": "React hook and component for converting text to speech using the Web Speech API or Amazon Polly.",
55
"type": "module",
66
"main": "dist/index.js",
@@ -59,7 +59,7 @@
5959
"dist"
6060
],
6161
"peerDependencies": {
62-
"react": ">=17.0.0",
63-
"react-dom": ">=17.0.0"
62+
"react": "^17.0.0 || ^18.0.0",
63+
"react-dom": "^17.0.0 || ^18.0.0"
6464
}
6565
}

packages/tts-react/src/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ class Controller extends EventTarget {
386386
* @see https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1300
387387
*/
388388
if (this.#synthesizer instanceof HTMLAudioElement) {
389-
// eslint-disable-next-line @typescript-eslint/no-extra-semi
389+
// eslint-disable-next-line no-extra-semi
390390
;(
391391
this.#synthesizer as HTMLAudioElement & { preservesPitch: boolean }
392392
).preservesPitch = value

0 commit comments

Comments
 (0)