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

feat: React 19 #14

Merged
merged 4 commits into from
Dec 6, 2024
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: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
name: Build, lint, and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 22.x
- uses: bahmutov/npm-install@v1
- run: yarn lint
- run: yarn test --ci --coverage --maxWorkers=2
Expand Down
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

17 changes: 9 additions & 8 deletions packages/use-debounced/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-debounced",
"version": "1.1.0",
"version": "1.2.0",
"license": "MIT",
"description": "A React hook to debounce the provided value in render.",
"author": "Jan Amann <[email protected]>",
Expand All @@ -23,20 +23,21 @@
"dist"
],
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"dependencies": {
"tslib": "^2.0.0"
},
"devDependencies": {
"@testing-library/react": "^13.1.1",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"@testing-library/dom": "^10.0.0",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "8.13.0",
"eslint-config-molindo": "^6.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tsdx": "^0.14.1",
"typescript": "^4.8.2"
}
Expand Down
17 changes: 9 additions & 8 deletions packages/use-last/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-last",
"version": "1.1.1",
"version": "1.2.0",
"license": "MIT",
"description": "A React hook to conditionally return the last value that has met a certain criteria.",
"author": "Jan Amann <[email protected]>",
Expand All @@ -23,20 +23,21 @@
"dist"
],
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"dependencies": {
"tslib": "^2.0.0"
},
"devDependencies": {
"@testing-library/react": "^13.1.1",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"@testing-library/dom": "^10.0.0",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "8.13.0",
"eslint-config-molindo": "^6.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tsdx": "^0.14.1",
"typescript": "^4.8.2"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/use-last/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {useRef} from 'react';
* By default the value is checked for `!== undefined`.
*/
export default function useLast<Value>(value: Value, isValid?: boolean) {
const lastValueRef = useRef<Value>();
const lastValueRef = useRef<Value>(undefined);

if (isValid === undefined) {
isValid = value !== undefined;
Expand Down
17 changes: 9 additions & 8 deletions packages/use-optional-state/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-optional-state",
"version": "2.0.0",
"version": "2.1.0",
"license": "MIT",
"description": "A React hook to implement components that support both controlled and uncontrolled props.",
"author": "Jan Amann <[email protected]>",
Expand All @@ -23,8 +23,8 @@
"dist"
],
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"dependencies": {
"tslib": "^2.0.0",
Expand All @@ -34,13 +34,14 @@
"access": "public"
},
"devDependencies": {
"@testing-library/react": "^13.1.1",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"@testing-library/dom": "^10.0.0",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "8.13.0",
"eslint-config-molindo": "^6.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tsdx": "^0.14.1",
"typescript": "^4.8.2"
}
Expand Down
17 changes: 9 additions & 8 deletions packages/use-presence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-presence",
"version": "1.2.0",
"version": "1.3.0",
"license": "MIT",
"description": "A lightweight React hook to animate the presence of an element.",
"author": "Jan Amann <[email protected]>",
Expand All @@ -23,20 +23,21 @@
"dist"
],
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"dependencies": {
"tslib": "^2.0.0"
},
"devDependencies": {
"@testing-library/react": "^13.1.1",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"@testing-library/dom": "^10.0.0",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "8.13.0",
"eslint-config-molindo": "^6.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tsdx": "^0.14.1",
"typescript": "^4.8.2"
}
Expand Down
17 changes: 9 additions & 8 deletions packages/use-promised/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-promised",
"version": "1.3.0",
"version": "1.4.0",
"license": "MIT",
"description": "A React hook to implement asynchronous callbacks without having to deal with asynchronicity.",
"author": "Jan Amann <[email protected]>",
Expand All @@ -23,20 +23,21 @@
"dist"
],
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"dependencies": {
"tslib": "^2.0.0"
},
"devDependencies": {
"@testing-library/react": "^13.1.1",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"@testing-library/dom": "^10.0.0",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "8.13.0",
"eslint-config-molindo": "^6.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tsdx": "^0.14.1",
"typescript": "^4.8.2"
}
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"compilerOptions": {
"module": "esnext",
"lib": ["dom", "esnext"],
"skipLibCheck": true,
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"sourceMap": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
Loading
Loading