|
4 | 4 | "description": "Useful components and utilities for working with React Router",
|
5 | 5 | "license": "MIT",
|
6 | 6 | "repository": "sindresorhus/react-router-util",
|
| 7 | + "funding": "https://github.com/sponsors/sindresorhus", |
7 | 8 | "author": {
|
8 | 9 | "name": "Sindre Sorhus",
|
9 | 10 | "email": "sindresorhus@gmail.com",
|
10 |
| - "url": "sindresorhus.com" |
| 11 | + "url": "https://sindresorhus.com" |
11 | 12 | },
|
12 |
| - "main": "./dist/index.js", |
| 13 | + "type": "module", |
| 14 | + "exports": { |
| 15 | + "types": "./dist/index.d.ts", |
| 16 | + "default": "./dist/index.js" |
| 17 | + }, |
| 18 | + "sideEffects": false, |
13 | 19 | "engines": {
|
14 |
| - "node": ">=8" |
| 20 | + "node": ">=20" |
15 | 21 | },
|
16 | 22 | "scripts": {
|
17 |
| - "build": "babel index.js --out-dir=dist", |
18 |
| - "test": "xo && ava", |
| 23 | + "build": "tsc", |
| 24 | + "test": "npm run build && xo && tsx --test --tsconfig tsconfig.test.json test/*.test.tsx", |
19 | 25 | "prepare": "npm run build"
|
20 | 26 | },
|
21 | 27 | "files": [
|
|
40 | 46 | "helpers"
|
41 | 47 | ],
|
42 | 48 | "dependencies": {
|
43 |
| - "prop-types": "^15.6.0" |
| 49 | + "history": "^5.3.0" |
44 | 50 | },
|
45 | 51 | "devDependencies": {
|
46 |
| - "@babel/cli": "^7.5.0", |
47 |
| - "@babel/plugin-transform-modules-commonjs": "^7.5.0", |
48 |
| - "@babel/preset-env": "^7.5.4", |
49 |
| - "@babel/preset-react": "^7.0.0", |
50 |
| - "@babel/register": "^7.4.4", |
51 |
| - "ava": "^2.2.0", |
52 |
| - "babel-eslint": "^10.0.1", |
53 |
| - "babel-preset-env": "^1.6.1", |
54 |
| - "babel-preset-react": "^6.24.1", |
55 |
| - "enzyme": "^3.9.0", |
56 |
| - "enzyme-adapter-react-16": "^1.11.2", |
57 |
| - "eslint-config-xo-react": "^0.20.0", |
58 |
| - "eslint-plugin-react": "^7.14.2", |
59 |
| - "eslint-plugin-react-hooks": "^1.6.1", |
60 |
| - "jsdom": "^15.1.1", |
61 |
| - "react": "^16.8.6", |
62 |
| - "react-dom": "^16.8.6", |
63 |
| - "react-router-dom": "^5.0.1", |
64 |
| - "xo": "^0.24.0" |
| 52 | + "@sindresorhus/tsconfig": "^8.0.1", |
| 53 | + "@testing-library/react": "^16.3.0", |
| 54 | + "@testing-library/user-event": "^14.6.1", |
| 55 | + "@types/node": "^24.3.1", |
| 56 | + "@types/react": "^19.1.12", |
| 57 | + "@types/react-dom": "^19.1.9", |
| 58 | + "eslint-config-xo-react": "^0.27.0", |
| 59 | + "eslint-config-xo-typescript": "^3.0.0", |
| 60 | + "eslint-plugin-react": "^7.37.5", |
| 61 | + "eslint-plugin-react-hooks": "^5.2.0", |
| 62 | + "global-jsdom": "^26.0.0", |
| 63 | + "jsdom": "^26.1.0", |
| 64 | + "react": "^19.1.1", |
| 65 | + "react-dom": "^19.1.1", |
| 66 | + "react-router-dom": "^7.8.2", |
| 67 | + "tsx": "^4.20.5", |
| 68 | + "typescript": "^5.9.2", |
| 69 | + "xo": "^0.59.3" |
65 | 70 | },
|
66 | 71 | "peerDependencies": {
|
67 |
| - "react": ">=16.8", |
68 |
| - "react-router-dom": ">=5" |
| 72 | + "react": ">=19", |
| 73 | + "react-router-dom": ">=7" |
69 | 74 | },
|
70 | 75 | "xo": {
|
71 | 76 | "envs": [
|
72 | 77 | "node",
|
73 | 78 | "browser"
|
74 | 79 | ],
|
75 |
| - "parser": "babel-eslint", |
76 | 80 | "extends": [
|
77 |
| - "xo-react" |
| 81 | + "xo-react", |
| 82 | + "xo-typescript" |
| 83 | + ], |
| 84 | + "extensions": [ |
| 85 | + "ts", |
| 86 | + "tsx" |
78 | 87 | ],
|
79 | 88 | "rules": {
|
80 |
| - "import/no-unresolved": "off", |
81 |
| - "import/no-extraneous-dependencies": "off", |
82 |
| - "ava/no-ignored-test-files": "off", |
83 |
| - "unicorn/import-index": "off", |
84 |
| - "react/prop-types": "off", |
85 |
| - "react/require-default-props": "off" |
| 89 | + "@typescript-eslint/indent": "off", |
| 90 | + "unicorn/expiring-todo-comments": "off", |
| 91 | + "n/no-unsupported-features/node-builtins": "off" |
86 | 92 | }
|
87 |
| - }, |
88 |
| - "ava": { |
89 |
| - "files": [ |
90 |
| - "!test/fixtures/**/*", |
91 |
| - "!test/helpers/**/*" |
92 |
| - ], |
93 |
| - "require": [ |
94 |
| - "@babel/register", |
95 |
| - "./test/helpers/setup-browser-env.js", |
96 |
| - "./test/helpers/setup-enzyme.js" |
97 |
| - ] |
98 |
| - }, |
99 |
| - "babel": { |
100 |
| - "plugins": [ |
101 |
| - "@babel/plugin-transform-modules-commonjs" |
102 |
| - ], |
103 |
| - "presets": [ |
104 |
| - "@babel/preset-env", |
105 |
| - "@babel/preset-react" |
106 |
| - ] |
107 | 93 | }
|
108 | 94 | }
|
0 commit comments