|
1 | 1 | {
|
2 | 2 | "name": "@restart/hooks",
|
3 | 3 | "version": "0.5.1",
|
4 |
| - "main": "lib/cjs/index.js", |
5 |
| - "types": "lib/cjs/index.d.ts", |
6 |
| - "module": "lib/esm/index.js", |
| 4 | + "type": "module", |
7 | 5 | "exports": {
|
8 |
| - ".": { |
9 |
| - "types": "./esm/index.d.ts", |
10 |
| - "import": "./esm/index.js", |
11 |
| - "require": "./cjs/index.js" |
12 |
| - }, |
13 | 6 | "./*": {
|
14 |
| - "types": "./esm/*.d.ts", |
15 |
| - "import": "./esm/*.js", |
16 |
| - "require": "./cjs/*.js" |
| 7 | + "require": { |
| 8 | + "types": "./cjs/index.d.ts", |
| 9 | + "default": "./cjs/index.js" |
| 10 | + }, |
| 11 | + "import": { |
| 12 | + "types": "./lib/index.d.ts", |
| 13 | + "default": "./lib/index.js" |
| 14 | + } |
17 | 15 | }
|
18 | 16 | },
|
| 17 | + "files": [ |
| 18 | + "cjs", |
| 19 | + "lib", |
| 20 | + "CHANGELOG.md" |
| 21 | + ], |
19 | 22 | "repository": {
|
20 | 23 | "type": "git",
|
21 |
| - "url": "git+https://github.com/jquense/react-common-hooks.git" |
| 24 | + "url": "git+https://github.com/react-restart/hooks.git" |
22 | 25 | },
|
23 | 26 | "author": {
|
24 | 27 | "name": "Jason Quense",
|
|
31 | 34 | "homepage": "https://github.com/react-restart/hooks#readme",
|
32 | 35 | "scripts": {
|
33 | 36 | "bootstrap": "yarn && yarn --cwd www",
|
34 |
| - "test": "jest --coverage", |
35 |
| - "tdd": "jest --watch", |
36 |
| - "build:pick": "cherry-pick --name=@restart/hooks --cwd=lib --input-dir=../src --cjs-dir=cjs --esm-dir=esm", |
37 |
| - "build": "rimraf lib && 4c build src && yarn build:pick", |
| 37 | + "test": "vitest run --coverage", |
| 38 | + "tdd": "vitest", |
| 39 | + "build": "rimraf lib cjs && concurrently --names 'esm,cjs' 'yarn build:esm' 'yarn build:cjs' && concurrently --names 'esm types,cjs types' 'yarn build:esm:types' 'yarn build:cjs:types'", |
| 40 | + "build:esm": "babel src --env-name esm --out-dir lib --extensions '.ts' --ignore='**/*.d.ts'", |
| 41 | + "build:esm:types": "tsc -p . --emitDeclarationOnly --declaration --outDir lib", |
| 42 | + "build:cjs": "babel src --out-dir cjs --extensions '.ts' --ignore='**/*.d.ts' && echo '{\"type\": \"commonjs\"}' > cjs/package.json", |
| 43 | + "build:cjs:types": "tsc -p . --emitDeclarationOnly --declaration --outDir cjs --module commonjs --moduleResolution node", |
38 | 44 | "deploy-docs": "yarn --cwd www build --prefix-paths && gh-pages -d www/public",
|
39 | 45 | "prepublishOnly": "yarn build",
|
| 46 | + "typecheck": "tsc -p . --noEmit", |
40 | 47 | "release": "rollout"
|
41 | 48 | },
|
42 | 49 | "jest": {
|
|
52 | 59 | "trailingComma": "all"
|
53 | 60 | },
|
54 | 61 | "publishConfig": {
|
55 |
| - "access": "public", |
56 |
| - "directory": "lib" |
| 62 | + "access": "public" |
57 | 63 | },
|
58 | 64 | "release": {
|
59 | 65 | "conventionalCommits": true
|
|
64 | 70 | "devDependencies": {
|
65 | 71 | "@4c/babel-preset": "^10.2.1",
|
66 | 72 | "@4c/cli": "^4.0.4",
|
67 |
| - "@4c/jest-preset": "^1.8.1", |
68 | 73 | "@4c/rollout": "^4.0.2",
|
69 | 74 | "@4c/tsconfig": "^0.4.1",
|
70 |
| - "@babel/cli": "^7.22.9", |
71 |
| - "@babel/core": "^7.22.9", |
72 |
| - "@babel/preset-typescript": "^7.22.5", |
73 |
| - "@testing-library/react": "^12.1.5", |
74 |
| - "@testing-library/react-hooks": "^7.0.0", |
75 |
| - "@types/jest": "^29.5.3", |
| 75 | + "@babel/cli": "^7.26.4", |
| 76 | + "@babel/core": "^7.26.0", |
| 77 | + "@babel/preset-typescript": "^7.26.0", |
| 78 | + "@testing-library/dom": "^10.4.0", |
| 79 | + "@testing-library/react": "^16.1.0", |
76 | 80 | "@types/lodash": "^4.14.195",
|
77 |
| - "@types/react": "^18.2.15", |
78 |
| - "babel-jest": "^29.6.1", |
| 81 | + "@types/react": "^19.0.2", |
| 82 | + "@vitest/coverage-v8": "2.1.8", |
79 | 83 | "babel-plugin-transform-rename-import": "^2.3.0",
|
80 | 84 | "cherry-pick": "^0.5.0",
|
81 | 85 | "codecov": "^3.8.3",
|
| 86 | + "concurrently": "^9.1.2", |
82 | 87 | "eslint": "^8.44.0",
|
83 | 88 | "gh-pages": "^3.1.0",
|
84 | 89 | "husky": "^4.3.6",
|
85 |
| - "jest": "^29.6.1", |
86 |
| - "jest-environment-jsdom": "^29.6.1", |
| 90 | + "jsdom": "^25.0.1", |
87 | 91 | "lint-staged": "^13.2.3",
|
88 | 92 | "mq-polyfill": "^1.1.8",
|
89 | 93 | "prettier": "^3.0.0",
|
90 |
| - "react": "^16.13.0", |
91 |
| - "react-dom": "^16.13.0", |
| 94 | + "react": "^19.0.0", |
| 95 | + "react-dom": "^19.0.0", |
92 | 96 | "rimraf": "^5.0.1",
|
93 |
| - "typescript": "^5.1.6" |
| 97 | + "typescript": "^5.1.6", |
| 98 | + "vitest": "^2.1.8" |
94 | 99 | },
|
95 | 100 | "dependencies": {
|
96 | 101 | "dequal": "^2.0.3"
|
|
0 commit comments