|
12 | 12 | "bugs": { |
13 | 13 | "url": "https://github.com/homerchen19/use-undo/issues" |
14 | 14 | }, |
15 | | - "source": "index.ts", |
16 | | - "main": "lib/use-undo.js", |
17 | | - "umd:main": "lib/use-undo.umd.js", |
18 | | - "module": "lib/use-undo.m.js", |
| 15 | + "main": "lib/use-undo.cjs", |
| 16 | + "module": "lib/use-undo.mjs", |
19 | 17 | "types": "lib/index.d.ts", |
| 18 | + "exports": { |
| 19 | + ".": { |
| 20 | + "import": { |
| 21 | + "types": "./lib/index.d.ts", |
| 22 | + "default": "./lib/use-undo.mjs" |
| 23 | + }, |
| 24 | + "require": { |
| 25 | + "types": "./lib/index.d.ts", |
| 26 | + "default": "./lib/use-undo.cjs" |
| 27 | + } |
| 28 | + } |
| 29 | + }, |
20 | 30 | "scripts": { |
21 | | - "build": "rimraf lib && microbundle -o lib/ --name use-undo --sourcemap false --no-compress", |
22 | | - "prepublishOnly": "yarn build", |
23 | | - "preversion": "yarn test:cov", |
24 | | - "test": "jest", |
25 | | - "test:cov": "jest --coverage --runInBand --forceExit", |
26 | | - "test:watch": "jest --watch", |
27 | | - "pre-commit": "pretty-quick --staged", |
| 31 | + "build": "vite build", |
| 32 | + "prepublishOnly": "pnpm build", |
| 33 | + "preversion": "pnpm test:cov", |
| 34 | + "test": "vitest run", |
| 35 | + "test:cov": "vitest run --coverage", |
| 36 | + "test:watch": "vitest", |
28 | 37 | "pretty-quick": "pretty-quick", |
29 | | - "prepare": "husky install" |
| 38 | + "prepare": "husky" |
30 | 39 | }, |
31 | 40 | "files": [ |
32 | 41 | "lib" |
33 | 42 | ], |
34 | 43 | "devDependencies": { |
35 | | - "@testing-library/react": "^11.2.7", |
36 | | - "@types/jest": "^27", |
37 | | - "@types/node": "^15.6.1", |
38 | | - "@types/react": "^17.0.8", |
39 | | - "@types/react-dom": "^17.0.5", |
40 | | - "husky": "^6.0.0", |
41 | | - "jest": "^27.0.3", |
42 | | - "microbundle": "^0.13.1", |
43 | | - "prettier": "^2.3.0", |
44 | | - "pretty-quick": "^3.1.0", |
45 | | - "react": "^17.0.2", |
46 | | - "react-dom": "^17.0.2", |
47 | | - "rimraf": "^3.0.2", |
48 | | - "ts-jest": "^27.0.1", |
49 | | - "typescript": "^4.3.2" |
| 44 | + "@testing-library/dom": "^10.4.1", |
| 45 | + "@testing-library/react": "^16.3.2", |
| 46 | + "@types/react": "^18.3.28", |
| 47 | + "@types/react-dom": "^18.3.7", |
| 48 | + "@vitest/coverage-v8": "^4.1.1", |
| 49 | + "husky": "^9.1.7", |
| 50 | + "jsdom": "^29.0.1", |
| 51 | + "prettier": "^3.8.1", |
| 52 | + "pretty-quick": "^4.2.2", |
| 53 | + "react": "^18.3.1", |
| 54 | + "react-dom": "^18.3.1", |
| 55 | + "typescript": "^6.0.2", |
| 56 | + "vite": "^8.0.2", |
| 57 | + "vite-plugin-dts": "^4.5.4", |
| 58 | + "vitest": "^4.1.1" |
50 | 59 | }, |
51 | 60 | "peerDependencies": { |
52 | 61 | "react": ">=16.8.6", |
|
0 commit comments