Skip to content

Commit 4b470dd

Browse files
author
JH
committed
chore(lib): update and clean up deps, improve scripts and tsconfig
1 parent 5f1f0d6 commit 4b470dd

File tree

2 files changed

+41
-56
lines changed

2 files changed

+41
-56
lines changed

lib/package.json

+21-43
Original file line numberDiff line numberDiff line change
@@ -17,63 +17,41 @@
1717
},
1818
"author": "Kévin Dunglas",
1919
"homepage": "https://github.com/dunglas/react-esi#readme",
20-
"exports": {
21-
".": {
22-
"types": "./lib/withESI.d.ts",
23-
"import": "./lib/withESI.js",
24-
"require": "./lib/withESI.js"
25-
},
26-
"./lib/*": {
27-
"types": "./lib/*.d.ts",
28-
"default": "./lib/*.js"
29-
},
30-
"./*": {
31-
"types": "./lib/*.d.ts",
32-
"default": "./lib/*.js"
33-
}
34-
},
3520
"main": "lib/withESI.js",
3621
"typings": "lib/withESI.d.ts",
3722
"scripts": {
38-
"build": "pnpm clean && pnpm exec tsc -p tsconfig.build.json",
39-
"clean": "rm -rf ./lib/*",
4023
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
4124
"cs": "prettier --write '**/*.{js,jsx,ts,tsx,json,css,scss,md}'",
4225
"lint": "eslint --ext js,jsx,ts,tsx",
43-
"lint:fix": "eslint --fix --ext js,jsx,ts,tsx src examples",
26+
"lint:fix": "eslint --fix --ext js,jsx,ts,tsx src",
4427
"test": "jest",
45-
"watch": "tsc -w -p tsconfig.build.json"
28+
"clean": "rm -rf ./lib",
29+
"typecheck": "tsc --noEmit",
30+
"build": "pnpm clean && tsc -p tsconfig.build.json",
31+
"build:watch": "tsc -w -p tsconfig.build.json"
4632
},
4733
"devDependencies": {
48-
"@types/express": "^4.17.20",
49-
"@types/jest": "^29.5.6",
50-
"@types/node": "^18.17.4",
51-
"@types/prop-types": "^15.7.9",
52-
"@types/react": "^18.2.30",
53-
"@types/react-dom": "^18.2.14",
54-
"@types/react-test-renderer": "^18.0.5",
55-
"@types/supertest": "^2.0.15",
56-
"@typescript-eslint/eslint-plugin": "^6.8.0",
57-
"@typescript-eslint/parser": "^6.8.0",
34+
"@types/express": "^4.17.21",
35+
"@types/jest": "^29.5.12",
36+
"@types/node": "^20.11.25",
37+
"@types/react-test-renderer": "^18.0.7",
38+
"@types/supertest": "^6.0.2",
5839
"coveralls": "^3.1.1",
59-
"eslint": "^8.51.0",
60-
"eslint-config-prettier": "^9.0.0",
61-
"eslint-plugin-import": "^2.28.1",
62-
"eslint-plugin-jsx-a11y": "^6.7.1",
63-
"eslint-plugin-prettier": "^5.0.1",
64-
"eslint-plugin-react": "^7.33.2",
65-
"eslint-plugin-react-hooks": "^4.6.0",
66-
"express": "^4.18.2",
67-
"jest": "^29.5.6",
40+
"eslint": "^8.57.0",
41+
"express": "^4.18.3",
42+
"jest": "^29.7.0",
6843
"jest-environment-jsdom": "^29.7.0",
69-
"prettier": "^3.0.3",
44+
"prettier": "^3.2.5",
7045
"react-test-renderer": "^18.2.0",
71-
"supertest": "^6.3.3",
72-
"ts-jest": "^29.1.1",
73-
"ts-node": "^10.9.1",
74-
"typescript": "^5.2.2"
46+
"supertest": "^6.3.4",
47+
"ts-jest": "^29.1.2",
48+
"ts-node": "^10.9.2",
49+
"typescript": "^5.3.3"
7550
},
7651
"peerDependencies": {
52+
"@types/prop-types": "^15.7.11",
53+
"@types/react": "^16.7.0 || ^17.0.0 || ^18.0.0",
54+
"@types/react-dom": "^16.7.0 || ^17.0.0 || ^18.0.0",
7755
"prop-types": "^15.8.1",
7856
"react": "^16.7.0 || ^17.0.0 || ^18.0.0",
7957
"react-dom": "^16.7.0 || ^17.0.0 || ^18.0.0"

lib/tsconfig.json

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
{
22
"$schema": "https://json.schemastore.org/tsconfig",
33
"compilerOptions": {
4-
"rootDir": "./src/",
4+
/* Type Checking */
5+
"strict": true,
6+
7+
/* Modules */
8+
"moduleResolution": "Node10",
59
"module": "CommonJS",
6-
"esModuleInterop": true,
7-
"outDir": "./lib/",
10+
"rootDir": "./src/",
11+
12+
/* Emit */
13+
"declaration": true,
14+
"declarationMap": true,
815
"sourceMap": true,
9-
"strictNullChecks": true,
10-
"forceConsistentCasingInFileNames": true,
11-
"strictFunctionTypes": true,
12-
"noImplicitAny": true,
13-
"noImplicitThis": true,
14-
"types": ["jest", "node"],
15-
"moduleResolution": "Node10",
16-
"strict": false,
16+
"outDir": "./lib/",
17+
18+
/* Interop Constraints */
19+
"esModuleInterop": true,
1720
"isolatedModules": true,
21+
"forceConsistentCasingInFileNames": true,
22+
"allowSyntheticDefaultImports": true,
23+
24+
/* Language and Environment */
1825
"jsx": "react-jsx",
19-
"target": "ES5",
20-
"declaration": true
26+
"lib": ["DOM", "ESNext"],
27+
"target": "ES6"
2128
},
2229
"include": ["./src/"]
2330
}

0 commit comments

Comments
 (0)