Skip to content

Commit 48c7c52

Browse files
committed
feat: useRouteLoaderData and bun
1 parent 8ce9b7a commit 48c7c52

File tree

11 files changed

+70
-3396
lines changed

11 files changed

+70
-3396
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ jobs:
2727
cache: 'pnpm'
2828
registry-url: https://npm.pkg.github.com/
2929

30+
- name: Creating .npmrc
31+
run: |
32+
cat << EOF > "$HOME/.npmrc"
33+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
34+
EOF
35+
env:
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
3038
- name: Install dependencies
3139
shell: bash
3240
run: pnpm install --frozen-lockfile

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# react-router-typesafe
22

3+
## 1.2.0
4+
5+
### Minor Changes
6+
7+
- Add `useLoaderData` hook types
8+
- Migrate from pnpm to bun
9+
310
## 1.1.0
411

512
### Minor Changes

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ Feel free to improve the code and submit a pull request. If you're not sure abou
5757

5858
## Patched functions
5959

60-
| Status | Utility | Before | After |
61-
| ------ | -------------------- | ---------- | ----------------------------------------------------- |
62-
|| `defer` | `Response` | Generic matching the first argument |
63-
|| `useLoaderData` | `unknown` | Generic function with the type of the loader function |
64-
|| `useActionData` | `unknown` | Generic function with the type of the action function |
65-
| | `useRouteLoaderData` | `unknown` | |
60+
| Status | Utility | Before | After |
61+
| ------ | -------------------- | ---------- | ------------------------------------------------------------ |
62+
|| `defer` | `Response` | Generic matching the first argument |
63+
|| `useLoaderData` | `unknown` | Generic function with the type of the loader function passed |
64+
|| `useActionData` | `unknown` | Generic function with the type of the action function passed |
65+
| | `useRouteLoaderData` | `unknown` | Generic function with the type of the loader function passed |
6666

6767
## About
6868

bun.lockb

169 KB
Binary file not shown.

bunfig.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[test]
2+
preload = "./happydom.ts"

happydom.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { GlobalRegistrator } from '@happy-dom/global-registrator';
2+
3+
GlobalRegistrator.register();

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-typesafe",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "type safe patches of react-router-dom",
55
"main": "./dist/index.js",
66
"module": "./dist/index.mjs",
@@ -17,7 +17,6 @@
1717
],
1818
"scripts": {
1919
"build": "tsup",
20-
"test": "vitest",
2120
"release": "pnpm build && changeset publish"
2221
},
2322
"keywords": [
@@ -36,10 +35,15 @@
3635
},
3736
"devDependencies": {
3837
"@changesets/cli": "^2.26.2",
38+
"@happy-dom/global-registrator": "^11.0.6",
39+
"@testing-library/react": "^14.0.0",
40+
"bun-types": "^1.0.1",
3941
"eslint": "^8.45.0",
42+
"expect-type": "^0.16.0",
4043
"prettier": "^3.0.0",
4144
"tsup": "^7.1.0",
4245
"typescript": "^5.1.6",
43-
"vitest": "^0.33.0"
44-
}
46+
"happy-dom": "^11.0.6"
47+
},
48+
"dependencies": {}
4549
}

0 commit comments

Comments
 (0)