next-use-contextual-routing 3.0.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -10
- package/package.json +21 -26
package/README.md
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
# Next use contextual routing
|
|
1
|
+
# Next use contextual routing
|
|
2
2
|
|
|
3
|
-
[](http://github.com/badges/stability-badges)
|
|
4
3
|
[![Build status][ci-badge]][ci]
|
|
5
4
|
[![Test coverage report][coveralls-badge]][coveralls]
|
|
6
5
|
[![Npm version][npm-badge]][npm]
|
|
7
6
|
[![Bundle size][bundlephobia-badge]][bundlephobia]
|
|
8
7
|
|
|
9
|
-
## This project is deprecated
|
|
10
|
-
|
|
11
|
-
Next.js v13.3 introduced [Parallel Routes and Intercepting Routes](https://nextjs.org/blog/next-13-3#parallel-routes-and-interception) which can natively provide the same functionality of this library.
|
|
12
|
-
|
|
13
8
|
## Intro
|
|
14
9
|
|
|
15
10
|
React hook that generates round trip hrefs to enable [contextual routing][next-docs-contextual-routing] for [Next.js][next]. Take a look to the [demo 👈][demo].
|
|
@@ -122,10 +117,11 @@ The path to return to to close contextual navigation.
|
|
|
122
117
|
|
|
123
118
|
## Next.js versions support
|
|
124
119
|
|
|
125
|
-
| Next use contextual routing | Next.js
|
|
126
|
-
| --------------------------- |
|
|
127
|
-
| v2.2.0 | v9.X -> v12.X
|
|
128
|
-
| v3.0.0
|
|
120
|
+
| Next use contextual routing | Next.js |
|
|
121
|
+
| --------------------------- | -------------- |
|
|
122
|
+
| v2.2.0 | v9.X -> v12.X |
|
|
123
|
+
| v3.0.0 | v13.X |
|
|
124
|
+
| v3.2.0 + | v13.X -> v14.X |
|
|
129
125
|
|
|
130
126
|
## Notes
|
|
131
127
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-use-contextual-routing",
|
|
3
3
|
"description": "Generate Next.js contextual routing paths",
|
|
4
|
-
"version": "3.0
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -15,15 +15,18 @@
|
|
|
15
15
|
"preversion": "npm run prepare",
|
|
16
16
|
"version": "git add package.json",
|
|
17
17
|
"postversion": "git push && git push --tags",
|
|
18
|
-
"prepare": "npm run
|
|
19
|
-
"test": "jest",
|
|
20
|
-
"test:source": "npm t -- --coverage",
|
|
18
|
+
"prepare": "npx simple-git-hooks && npm run source:check && npm run test && npm run build && npm run test:bundles",
|
|
19
|
+
"test": "jest --coverage",
|
|
21
20
|
"test:bundles": "es-check es5 --module './@(dist)/*.js'",
|
|
22
|
-
"
|
|
21
|
+
"tag": "node ./scripts/tag.js",
|
|
22
|
+
"prettier:check": "prettier . --check",
|
|
23
|
+
"prettier:fix": "npm run prettier:check -- --write",
|
|
24
|
+
"type:check": "tsc --noEmit",
|
|
25
|
+
"source:check": "npm run prettier:check && npm run type:check",
|
|
26
|
+
"source:fix": "npm run prettier:fix",
|
|
23
27
|
"start": "npm run demo:start",
|
|
24
28
|
"demo:start": "cd ./demo && next",
|
|
25
|
-
"demo:build": "npm run build && cd ./demo && BUILD_TARGET=github-pages next build &&
|
|
26
|
-
"demo:deploy": "npm run demo:build && touch demo/out/.nojekyll && gh-pages -d demo/out --dotfiles"
|
|
29
|
+
"demo:build": "npm run build && cd ./demo && BUILD_TARGET=github-pages next build && touch ./out/.nojekyll"
|
|
27
30
|
},
|
|
28
31
|
"keywords": [
|
|
29
32
|
"next",
|
|
@@ -45,26 +48,26 @@
|
|
|
45
48
|
"qs-stringify": "^1.2.1"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
|
-
"@
|
|
51
|
+
"@changesets/cli": "^2.27.7",
|
|
52
|
+
"@testing-library/react": "^16.0.0",
|
|
49
53
|
"@types/jest": "^29.2.3",
|
|
50
54
|
"@types/react": "^18.0.25",
|
|
51
|
-
"es-check": "^
|
|
52
|
-
"gh-pages": "^3.1.0",
|
|
53
|
-
"husky": "^4.0.0",
|
|
55
|
+
"es-check": "^7.2.1",
|
|
54
56
|
"jest": "^29.3.1",
|
|
55
57
|
"jest-environment-jsdom": "^29.3.1",
|
|
56
|
-
"
|
|
57
|
-
"next": "
|
|
58
|
-
"prettier": "^
|
|
58
|
+
"next": "^14.2.4",
|
|
59
|
+
"next-13": "npm:next@^13.5.6",
|
|
60
|
+
"prettier": "^3.3.2",
|
|
59
61
|
"react": "^18.2.0",
|
|
60
62
|
"react-dom": "^18.2.0",
|
|
61
63
|
"react-modal": "^3.16.1",
|
|
62
64
|
"react-test-renderer": "^18.2.0",
|
|
65
|
+
"simple-git-hooks": "^2.11.1",
|
|
63
66
|
"ts-jest": "^29.0.3",
|
|
64
|
-
"typescript": "^
|
|
67
|
+
"typescript": "^5.5.3"
|
|
65
68
|
},
|
|
66
69
|
"peerDependencies": {
|
|
67
|
-
"next": "^13.0.0",
|
|
70
|
+
"next": "^13.0.0 | ^14.0.0",
|
|
68
71
|
"react": ">=18.0.0"
|
|
69
72
|
},
|
|
70
73
|
"jest": {
|
|
@@ -81,15 +84,7 @@
|
|
|
81
84
|
],
|
|
82
85
|
"testEnvironment": "jsdom"
|
|
83
86
|
},
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"pre-commit": "lint-staged"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"lint-staged": {
|
|
90
|
-
"**/*.{js,json,ts,md}": [
|
|
91
|
-
"prettier",
|
|
92
|
-
"npm t -- ."
|
|
93
|
-
]
|
|
87
|
+
"simple-git-hooks": {
|
|
88
|
+
"pre-commit": "npm run source:check && npm run test"
|
|
94
89
|
}
|
|
95
90
|
}
|