Skip to content

Commit 3a0c831

Browse files
Migrate to Webpack 5, updated linting and libs (#127)
* Migrate to Webpack 5, update Babel, ESLint, and testing libraries. Applied Prettier for consistent formatting. Prepared for future tooling. * removes unused loaders * fix: electron webpack polyfills --------- Co-authored-by: Tyler Williams <[email protected]>
1 parent 4e325c7 commit 3a0c831

File tree

34 files changed

+18009
-32108
lines changed

34 files changed

+18009
-32108
lines changed

.babelrc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2-
"presets": ["es2015", "stage-1", "react"],
3-
"plugins": ["transform-decorators-legacy", "transform-class-properties", "transform-runtime"],
2+
"presets": ["@babel/preset-env", "@babel/preset-react"],
3+
"plugins": [
4+
["@babel/plugin-proposal-decorators", { "legacy": true }],
5+
"@babel/plugin-transform-class-properties",
6+
"@babel/plugin-transform-runtime"
7+
]
48
}

.eslintrc

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
{
2-
"parser": "babel-eslint",
3-
"extends": ["airbnb", "prettier", "prettier/react"],
2+
"parser": "@babel/eslint-parser",
3+
"env": {
4+
"browser": true, // Enables browser global variables like window and document
5+
"node": true, // Enables Node.js global variables and Node.js scoping
6+
"es6": true, // Enables ES6 global variables like Set, Map, etc.
7+
"commonjs": true, // CommonJS global variables and CommonJS scoping (useful for require)
8+
"jquery": false, // Set to true if you're using jQuery
9+
"jest": true // Enables Jest global variables for testing
10+
},
11+
"parserOptions": {
12+
"requireConfigFile": false,
13+
"babelOptions": {
14+
"plugins": [
15+
["@babel/plugin-proposal-decorators", { "legacy": true }]
16+
],
17+
"presets": [
18+
"@babel/preset-react"
19+
]
20+
}
21+
},
22+
"extends": [
23+
"eslint:recommended",
24+
"plugin:react/recommended",
25+
"prettier"
26+
],
27+
"plugins": [
28+
"react",
29+
"jsx-a11y",
30+
"prettier"
31+
],
432
"rules": {
533
"no-param-reassign": "off",
634
"no-unused-vars": "off",
@@ -20,7 +48,11 @@
2048
"react/destructuring-assignment": "off",
2149
"react/static-property-placement": "off",
2250
"react/sort-comp": "off",
23-
"react/no-deprecated": "off"
51+
"react/no-deprecated": "off",
52+
"prettier/prettier": "error",
53+
"import/no-unresolved": "off",
54+
"react/display-name": "off",
55+
"no-console": "off"
2456
},
2557
"globals": {
2658
"__DEBUG_CONNECTION__": false,
@@ -35,5 +67,10 @@
3567
"after": false,
3668
"it": false,
3769
"expect": false
70+
},
71+
"settings": {
72+
"react": {
73+
"version": "detect"
74+
}
3875
}
39-
}
76+
}

.github/workflows/mobx-devtools-mst-publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Publish mobx-devtools-mst
22

33
on:
44
push:
5-
paths: [ "packages/mobx-devtools-mst/**", ".github/**" ]
6-
branches: [ "master" ]
5+
paths: ['packages/mobx-devtools-mst/**', '.github/**']
6+
branches: ['master']
77

88
jobs:
99
publish-npm:
@@ -28,4 +28,3 @@ jobs:
2828
npm publish
2929
env:
3030
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
31-

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Test
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
branches: ['master']
66
pull_request_target:
7-
branches: [ "master" ]
7+
branches: ['master']
88

99
jobs:
1010
test:

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,182 @@
11
# Changelog
22

33
## [0.9.27] - 2020-10-30
4+
45
- Enable nodeIntegration in the standalone electron app (#92)
56
- Fix Type Definition for MST package
67

78
## [0.9.26] - 2020-10-30
9+
810
- Remove components and performance tabs (#87)
911
- Type Definition for MST package (#81)
1012

1113
## [0.9.23] - 2020-10-19
14+
1215
- Final fix vertical scroll in MST package (#73)
1316
- Remove destroyed mst roots from UI (#48)
1417

1518
## [0.9.21] - 2019-3-9
19+
1620
- mobx-devtools-mst mobx@5 support
1721
- filter events in Changes tab
1822
- Made sets inspectable (#49)
1923

2024
## [0.9.19] - 2018-8-31
25+
2126
### Fixed
27+
2228
- Props & state not displayed when on component view (#34)
2329

2430
## [0.9.18] - 2018-6-16
31+
2532
### Added
33+
2634
- mobx@5 support
2735

2836
## [0.9.17] - 2018-3-28
37+
2938
### Fixed
39+
3040
- MST tab not working
3141

3242
### Added
43+
3344
- Made dates inspectable (#27)
3445

3546
## [0.9.16] - 2018-3-25
47+
3648
### Fixed
49+
3750
- Extension doesn't work (#27)
3851

3952
## [0.9.15] - 2018-3-24
53+
4054
### Added
55+
4156
- Made maps inspectable (#27)
4257

4358
## [0.9.14] - 2018-3-20
59+
4460
### Fixed
61+
4562
- Older MobX support (#26)
4663

4764
## [0.9.13] - 2018-3-18
65+
4866
### Added
67+
4968
- MobX@4 support
5069

5170
### Fixed
71+
5272
- Fixed background page errors that prevented connecting to frontend
5373

5474
### Changed
75+
5576
- MST tab now displays snapshots instead of patches
5677

5778
## [0.9.12] - 2018-1-13
79+
5880
### Added
81+
5982
- Actions' names in changes log (#15)
6083

6184
## [0.9.11] - 2017-12-6
85+
6286
### Fixed
87+
6388
- Fixed problems in firefox (#14)
6489

6590
## [0.9.10] - 2017-11-27
91+
6692
### Added
93+
6794
- Standalone app.
6895

6996
### Fixed
97+
7098
- Handle groupStart & groupEnd mismatch (#10)
7199

72100
## [0.9.9] - 2017-11-20
101+
73102
### Fixed
103+
74104
- Ability to use the extension inside electron environment
75105

76106
## [0.9.8] - 2017-10-30
107+
77108
### Fixed
109+
78110
- Fixed mobx-devtools-mst error in node.js environment (#8)
79111

80112
## [0.9.7] - 2017-10-27
113+
81114
### Added
115+
82116
- mobx-state-tree support.
83117

84118
### Fixed
119+
85120
- Displaying deep log items
86121
- Handling serializing exceptions
87122

88123
## [0.9.6] - 2017-10-25
124+
89125
### Fixed
126+
90127
- Displaying deep log items
91128

92129
## [0.9.5] - 2017-10-23
130+
93131
### Fixed
132+
94133
- Displaying diff details for top-level changes
95134

96135
## [0.9.4] - 2017-10-23
136+
97137
### Fixed
138+
98139
Fail gracefully if using unsupported mobx versions.
99140

100141
## [0.9.3] - 2017-10-21
142+
101143
### Fixed
144+
102145
- Reloading on navigation.
103146

104147
## [0.9.2] - 2017-10-20
148+
105149
### Fixed
150+
106151
- Removed unsafe-eval from manifest.json for addons.mozilla.org.
107152

108153
## [0.9.1] - 2017-10-20
154+
109155
### Fixed
156+
110157
- Fixed main layout problems in Firefox.
111158

112159
## [v0.9.0] - 2017-10-20
160+
113161
### Added
162+
114163
- mobx-react observervers tree viewer.
115164
- complex objects viewer.
116165

117166
### Fixed
167+
118168
- Performance issues on heavy logging events.
119169

120170
### Changed
171+
121172
- Complete redesign.
122173

123174
## [0.0.23] - 2017-09-26
175+
124176
### Fixed
177+
125178
- Communication between backend and frontend (#2).
126179

127180
### Changed
181+
128182
- Different devtool instances are not being synchronized anymore.

HACKING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99

1010
- run `npm run start-playground-plain`
1111

12-
1312
## Chrome extension
1413

1514
- run `npm run start:chrome`
1615
- Go to `chrome://extensions`, check "developer mode", and click "Load
1716
unpacked extension", and select directory `lib/chrome`
18-
17+
1918
## Firefox extension
2019

2120
- run `npm run start:firefox`

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,55 @@
33
[![Build Status](https://travis-ci.org/mobxjs/mobx-devtools.svg?branch=master)](https://travis-ci.org/mobxjs/mobx-devtools)
44

55
This repository is home for:
6-
* [MobX Developer Tools for **Chrome**](https://chrome.google.com/webstore/detail/mobx-developer-tools/pfgnfdagidkfgccljigdamigbcnndkod)
7-
* [MobX Developer Tools for **Firefox**](https://addons.mozilla.org/en-US/firefox/addon/mobx-devtools/)
8-
* [Standalone app](#standalone-app) for Safari, IE etc.
6+
7+
- [MobX Developer Tools for **Chrome**](https://chrome.google.com/webstore/detail/mobx-developer-tools/pfgnfdagidkfgccljigdamigbcnndkod)
8+
- [MobX Developer Tools for **Firefox**](https://addons.mozilla.org/en-US/firefox/addon/mobx-devtools/)
9+
- [Standalone app](#standalone-app) for Safari, IE etc.
910

1011
![MobX DevTools](preview.gif)
1112

1213
#### Features
1314

14-
* Track changes in MobX observables
15-
* MST support (see below).
15+
- Track changes in MobX observables
16+
- MST support (see below).
1617

1718
#### mobx-state-tree
19+
1820
To allow inspecting MST root, do `npm install mobx-devtools-mst` and pass it to the function, exported as the default:
21+
1922
```js
2023
import makeInspectable from 'mobx-devtools-mst';
2124

2225
const myStore = MyStore.create(/* ... */);
2326

2427
makeInspectable(myStore);
2528
```
26-
![MobX DevTools MST](preview-mst.png)
2729

30+
![MobX DevTools MST](preview-mst.png)
2831

2932
#### Standalone app
3033

3134
Install:
35+
3236
```sh
3337
npm install --global mobx-devtools
3438
```
35-
Start:
39+
40+
Start:
41+
3642
```sh
3743
mobx-devtools
3844
```
3945

40-
4146
# Troubleshooting
4247

4348
### It doesn't work
49+
4450
Make sure that you are using [mobx](https://www.npmjs.com/package/mobx) 3.1.15 or higher and your app does not live inside an iframe. If that doesn't help, please [create an issue](https://github.com/mobxjs/mobx-devtools/issues/new) with detail about your environment.
4551

4652
### Performance & Components tabs [DEPRECATED].
47-
Prefer use React Devtools extension for components tree and performance [discuss](https://github.com/mobxjs/mobx-devtools/issues/56#issuecomment-541896923)
4853

54+
Prefer use React Devtools extension for components tree and performance [discuss](https://github.com/mobxjs/mobx-devtools/issues/56#issuecomment-541896923)
4955

5056
# Hacking
5157

lerna.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"lerna": "2.4.0",
33
"version": "0.9.30",
4-
"packages": [
5-
"packages/*"
6-
]
4+
"packages": ["packages/*"]
75
}

0 commit comments

Comments
 (0)