Skip to content

Commit

Permalink
[migrate] upgrade to ES decorator stage-3 & MobX 6.11+
Browse files Browse the repository at this point in the history
[optimize] update Upstream packages
  • Loading branch information
TechQuery committed Jan 19, 2024
1 parent 5b977fc commit 1c67685
Show file tree
Hide file tree
Showing 6 changed files with 768 additions and 630 deletions.
8 changes: 8 additions & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": [
"@parcel/transformer-typescript-tsc"
]
}
}
17 changes: 12 additions & 5 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Responsive **Translation** utility based on [TypeScript][1] & [MobX][2]

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

Expand All @@ -18,6 +18,13 @@ Responsive **Translation** utility based on [TypeScript][1] & [MobX][2]
- [x] support **HTTP protocol** for **Server-side rendering**
- [x] support BOM/DOM language API for Client-side rendering

## Versions

| SemVer | branch | status | ES decorator | MobX |
| :-------: | :------: | :----------: | :----------: | :---------: |
| `>=0.5.0` | `main` | ✅developing | stage-3 | `>=6.11` |
| `<0.5.0` | `master` | ❌deprecated | stage-2 | `>=4 <6.11` |

## React/Next.js example

Original from https://github.com/kaiyuanshe/kaiyuanshe.github.io
Expand All @@ -35,9 +42,9 @@ npm i mobx mobx-react mobx-i18n
```json
{
"compilerOptions": {
"target": "ES5",
"useDefineForClassFields": false,
"experimentalDecorators": true
"target": "ES6",
"useDefineForClassFields": true,
"experimentalDecorators": false
}
}
```
Expand Down Expand Up @@ -138,7 +145,7 @@ export default class HomePage extends PureComponent {
3. https://github.com/QuiiBz/next-international

[1]: https://www.typescriptlang.org/
[2]: https://github.com/mobxjs/mobx/tree/mobx4and5/docs
[2]: https://mobx.js.org/
[3]: https://libraries.io/npm/mobx-i18n
[4]: https://github.com/idea2app/MobX-i18n/actions/workflows/main.yml
[5]: https://nodei.co/npm/mobx-i18n/
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobx-i18n",
"version": "0.4.2",
"version": "0.5.0",
"license": "LGPL-3.0",
"author": "[email protected]",
"description": "Responsive Translation utility based on TypeScript & MobX",
Expand All @@ -24,25 +24,28 @@
},
"source": "source/index.ts",
"types": "dist/index.d.ts",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"dependencies": {
"@swc/helpers": "^0.5.3",
"regenerator-runtime": "^0.14.0"
"regenerator-runtime": "^0.14.1"
},
"peerDependencies": {
"mobx": ">=4"
"mobx": ">=6.11"
},
"devDependencies": {
"@parcel/packager-ts": "~2.10.2",
"@parcel/transformer-typescript-types": "~2.10.2",
"@parcel/config-default": "~2.11.0",
"@parcel/packager-ts": "~2.11.0",
"@parcel/transformer-typescript-tsc": "~2.11.0",
"@parcel/transformer-typescript-types": "~2.11.0",
"husky": "^8.0.3",
"lint-staged": "^15.0.2",
"mobx": "^6.10.2",
"parcel": "~2.10.2",
"prettier": "^3.0.3",
"typedoc": "^0.25.3",
"typedoc-plugin-mdn-links": "^3.1.0",
"typescript": "~5.2.2"
"lint-staged": "^15.2.0",
"mobx": "^6.12.0",
"parcel": "~2.11.0",
"prettier": "^3.2.4",
"typedoc": "^0.25.7",
"typedoc-plugin-mdn-links": "^3.1.12",
"typescript": "~5.3.3"
},
"prettier": {
"singleQuote": true,
Expand Down
Loading

0 comments on commit 1c67685

Please sign in to comment.