Skip to content

Commit e5c125c

Browse files
committed
[migrate] upgrade to ES Decorator stage-3 & Husky 9
[optimize] update Upstream packages
1 parent c584bd6 commit e5c125c

File tree

12 files changed

+971
-849
lines changed

12 files changed

+971
-849
lines changed

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
3-
. "$(dirname "$0")/_/husky.sh"
4-
51
npm test

.husky/pre-push

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
3-
. "$(dirname "$0")/_/husky.sh"
4-
51
npm run build

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.parcel-cache/
1+
.parcel*
22
docs/
33
preview/
44
.vscode/

.parcelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "@parcel/config-default",
3+
"transformers": {
4+
"*.{ts,tsx}": [
5+
"@parcel/transformer-typescript-tsc"
6+
]
7+
}
8+
}

ReadMe.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22

33
Compatible Map component supports Geo services with **Freedom** or **Open API**, based on [TypeScript][1], [MobX][2] & [React][3].
44

5-
[![MobX compatibility](https://img.shields.io/badge/Compatible-1?logo=mobx&label=MobX%204%2F5%2F6)][2]
5+
[![MobX compatibility](https://img.shields.io/badge/Compatible-1?logo=mobx&label=MobX%206%2F7)][2]
66
[![NPM Dependency](https://img.shields.io/librariesio/github/idea2app/OpenReactMap.svg)][4]
77
[![CI & CD](https://github.com/idea2app/OpenReactMap/actions/workflows/main.yml/badge.svg)][5]
88

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

11+
## Versions
12+
13+
| SemVer | status | ES decorator | MobX |
14+
| :-----: | :----------: | :----------: | :---------: |
15+
| `>=0.8` | ✅developing | stage-3 | `>=6.11` |
16+
| `<0.8` | ❌deprecated | stage-2 | `>=4 <6.11` |
17+
1118
## Usage
1219

1320
Preview site: https://idea2app.github.io/OpenReactMap/preview/
@@ -20,6 +27,22 @@ Preview site: https://idea2app.github.io/OpenReactMap/preview/
2027
npm i open-react-map mobx mobx-react react react-dom
2128
```
2229

30+
#### `tsconfig.json`
31+
32+
Compatible with MobX 6/7:
33+
34+
```json
35+
{
36+
"compilerOptions": {
37+
"target": "ES6",
38+
"moduleResolution": "Node",
39+
"useDefineForClassFields": true,
40+
"experimentalDecorators": false,
41+
"jsx": "react-jsx"
42+
}
43+
}
44+
```
45+
2346
#### `index.html`
2447

2548
```html

package.json

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-react-map",
3-
"version": "0.7.1",
3+
"version": "0.8.0",
44
"license": "LGPL-3.0-or-later",
55
"author": "[email protected]",
66
"description": "Compatible Map component supports Geo services with Freedom or Open API, based on TypeScript, MobX & React.",
@@ -31,36 +31,38 @@
3131
"@types/leaflet": "^1.9.8",
3232
"koajax": "^0.9.6",
3333
"leaflet": "^1.9.4",
34-
"mobx-react-helper": "^0.2.7",
34+
"mobx-react-helper": "^0.3.1",
3535
"react-leaflet": "^4.2.1",
3636
"web-utility": "^4.1.3"
3737
},
3838
"peerDependencies": {
39-
"mobx": ">=4 <6.11",
40-
"mobx-react": ">=6 <9.1",
39+
"mobx": ">=6.11",
40+
"mobx-react": ">=9.1",
4141
"react": ">=18",
4242
"react-dom": ">=18"
4343
},
4444
"devDependencies": {
45-
"@parcel/packager-ts": "~2.10.3",
46-
"@parcel/transformer-typescript-types": "~2.10.3",
47-
"@types/react": "^18.2.45",
45+
"@parcel/config-default": "~2.11.0",
46+
"@parcel/packager-ts": "~2.11.0",
47+
"@parcel/transformer-typescript-tsc": "~2.11.0",
48+
"@parcel/transformer-typescript-types": "~2.11.0",
49+
"@types/react": "^18.2.48",
4850
"@types/react-dom": "^18.2.18",
49-
"husky": "^8.0.3",
50-
"idea-react": "^1.0.0-rc.30",
51+
"husky": "^9.0.7",
52+
"idea-react": "^2.0.0-rc.0",
5153
"koapache": "^2.2.2",
5254
"lint-staged": "^15.2.0",
53-
"mobx": "~6.10.2",
54-
"mobx-react": "~9.0.2",
55-
"parcel": "^2.10.3",
56-
"prettier": "^3.1.1",
55+
"mobx": "^6.12.0",
56+
"mobx-react": "^9.1.0",
57+
"parcel": "~2.11.0",
58+
"prettier": "^3.2.4",
5759
"prismjs": "^1.29.0",
5860
"process": "^0.11.10",
5961
"react": "^18.2.0",
60-
"react-bootstrap": "^2.9.2",
62+
"react-bootstrap": "^2.10.0",
6163
"react-dom": "^18.2.0",
62-
"typedoc": "^0.25.4",
63-
"typedoc-plugin-mdn-links": "^3.1.9",
64+
"typedoc": "^0.25.7",
65+
"typedoc-plugin-mdn-links": "^3.1.14",
6466
"typescript": "~5.3.3"
6567
},
6668
"prettier": {
@@ -79,7 +81,7 @@
7981
}
8082
},
8183
"scripts": {
82-
"prepare": "husky install",
84+
"prepare": "husky",
8385
"test": "lint-staged",
8486
"preview": "cd preview/ && rm -rf ../.parcel-cache dist/ && parcel --open",
8587
"pack-preview": "cd preview/ && rm -rf ../.parcel-cache dist/ && parcel build --public-url=. --dist-dir=../docs/preview/",

0 commit comments

Comments
 (0)