Skip to content

Commit

Permalink
chore: fix peerDependencies to react 17 or 18 ranges. (#76)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
morganney authored May 5, 2024
1 parent 48f7e52 commit 8ea1788
Show file tree
Hide file tree
Showing 7 changed files with 2,000 additions and 1,759 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Pack
run: npm pack --pack-destination=packages/tts-react --workspace=tts-react
- name: Push to NPM registry
uses: JS-DevTools/npm-publish@v3.0.1
uses: JS-DevTools/npm-publish@v3.1.1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: packages/tts-react
Expand Down
3,695 changes: 1,967 additions & 1,728 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,29 @@
"@babel/preset-env": "^7.23.7",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/react": "^17.0.49",
"@types/react-dom": "^17.0.17",
"@typescript-eslint/eslint-plugin": "^5.35.1",
"@typescript-eslint/parser": "^5.35.1",
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^15.0.6",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@vitejs/plugin-react": "^4.2.1",
"babel-dual-package": "^1.1.2",
"babel-jest": "^29.5.0",
"babel-jest": "^29.7.0",
"babel-plugin-react-remove-properties": "^0.3.0",
"codecov": "^4.0.0-0",
"eslint": "^8.23.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.31.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint": "^8.57.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"http-server": "^14.1.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest-resolver": "^2.0.1",
"typescript": "^5.0.4",
"typescript": "^5.4.5",
"vite": "^5.2.8"
}
}
20 changes: 10 additions & 10 deletions packages/story/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"license": "MIT",
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@storybook/addon-a11y": "^8.0.5",
"@storybook/addon-actions": "^8.0.5",
"@storybook/addon-controls": "^8.0.5",
"@storybook/addon-docs": "^8.0.5",
"@storybook/addon-a11y": "^8.0.10",
"@storybook/addon-actions": "^8.0.10",
"@storybook/addon-controls": "^8.0.10",
"@storybook/addon-docs": "^8.0.10",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/react": "^8.0.5",
"@storybook/react-webpack5": "^8.0.5",
"@storybook/react": "^8.0.10",
"@storybook/react-webpack5": "^8.0.10",
"html-react-parser": "^3.0.16",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "^8.0.5",
"tts-react": "^3.0.2"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"storybook": "^8.0.10",
"tts-react": "^3.0.7"
}
}
3 changes: 2 additions & 1 deletion packages/tts-react/__tests__/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "../../../tsconfig.json",
"compilerOptions": {
"rootDir": "..",
"declaration": false
"declaration": false,
"types": ["@testing-library/jest-dom"]
},
"include": ["*.ts", "*.tsx"]
}
6 changes: 3 additions & 3 deletions packages/tts-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tts-react",
"version": "3.0.6",
"version": "3.0.7",
"description": "React hook and component for converting text to speech using the Web Speech API or Amazon Polly.",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -59,7 +59,7 @@
"dist"
],
"peerDependencies": {
"react": ">=17.0.0",
"react-dom": ">=17.0.0"
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/tts-react/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ class Controller extends EventTarget {
* @see https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1300
*/
if (this.#synthesizer instanceof HTMLAudioElement) {
// eslint-disable-next-line @typescript-eslint/no-extra-semi
// eslint-disable-next-line no-extra-semi
;(
this.#synthesizer as HTMLAudioElement & { preservesPitch: boolean }
).preservesPitch = value
Expand Down

0 comments on commit 8ea1788

Please sign in to comment.