Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sshyam-gupta authored Dec 1, 2023
2 parents d890388 + 6622b6d commit 06bba3a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
# Checkout the exact commit tagged on the release.
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

Expand All @@ -21,7 +21,7 @@ jobs:
version: 7

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

### Prerequisite

**React-router-dom >= 6.7** and can be used only with [**data routers**](https://reactrouter.com/en/6.8.1/routers/picking-a-router#using-v64-data-apis)
**React-router-dom >= 6.19** and can be used only with [**data routers**](https://reactrouter.com/en/6.8.1/routers/picking-a-router#using-v64-data-apis)

```bash
pnpm add react-router-prompt
Expand Down Expand Up @@ -69,16 +69,15 @@ yarn add react-router-prompt
#### Note 🗒️
This version works with react-router-dom >=v6.7
This version works with react-router-dom >=v6.19
Should be used within [data routers](https://reactrouter.com/en/6.8.1/routers/picking-a-router#using-v64-data-apis)
For react-router-support `(v6 - v6.2.x)` please install v0.3.0
For react-router support `(v6 - v6.2.x)` please install v0.3.0
_Skipped support in middle due to breaking changes on react-router apis_
For react-router support (v6.7.x - v6.18.x) please install v0.5.4
```sh
yarn add react-router-prompt@0.3.0
```
_Skipped support in middle due to breaking changes on react-router apis_
## Contributing
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-prompt",
"version": "0.5.4",
"version": "0.6.0",
"description": "React Router Navigation Prompt for v6",
"type": "module",
"files": [
Expand Down Expand Up @@ -74,7 +74,7 @@
"prettier": "^2.8.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.8.1",
"react-router-dom": "^6.19.0",
"size-limit": "^8.1.2",
"tslib": "^2.5.0",
"typescript": "^5.0.0",
Expand All @@ -86,7 +86,7 @@
"peerDependencies": {
"react": ">=16.8",
"react-dom": ">=16.8",
"react-router-dom": ">=6.7"
"react-router-dom": ">=6.19"
},
"size-limit": [
{
Expand Down
28 changes: 14 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/hooks/use-prompt.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useEffect } from "react"
import {
useBeforeUnload,
unstable_useBlocker as useBlocker,
useBlocker,
unstable_Blocker as Blocker,
unstable_BlockerFunction as BlockerFunction,
} from "react-router-dom"
Expand Down

0 comments on commit 06bba3a

Please sign in to comment.