@mui/codemod 5.14.11 → 5.14.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codemod.js +0 -0
- package/node/util/getJSExports.js +1 -2
- package/node/util/memoize.js +1 -2
- package/node/v5.0.0/adapter-v4.test/core-import.actual.js +2 -4
- package/node/v5.0.0/adapter-v4.test/core-import.expected.js +2 -4
- package/node/v5.0.0/adapter-v4.test/no-styles-import.actual.js +2 -4
- package/node/v5.0.0/adapter-v4.test/no-styles-import.expected.js +2 -4
- package/node/v5.0.0/jss-to-styled.test/Anonymous.actual.js +2 -3
- package/node/v5.0.0/jss-to-styled.test/exportClass.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/exportClass.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/exportFunction.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/exportFunction.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/fifth.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/fifth.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/first.actual.js +2 -3
- package/node/v5.0.0/jss-to-styled.test/first.expected.js +2 -3
- package/node/v5.0.0/jss-to-styled.test/fourth.actual.js +2 -3
- package/node/v5.0.0/jss-to-styled.test/second.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/second.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +2 -3
- package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +2 -3
- package/node/v5.0.0/jss-to-styled.test/third.actual.js +2 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +1 -2
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +1 -2
- package/node/v5.0.0/jss-to-tss-react.test/actual-todo-comments.js +2 -4
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript-docs-example-params.js +1 -2
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript-docs-example.js +1 -2
- package/node/v5.0.0/jss-to-tss-react.test/expected-todo-comments.js +2 -4
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript-docs-example-params.js +1 -2
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript-docs-example.js +1 -2
- package/node/v5.0.0/preset-safe.test/actual.js +1 -2
- package/node/v5.0.0/preset-safe.test/expected.js +1 -2
- package/node/v5.0.0/styled-engine-provider.test/mui-theme-provider.actual.js +1 -2
- package/node/v5.0.0/styled-engine-provider.test/mui-theme-provider.expected.js +1 -2
- package/node/v5.0.0/styled-engine-provider.test/theme-provider.actual.js +1 -2
- package/node/v5.0.0/styled-engine-provider.test/theme-provider.expected.js +1 -2
- package/node/v5.0.0/transitions.test/actual.js +2 -3
- package/node/v5.0.0/transitions.test/expected.js +2 -3
- package/node/v5.0.0/with-mobile-dialog.test/actual.js +1 -2
- package/node/v5.0.0/with-mobile-dialog.test/expected.js +1 -2
- package/node/v5.0.0/with-width.test/actual.js +1 -2
- package/node/v5.0.0/with-width.test/expected.js +1 -2
- package/package.json +5 -5
package/codemod.js
CHANGED
|
File without changes
|
package/node/util/memoize.js
CHANGED
|
@@ -5,7 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.muiTheme2 = exports.muiTheme = void 0;
|
|
7
7
|
var _core = require("@material-ui/core");
|
|
8
|
-
const muiTheme = (0, _core.createMuiTheme)();
|
|
9
|
-
exports.
|
|
10
|
-
const muiTheme2 = (0, _core.createMuiTheme)({});
|
|
11
|
-
exports.muiTheme2 = muiTheme2;
|
|
8
|
+
const muiTheme = exports.muiTheme = (0, _core.createMuiTheme)();
|
|
9
|
+
const muiTheme2 = exports.muiTheme2 = (0, _core.createMuiTheme)({});
|
|
@@ -5,7 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.muiTheme2 = exports.muiTheme = void 0;
|
|
7
7
|
var _core = require("@material-ui/core");
|
|
8
|
-
const muiTheme = (0, _core.createMuiTheme)();
|
|
9
|
-
exports.
|
|
10
|
-
const muiTheme2 = (0, _core.createMuiTheme)((0, _core.adaptV4Theme)({}));
|
|
11
|
-
exports.muiTheme2 = muiTheme2;
|
|
8
|
+
const muiTheme = exports.muiTheme = (0, _core.createMuiTheme)();
|
|
9
|
+
const muiTheme2 = exports.muiTheme2 = (0, _core.createMuiTheme)((0, _core.adaptV4Theme)({}));
|
|
@@ -5,7 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.muiTheme2 = exports.muiTheme = void 0;
|
|
7
7
|
var _otherPath = require("../other-path");
|
|
8
|
-
const muiTheme = createMuiTheme();
|
|
9
|
-
exports.
|
|
10
|
-
const muiTheme2 = (0, _otherPath.createTheme)(options);
|
|
11
|
-
exports.muiTheme2 = muiTheme2;
|
|
8
|
+
const muiTheme = exports.muiTheme = createMuiTheme();
|
|
9
|
+
const muiTheme2 = exports.muiTheme2 = (0, _otherPath.createTheme)(options);
|
|
@@ -6,7 +6,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.muiTheme2 = exports.muiTheme = void 0;
|
|
7
7
|
var _otherPath = require("../other-path");
|
|
8
8
|
var _styles = require("@material-ui/core/styles");
|
|
9
|
-
const muiTheme = createMuiTheme();
|
|
10
|
-
exports.
|
|
11
|
-
const muiTheme2 = (0, _otherPath.createTheme)((0, _styles.adaptV4Theme)(options));
|
|
12
|
-
exports.muiTheme2 = muiTheme2;
|
|
9
|
+
const muiTheme = exports.muiTheme = createMuiTheme();
|
|
10
|
+
const muiTheme2 = exports.muiTheme2 = (0, _otherPath.createTheme)((0, _styles.adaptV4Theme)(options));
|
|
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
13
13
|
const styles = {
|
|
14
14
|
root: {}
|
|
15
15
|
};
|
|
16
|
-
var _default = (0, _withStyles.default)(styles)(props => {
|
|
16
|
+
var _default = exports.default = (0, _withStyles.default)(styles)(props => {
|
|
17
17
|
const {
|
|
18
18
|
classes
|
|
19
19
|
} = props;
|
|
@@ -21,5 +21,4 @@ var _default = (0, _withStyles.default)(styles)(props => {
|
|
|
21
21
|
className: classes.root,
|
|
22
22
|
children: "Anonymous"
|
|
23
23
|
});
|
|
24
|
-
});
|
|
25
|
-
exports.default = _default;
|
|
24
|
+
});
|
|
@@ -218,9 +218,8 @@ process.env.NODE_ENV !== "production" ? AppAppBar.propTypes = {
|
|
|
218
218
|
position: _propTypes.default.string,
|
|
219
219
|
user: _propTypes.default.object
|
|
220
220
|
} : void 0;
|
|
221
|
-
var _default = (0, _recompose.compose)((0, _withStyles.default)(styles, {
|
|
221
|
+
var _default = exports.default = (0, _recompose.compose)((0, _withStyles.default)(styles, {
|
|
222
222
|
name: 'AppAppBar'
|
|
223
223
|
}), (0, _reactRedux.connect)(state => ({
|
|
224
224
|
user: state.data.user
|
|
225
|
-
})))(AppAppBar);
|
|
226
|
-
exports.default = _default;
|
|
225
|
+
})))(AppAppBar);
|
|
@@ -233,7 +233,6 @@ process.env.NODE_ENV !== "production" ? AppAppBar.propTypes = {
|
|
|
233
233
|
position: _propTypes.default.string,
|
|
234
234
|
user: _propTypes.default.object
|
|
235
235
|
} : void 0;
|
|
236
|
-
var _default = (0, _recompose.compose)((0, _reactRedux.connect)(state => ({
|
|
236
|
+
var _default = exports.default = (0, _recompose.compose)((0, _reactRedux.connect)(state => ({
|
|
237
237
|
user: state.data.user
|
|
238
|
-
})))(AppAppBar);
|
|
239
|
-
exports.default = _default;
|
|
238
|
+
})))(AppAppBar);
|
|
@@ -27,7 +27,7 @@ function getStyles({
|
|
|
27
27
|
button: {}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const MyCard = (0, _withStyles.default)(getStyles, {
|
|
30
|
+
const MyCard = exports.MyCard = (0, _withStyles.default)(getStyles, {
|
|
31
31
|
name: 'ACard'
|
|
32
32
|
})(props => {
|
|
33
33
|
const {
|
|
@@ -43,5 +43,4 @@ const MyCard = (0, _withStyles.default)(getStyles, {
|
|
|
43
43
|
})
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
|
-
});
|
|
47
|
-
exports.MyCard = MyCard;
|
|
46
|
+
});
|
|
@@ -86,9 +86,8 @@ process.env.NODE_ENV !== "production" ? AppAppBarCart.propTypes = {
|
|
|
86
86
|
AppAppBarCart.defaultProps = {
|
|
87
87
|
variant: 'icon'
|
|
88
88
|
};
|
|
89
|
-
var _default = recompose.compose((0, _withStyles.default)(styles, {
|
|
89
|
+
var _default = exports.default = recompose.compose((0, _withStyles.default)(styles, {
|
|
90
90
|
name: 'AppAppBarCart'
|
|
91
91
|
}), (0, _reactRedux.connect)(state => ({
|
|
92
92
|
cart: state.data.cart
|
|
93
|
-
})))(AppAppBarCart);
|
|
94
|
-
exports.default = _default;
|
|
93
|
+
})))(AppAppBarCart);
|
|
@@ -94,7 +94,6 @@ process.env.NODE_ENV !== "production" ? AppAppBarCart.propTypes = {
|
|
|
94
94
|
AppAppBarCart.defaultProps = {
|
|
95
95
|
variant: 'icon'
|
|
96
96
|
};
|
|
97
|
-
var _default = recompose.compose((0, _reactRedux.connect)(state => ({
|
|
97
|
+
var _default = exports.default = recompose.compose((0, _reactRedux.connect)(state => ({
|
|
98
98
|
cart: state.data.cart
|
|
99
|
-
})))(AppAppBarCart);
|
|
100
|
-
exports.default = _default;
|
|
99
|
+
})))(AppAppBarCart);
|
|
@@ -20,7 +20,7 @@ const getStyles = theme => {
|
|
|
20
20
|
button: {}
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
const MyCard = (0, _withStyles.default)(getStyles)(props => {
|
|
23
|
+
const MyCard = exports.MyCard = (0, _withStyles.default)(getStyles)(props => {
|
|
24
24
|
const {
|
|
25
25
|
classes
|
|
26
26
|
} = props;
|
|
@@ -34,5 +34,4 @@ const MyCard = (0, _withStyles.default)(getStyles)(props => {
|
|
|
34
34
|
})
|
|
35
35
|
})
|
|
36
36
|
});
|
|
37
|
-
});
|
|
38
|
-
exports.MyCard = MyCard;
|
|
37
|
+
});
|
|
@@ -29,13 +29,12 @@ const useStyles = (0, _core.makeStyles)(() => ({
|
|
|
29
29
|
},
|
|
30
30
|
qualifier: {}
|
|
31
31
|
}));
|
|
32
|
-
const useExportedStyles = (0, _core.makeStyles)({
|
|
32
|
+
const useExportedStyles = exports.useExportedStyles = (0, _core.makeStyles)({
|
|
33
33
|
test: {
|
|
34
34
|
backgroundColor: "purple",
|
|
35
35
|
color: "white"
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
exports.useExportedStyles = useExportedStyles;
|
|
39
38
|
const useStyles2 = (0, _core.makeStyles)({
|
|
40
39
|
test2: props => ({
|
|
41
40
|
backgroundColor: "blue",
|
|
@@ -77,5 +76,4 @@ function ComponentUsingStyles(props) {
|
|
|
77
76
|
})]
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
|
-
var _default = useStyles3;
|
|
81
|
-
exports.default = _default;
|
|
79
|
+
var _default = exports.default = useStyles3;
|
|
@@ -30,7 +30,7 @@ const useStyles = (0, _mui.makeStyles)()((_theme, _params, classes) => ({
|
|
|
30
30
|
}));
|
|
31
31
|
|
|
32
32
|
// TODO jss-to-tss-react codemod: usages of this hook outside of this file will not be converted.
|
|
33
|
-
const useExportedStyles = (0, _mui.makeStyles)()({
|
|
33
|
+
const useExportedStyles = exports.useExportedStyles = (0, _mui.makeStyles)()({
|
|
34
34
|
test: {
|
|
35
35
|
backgroundColor: "purple",
|
|
36
36
|
color: "white"
|
|
@@ -39,7 +39,6 @@ const useExportedStyles = (0, _mui.makeStyles)()({
|
|
|
39
39
|
|
|
40
40
|
// TODO jss-to-tss-react codemod: Unable to handle style definition reliably. Unsupported arrow function syntax.
|
|
41
41
|
// Arrow function has parameter type of Identifier instead of ObjectPattern (e.g. `(props) => ({...})` instead of `({color}) => ({...})`).
|
|
42
|
-
exports.useExportedStyles = useExportedStyles;
|
|
43
42
|
const useStyles2 = (0, _mui.makeStyles)()({
|
|
44
43
|
test2: props => ({
|
|
45
44
|
backgroundColor: "blue",
|
|
@@ -96,5 +95,4 @@ function ComponentUsingStyles(props) {
|
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
// TODO jss-to-tss-react codemod: usages of this hook outside of this file will not be converted.
|
|
99
|
-
var _default = useStyles3;
|
|
100
|
-
exports.default = _default;
|
|
98
|
+
var _default = exports.default = useStyles3;
|
|
@@ -9,7 +9,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
9
9
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
10
|
// type A = TransitionDuration | Easing
|
|
11
11
|
|
|
12
|
-
const MuiButtonBaseStyleOverrides = {
|
|
12
|
+
const MuiButtonBaseStyleOverrides = exports.MuiButtonBaseStyleOverrides = {
|
|
13
13
|
root: {
|
|
14
14
|
'&.MuiButton-root': {
|
|
15
15
|
fontFamily: '"Nunito", Avenir, sans-serif',
|
|
@@ -19,5 +19,4 @@ const MuiButtonBaseStyleOverrides = {
|
|
|
19
19
|
})
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
};
|
|
23
|
-
exports.MuiButtonBaseStyleOverrides = MuiButtonBaseStyleOverrides;
|
|
22
|
+
};
|
|
@@ -11,7 +11,7 @@ const transitions = (0, _createTransitions.default)({});
|
|
|
11
11
|
|
|
12
12
|
// type A = TransitionDuration | Easing
|
|
13
13
|
|
|
14
|
-
const MuiButtonBaseStyleOverrides = {
|
|
14
|
+
const MuiButtonBaseStyleOverrides = exports.MuiButtonBaseStyleOverrides = {
|
|
15
15
|
root: {
|
|
16
16
|
'&.MuiButton-root': {
|
|
17
17
|
fontFamily: '"Nunito", Avenir, sans-serif',
|
|
@@ -21,5 +21,4 @@ const MuiButtonBaseStyleOverrides = {
|
|
|
21
21
|
})
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
};
|
|
25
|
-
exports.MuiButtonBaseStyleOverrides = MuiButtonBaseStyleOverrides;
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/codemod",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.13",
|
|
4
4
|
"bin": "./codemod.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "MUI Team",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"url": "https://opencollective.com/mui"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@babel/core": "^7.
|
|
34
|
-
"@babel/runtime": "^7.
|
|
35
|
-
"@babel/traverse": "^7.
|
|
33
|
+
"@babel/core": "^7.23.0",
|
|
34
|
+
"@babel/runtime": "^7.23.1",
|
|
35
|
+
"@babel/traverse": "^7.23.0",
|
|
36
36
|
"jscodeshift": "^0.13.1",
|
|
37
37
|
"jscodeshift-add-imports": "^1.0.10",
|
|
38
38
|
"yargs": "^17.7.2"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/chai": "^4.3.6",
|
|
42
42
|
"@types/jscodeshift": "0.11.5",
|
|
43
|
-
"chai": "^4.3.
|
|
43
|
+
"chai": "^4.3.10"
|
|
44
44
|
},
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"publishConfig": {
|