Skip to content

Commit a22d10f

Browse files
authored
[migrate] upgrade to Node.js 22, PNPM 10, MobX-React-helper 0.4, EditorJS-HTML 4 & other latest Upstream packages (#62)
1 parent 446deca commit a22d10f

File tree

15 files changed

+4393
-4119
lines changed

15 files changed

+4393
-4119
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
- uses: pnpm/action-setup@v4
1616
with:
17-
version: 9
17+
version: 10
1818
- uses: actions/setup-node@v4
1919
with:
20-
node-version: 20
20+
node-version: 22
2121
registry-url: https://registry.npmjs.org
2222
cache: pnpm
2323
- name: Install Dependencies

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.*
2-
eslint.config.mjs
3-
vite.config.ts
2+
*.config.ts
43
docs/
54
preview/
65
api-extractor.json

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"rangav.vscode-thunder-client",
1313
"eamodio.gitlens",
1414
"github.vscode-pull-request-github",
15-
"github.vscode-github-actions"
15+
"github.vscode-github-actions",
16+
"github.copilot"
1617
]
1718
}

ReadMe.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
88

99
[![NPM](https://nodei.co/npm/idea-react.png?downloads=true&downloadRank=true&stars=true)][8]
1010

11-
- API document: https://idea2app.github.io/Idea-React/
12-
- Preview site: https://idea2app.github.io/Idea-React/preview/
13-
- Storybook playground: https://idea-react.vercel.app/
11+
- API document: https://idea2app.github.io/Idea-React/
12+
- Preview site: https://idea2app.github.io/Idea-React/preview/
13+
- Storybook playground: https://idea-react.vercel.app/
1414

1515
## Versions
1616

@@ -53,7 +53,7 @@ Table, List & Form components around Data models, have been migrated to https://
5353

5454
#### Map components
5555

56-
Open Map component & model, have been migrated to https://github.com/idea2app/OpenMap, since Idea-React v1.0.0.
56+
Open Map component & model, have been migrated to https://github.com/idea2app/OpenReactMap, since Idea-React v1.0.0.
5757

5858
### Utilities
5959

@@ -70,22 +70,10 @@ Open Map component & model, have been migrated to https://github.com/idea2app/Op
7070
### CSS on CDN
7171

7272
```html
73-
<link
74-
rel="stylesheet"
75-
href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css"
76-
/>
77-
<link
78-
rel="stylesheet"
79-
href="https://unpkg.com/[email protected]/font/bootstrap-icons.css"
80-
/>
81-
<link
82-
rel="stylesheet"
83-
href="https://unpkg.com/[email protected]/animate.min.css"
84-
/>
85-
<link
86-
rel="stylesheet"
87-
href="https://unpkg.com/[email protected]/themes/prism.min.css"
88-
/>
73+
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css" />
74+
<link rel="stylesheet" href="https://unpkg.com/[email protected]/font/bootstrap-icons.css" />
75+
<link rel="stylesheet" href="https://unpkg.com/[email protected]/animate.min.css" />
76+
<link rel="stylesheet" href="https://unpkg.com/[email protected]/themes/prism.min.css" />
8977
<link rel="stylesheet" href="https://unpkg.com/idea-react/dist/index.css" />
9078
```
9179

@@ -109,11 +97,11 @@ Compatible with MobX 6/7:
10997

11098
```tsx
11199
import { formToJSON } from 'web-utility';
112-
import { PureComponent } from 'react';
100+
import { Component } from 'react';
113101
import { Button, Form, Modal } from 'react-bootstrap';
114102
import { Dialog, DialogClose } from 'idea-react';
115103

116-
export class ExamplePage extends PureComponent {
104+
export class ExamplePage extends Component {
117105
inputDialog = new Dialog<Record<'a' | 'b', number>>(({ defer }) => (
118106
<Modal show={!!defer} onHide={() => defer?.reject(new DialogClose())}>
119107
<Modal.Header>Dialog</Modal.Header>

eslint.config.mjs renamed to eslint.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-check
21
import { fixupPluginRules } from '@eslint/compat';
32
import eslint from '@eslint/js';
43
import eslintConfigPrettier from 'eslint-config-prettier';
@@ -15,7 +14,6 @@ export default tsEslint.config(
1514
{
1615
plugins: {
1716
'@typescript-eslint': tsEslint.plugin,
18-
// @ts-expect-error https://github.com/jsx-eslint/eslint-plugin-react/issues/3699
1917
react: fixupPluginRules(reactPlugin),
2018
'simple-import-sort': simpleImportSortPlugin
2119
}

package.json

Lines changed: 53 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "idea-react",
3-
"version": "2.0.0-rc.8",
3+
"version": "2.0.0-rc.12",
44
"license": "LGPL-3.0-or-later",
55
"author": "[email protected]",
66
"description": "A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.",
@@ -22,40 +22,40 @@
2222
"types": "dist/index.d.ts",
2323
"main": "dist/index.js",
2424
"dependencies": {
25-
"@editorjs/editorjs": "^2.30.6",
26-
"@editorjs/paragraph": "^2.11.6",
25+
"@editorjs/editorjs": "^2.30.8",
26+
"@editorjs/paragraph": "^2.11.7",
2727
"@react-editor-js/core": "^2.1.0",
28-
"@swc/helpers": "^0.5.13",
28+
"@swc/helpers": "^0.5.17",
2929
"classnames": "^2.5.1",
30-
"editorjs-html": "^3.4.3",
30+
"editorjs-html": "^4.0.5",
3131
"html2canvas": "^1.4.1",
3232
"iterable-observer": "^1.1.0",
3333
"lodash": "^4.17.21",
34-
"mobx": ">=6.11",
35-
"mobx-react": ">=9.1",
36-
"mobx-react-helper": "^0.3.1",
37-
"prismjs": "^1.29.0",
38-
"react-bootstrap": "^2.10.5",
34+
"mobx": "^6.13.7",
35+
"mobx-react": "^9.2.0",
36+
"mobx-react-helper": "^0.4.0",
37+
"prismjs": "^1.30.0",
38+
"react-bootstrap": "^2.10.9",
3939
"react-editor-js": "^2.1.0",
40-
"react-element-to-jsx-string": "^15.0.0",
41-
"web-utility": "^4.4.1"
40+
"web-utility": "^4.4.3"
4241
},
4342
"peerDependencies": {
4443
"react": ">=16",
45-
"react-dom": ">=16"
44+
"react-dom": ">=16",
45+
"react-element-to-jsx-string": ">=15"
4646
},
4747
"devDependencies": {
48-
"@babel/plugin-proposal-decorators": "^7.25.9",
49-
"@babel/preset-typescript": "^7.26.0",
50-
"@eslint/compat": "^1.2.1",
51-
"@eslint/js": "^9.13.0",
52-
"@microsoft/api-extractor": "^7.47.11",
53-
"@parcel/config-default": "~2.12.0",
54-
"@parcel/packager-ts": "~2.12.0",
55-
"@parcel/transformer-less": "2.12.0",
56-
"@parcel/transformer-typescript-tsc": "~2.12.0",
57-
"@parcel/transformer-typescript-types": "~2.12.0",
58-
"@softonus/prettier-plugin-duplicate-remover": "^1.0.1",
48+
"@babel/plugin-proposal-decorators": "^7.27.1",
49+
"@babel/preset-typescript": "^7.27.1",
50+
"@eslint/compat": "^1.2.9",
51+
"@eslint/js": "^9.26.0",
52+
"@microsoft/api-extractor": "^7.52.7",
53+
"@parcel/config-default": "~2.14.4",
54+
"@parcel/packager-ts": "~2.14.4",
55+
"@parcel/transformer-less": "2.14.4",
56+
"@parcel/transformer-typescript-tsc": "~2.14.4",
57+
"@parcel/transformer-typescript-types": "~2.14.4",
58+
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
5959
"@storybook/addon-console": "^3.0.0",
6060
"@storybook/addon-essentials": "^7.6.20",
6161
"@storybook/addon-interactions": "^7.6.20",
@@ -65,42 +65,51 @@
6565
"@storybook/react": "^7.6.20",
6666
"@storybook/react-vite": "^7.6.20",
6767
"@storybook/testing-library": "^0.2.2",
68-
"@types/lodash": "^4.17.12",
69-
"@types/node": "^20.17.1",
68+
"@types/lodash": "^4.17.16",
69+
"@types/node": "^22.15.17",
7070
"@types/prismjs": "^1.26.5",
71-
"@types/react": "^18.3.12",
72-
"@types/react-dom": "^18.3.1",
73-
"@vitejs/plugin-react": "^4.3.3",
74-
"eslint": "^9.13.0",
75-
"eslint-config-prettier": "^9.1.0",
76-
"eslint-plugin-react": "^7.37.2",
71+
"@types/react": "^18.3.21",
72+
"@types/react-dom": "^18.3.7",
73+
"@vitejs/plugin-react": "^4.4.1",
74+
"eslint": "^9.26.0",
75+
"eslint-config-prettier": "^10.1.3",
76+
"eslint-plugin-react": "^7.37.5",
7777
"eslint-plugin-simple-import-sort": "^12.1.1",
78-
"globals": "^15.11.0",
79-
"husky": "^9.1.6",
78+
"globals": "^16.1.0",
79+
"husky": "^9.1.7",
80+
"jiti": "^2.4.2",
8081
"koapache": "^2.2.2",
81-
"less": "^4.2.0",
82-
"lint-staged": "^15.2.10",
83-
"parcel": "~2.12.0",
84-
"postcss-preset-env": "^10.0.8",
85-
"prettier": "^3.3.3",
82+
"less": "^4.3.0",
83+
"lint-staged": "^15.5.2",
84+
"parcel": "~2.14.4",
85+
"postcss-preset-env": "^10.1.6",
86+
"prettier": "^3.5.3",
8687
"prettier-plugin-css-order": "^2.1.2",
8788
"process": "^0.11.10",
8889
"prop-types": "15.8.1",
8990
"react": "^18.3.1",
9091
"react-dom": "^18.3.1",
92+
"react-element-to-jsx-string": "^15.0.0",
9193
"rimraf": "^6.0.1",
9294
"storybook": "^7.6.20",
93-
"typedoc": "^0.26.10",
94-
"typedoc-plugin-mdn-links": "^3.3.4",
95-
"typescript": "~5.6.3",
96-
"typescript-eslint": "^8.11.0",
97-
"vite": "^5.4.10"
95+
"typedoc": "^0.28.4",
96+
"typedoc-plugin-mdn-links": "^5.0.1",
97+
"typescript": "~5.8.3",
98+
"typescript-eslint": "^8.32.0",
99+
"vite": "^5.4.19"
100+
},
101+
"pnpm": {
102+
"onlyBuiltDependencies": [
103+
"@swc/core",
104+
"esbuild"
105+
]
98106
},
99107
"prettier": {
100108
"singleQuote": true,
101109
"trailingComma": "none",
102110
"arrowParens": "avoid",
103111
"tabWidth": 4,
112+
"printWidth": 100,
104113
"plugins": [
105114
"prettier-plugin-css-order",
106115
"@softonus/prettier-plugin-duplicate-remover"

0 commit comments

Comments
 (0)