Skip to content

Commit c754fd8

Browse files
committed
chore: upgrade react 19
1 parent 12b1b8c commit c754fd8

File tree

283 files changed

+7376
-9364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+7376
-9364
lines changed

eslint.config.js

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
import antfu from '@antfu/eslint-config'
1+
import { basic, react } from '@hunghg255/eslint-config';
2+
import tailwind from 'eslint-plugin-tailwindcss';
23

3-
export default antfu({
4-
jsonc: false,
5-
yaml: false,
6-
react: true,
7-
toml: false,
8-
rules: {
9-
'node/prefer-global/process': 'off',
10-
'ts/ban-ts-comment': 'warn',
4+
export default [
5+
...basic(),
6+
...react(),
7+
...tailwind.configs['flat/recommended'],
8+
{
9+
rules: {
10+
indent: 'warn',
11+
"@typescript-eslint/unbound-method": "off",
12+
quotes: ["error", "single"]
13+
},
1114
},
12-
})
15+
{
16+
ignores: [
17+
'dist/**/*.ts',
18+
'dist/**',
19+
'contributorkit.config.ts',
20+
'tailwind.config.js',
21+
'postcss.config.js',
22+
'playground/**'
23+
],
24+
},
25+
];

package.json

Lines changed: 55 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,69 @@
22
"name": "reactjs-tiptap-editor",
33
"type": "module",
44
"version": "0.1.16",
5+
"packageManager": "pnpm@8.15.9",
6+
"description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
7+
"license": "MIT",
8+
"homepage": "https://reactjs-tiptap-editor.vercel.app/",
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/hunghg255/reactjs-tiptap-editor.git"
12+
},
13+
"bugs": "https://github.com/hunghg255/reactjs-tiptap-editor/issues",
14+
"keywords": [
15+
"react",
16+
"tiptap",
17+
"editor",
18+
"wysiwyg",
19+
"rich-text",
20+
"reactjs-tiptap-editor",
21+
"tiptap-editor",
22+
"tiptap-react",
23+
"tiptap-react-editor",
24+
"tiptap-react-wysiwyg",
25+
"tiptap-react-rich-text",
26+
"tiptap-react-rc-editor",
27+
"tiptap-react-rc-wysiwyg",
28+
"tiptap-react-rc-rich-text"
29+
],
30+
"sideEffects": false,
531
"main": "./lib/index.cjs",
632
"module": "./lib/index.js",
733
"types": "./lib/index.d.ts",
8-
"description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
9-
"packageManager": "pnpm@8.15.9",
1034
"exports": {
1135
".": {
12-
"import": {
13-
"types": "./lib/index.d.ts",
14-
"default": "./lib/index.js"
15-
},
1636
"require": {
1737
"types": "./lib/index.d.cts",
1838
"default": "./lib/index.cjs"
39+
},
40+
"import": {
41+
"types": "./lib/index.d.ts",
42+
"default": "./lib/index.js"
1943
}
2044
},
2145
"./extension-bundle": {
22-
"import": {
23-
"types": "./lib/extension-bundle.d.ts",
24-
"default": "./lib/extension-bundle.js"
25-
},
2646
"require": {
2747
"types": "./lib/extension-bundle.d.cts",
2848
"default": "./lib/extension-bundle.cjs"
49+
},
50+
"import": {
51+
"types": "./lib/extension-bundle.d.ts",
52+
"default": "./lib/extension-bundle.js"
2953
}
3054
},
3155
"./locale-bundle": {
32-
"import": {
33-
"types": "./lib/locale-bundle.d.ts",
34-
"default": "./lib/locale-bundle.js"
35-
},
3656
"require": {
3757
"types": "./lib/locale-bundle.d.cts",
3858
"default": "./lib/locale-bundle.cjs"
59+
},
60+
"import": {
61+
"types": "./lib/locale-bundle.d.ts",
62+
"default": "./lib/locale-bundle.js"
3963
}
4064
},
4165
"./style.css": {
42-
"import": "./lib/style.css",
43-
"require": "./lib/style.css"
66+
"require": "./lib/style.css",
67+
"import": "./lib/style.css"
4468
},
4569
"./lib/*": "./lib/*",
4670
"./package.json": "./package.json",
@@ -60,8 +84,6 @@
6084
]
6185
}
6286
},
63-
"sideEffects": false,
64-
"license": "MIT",
6587
"files": [
6688
"lib",
6789
"package.json",
@@ -92,7 +114,7 @@
92114
"gen-contributors": "contributorkit"
93115
},
94116
"dependencies": {
95-
"@excalidraw/excalidraw": "^0.17.6",
117+
"@excalidraw/excalidraw": "^0.17.0",
96118
"@radix-ui/react-checkbox": "^1.1.4",
97119
"@radix-ui/react-dialog": "^1.1.6",
98120
"@radix-ui/react-dropdown-menu": "^2.1.6",
@@ -171,23 +193,25 @@
171193
"svg64": "^2.0.0",
172194
"tippy.js": "^6.3.7"
173195
},
196+
"peerDependencies": {
197+
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0",
198+
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0"
199+
},
174200
"devDependencies": {
175-
"@antfu/eslint-config": "^2.27.3",
176201
"@eslint-react/eslint-plugin": "^1.30.2",
177-
"@total-typescript/ts-reset": "^0.5.1",
202+
"@hunghg255/eslint-config": "^0.0.16",
178203
"@types/deep-equal": "^1.0.4",
179204
"@types/katex": "^0.16.7",
180205
"@types/lodash-es": "^4.17.12",
181206
"@types/node": "^22.13.9",
182-
"@types/react": "^18.3.18",
183-
"@types/react-dom": "^18.3.5",
207+
"@types/react": "^19.0.10",
208+
"@types/react-dom": "^19.0.4",
184209
"@vitejs/plugin-react": "^4.3.4",
185210
"autoprefixer": "^10.4.20",
186211
"bumpp": "^9.11.1",
187212
"contributorkit": "^0.0.4",
188-
"eslint": "^8.57.1",
189-
"eslint-plugin-react-hooks": "^4.6.2",
190-
"eslint-plugin-react-refresh": "^0.4.19",
213+
"eslint": "^9.20.1",
214+
"eslint-plugin-tailwindcss": "^3.18.0",
191215
"esno": "^4.8.0",
192216
"execa": "^9.5.2",
193217
"git-scm-hooks": "^0.0.11",
@@ -197,15 +221,15 @@
197221
"postcss": "^8.5.3",
198222
"postcss-replace": "^2.0.1",
199223
"postcss-scss": "^4.0.9",
200-
"react": "^18.3.1",
201-
"react-dom": "^18.3.1",
224+
"react": "^19.0.0",
225+
"react-dom": "^19.0.0",
202226
"sass": "^1.85.1",
203227
"tailwind-merge": "^2.6.0",
204228
"tailwindcss": "^3.4.17",
205229
"tailwindcss-animate": "^1.0.7",
206-
"typescript": "^5.8.2",
230+
"typescript": "^5.7.3",
207231
"verify-commit-msg": "^0.0.14",
208-
"vite": "^5.4.14",
232+
"vite": "^6.2.1",
209233
"vite-plugin-dts": "^4.5.3"
210234
},
211235
"browserslist": [
@@ -217,31 +241,5 @@
217241
"git-hooks": {
218242
"pre-commit": "npm run lint:fix",
219243
"commit-msg": "npm run verify-commit"
220-
},
221-
"peerDependencies": {
222-
"react": ">= 17.0.0",
223-
"react-dom": ">= 17.0.0"
224-
},
225-
"keywords": [
226-
"react",
227-
"tiptap",
228-
"editor",
229-
"wysiwyg",
230-
"rich-text",
231-
"reactjs-tiptap-editor",
232-
"tiptap-editor",
233-
"tiptap-react",
234-
"tiptap-react-editor",
235-
"tiptap-react-wysiwyg",
236-
"tiptap-react-rich-text",
237-
"tiptap-react-rc-editor",
238-
"tiptap-react-rc-wysiwyg",
239-
"tiptap-react-rc-rich-text"
240-
],
241-
"homepage": "https://reactjs-tiptap-editor.vercel.app/",
242-
"repository": {
243-
"type": "git",
244-
"url": "git+https://github.com/hunghg255/reactjs-tiptap-editor.git"
245-
},
246-
"bugs": "https://github.com/hunghg255/reactjs-tiptap-editor/issues"
244+
}
247245
}

playground/package.json

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,24 @@
1111
"lint": "eslint --ext .ts,.tsx src --color",
1212
"format": "prettier --write \"./src/**/*.{ts,tsx,json}\"",
1313
"analyze": "npm run lint && tsc && vite build --mode=analyze && source-map-explorer 'dist/assets/*.js'",
14-
"verify-commit": "verify-commit-msg",
15-
"postinstall": "git-scm-hooks",
1614
"release": "bumpp -r"
1715
},
1816
"dependencies": {
19-
"react": "^18.3.1",
20-
"react-dom": "^18.3.1",
17+
"react": "^19.0.0",
18+
"react-dom": "^19.0.0",
2119
"reactjs-tiptap-editor": "workspace:*"
2220
},
2321
"devDependencies": {
24-
"@hunghg255/eslint-config-react": "^0.0.18",
25-
"@total-typescript/ts-reset": "^0.5.1",
2622
"@types/node": "^22.3.0",
27-
"@types/react": "^18.3.3",
28-
"@types/react-dom": "^18.3.0",
23+
"@types/react": "^19.0.10",
24+
"@types/react-dom": "^19.0.4",
2925
"@vitejs/plugin-react": "^4.3.1",
3026
"bumpp": "^9.5.1",
31-
"eslint": "^8.57.0",
32-
"eslint-config-react-app": "^7.0.1",
3327
"git-scm-hooks": "^0.0.11",
3428
"prettier": "^2.8.8",
3529
"sass": "^1.77.8",
3630
"source-map-explorer": "^2.5.3",
37-
"typescript": "^5.5.4",
38-
"verify-commit-msg": "^0.0.14",
39-
"vite": "^5.4.0",
40-
"vite-plugin-checker": "^0.7.2",
41-
"vite-plugin-environment": "^1.1.3",
42-
"vite-plugin-lightningcss": "^0.0.5"
43-
},
44-
"browserslist": [
45-
">0.3%",
46-
"not ie 11",
47-
"not dead",
48-
"not op_mini all"
49-
],
50-
"git-hooks": {
51-
"pre-commit": "npm run lint",
52-
"commit-msg": "npm run verify-commit"
31+
"typescript": "^5.7.3",
32+
"vite": "^6.2.0"
5333
}
5434
}

playground/src/types/reset.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

playground/vite.config.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,18 @@ import * as path from 'node:path'
22

33
import react from '@vitejs/plugin-react'
44
import { defineConfig } from 'vite'
5-
import checker from 'vite-plugin-checker'
6-
import EnvironmentPlugin from 'vite-plugin-environment'
75

86
// https://vitejs.dev/config/
97
export default defineConfig(({ mode }) => {
108
const isDev = mode !== 'production'
119
const isAnalyze = mode === 'analyze'
1210

1311
return {
12+
define: {
13+
'process.env': {}
14+
},
1415
plugins: [
1516
react(),
16-
EnvironmentPlugin('all'),
17-
// resolve({ "react-codemirror2": `
18-
// const UnControlled = {};
19-
// export {
20-
// UnControlled,
21-
// }`
22-
// }
23-
checker({
24-
typescript: true,
25-
}),
26-
// lightningcss({
27-
// browserslist: '>= 0.25%',
28-
// }),
2917
],
3018
optimizeDeps: {
3119
include: ['react'],

0 commit comments

Comments
 (0)