Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Export everything from the second level #18306

Merged
merged 11 commits into from
Nov 25, 2019

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Nov 10, 2019

Export everything from the second level

Closes #17375

@mui-pr-bot
Copy link

mui-pr-bot commented Nov 10, 2019

@material-ui/core: parsed: +0.82% , gzip: +0.64%
@material-ui/lab: parsed: +0.26% , gzip: +0.08%

Details of bundle changes.

Comparing: aed1f38...bc77b50

bundle Size Change Size Gzip Change Gzip
@material-ui/core ▲ +2.86 kB (+0.82% ) 354 kB ▲ +618 B (+0.64% ) 96.7 kB
@material-ui/core[umd] ▲ +549 B (+0.18% ) 311 kB ▲ +239 B (+0.27% ) 89.6 kB
@material-ui/lab ▲ +443 B (+0.26% ) 172 kB ▲ +43 B (+0.08% ) 52 kB
TablePagination ▲ +264 B (+0.19% ) 140 kB ▲ +76 B (+0.19% ) 40.8 kB
Select ▲ +263 B (+0.23% ) 113 kB ▲ +44 B (+0.13% ) 33.5 kB
Chip ▲ +262 B (+0.32% ) 81.4 kB ▲ +57 B (+0.23% ) 24.8 kB
OutlinedInput ▲ +258 B (+0.36% ) 72.9 kB ▲ +51 B (+0.23% ) 22.6 kB
FilledInput ▲ +257 B (+0.36% ) 72.5 kB ▲ +46 B (+0.21% ) 22.4 kB
MenuItem ▲ +256 B (+0.33% ) 77 kB ▲ +52 B (+0.22% ) 23.9 kB
NativeSelect ▲ +255 B (+0.34% ) 75.6 kB ▲ +31 B (+0.13% ) 23.8 kB
ButtonBase ▲ +253 B (+0.35% ) 72.8 kB ▲ +50 B (+0.22% ) 22.8 kB
Input ▲ +253 B (+0.36% ) 71.4 kB ▲ +46 B (+0.21% ) 22.2 kB
Tabs ▲ +251 B (+0.30% ) 84.3 kB ▼ -268 B (-1.00% ) 26.5 kB
Switch ▲ +251 B (+0.32% ) 79.9 kB ▲ +260 B (+1.05% ) 25 kB
Dialog ▲ +251 B (+0.31% ) 81.4 kB ▲ +195 B (+0.77% ) 25.4 kB
Checkbox ▲ +251 B (+0.31% ) 80.6 kB ▲ +143 B (+0.57% ) 25.3 kB
StepButton ▲ +251 B (+0.31% ) 81.1 kB ▲ +139 B (+0.55% ) 25.5 kB
TableSortLabel ▲ +251 B (+0.33% ) 76.2 kB ▼ -133 B (-0.55% ) 23.9 kB
Radio ▲ +251 B (+0.31% ) 81.5 kB ▲ +108 B (+0.42% ) 25.6 kB
Slider ▲ +251 B (+0.34% ) 74.5 kB ▼ -108 B (-0.46% ) 23.3 kB
Rating ▲ +251 B (+0.37% ) 68.9 kB ▲ +100 B (+0.46% ) 22.1 kB
TreeView ▲ +251 B (+0.39% ) 65.2 kB ▲ +99 B (+0.49% ) 20.4 kB
SwipeableDrawer ▲ +251 B (+0.28% ) 90.6 kB ▼ -94 B (-0.34% ) 28 kB
Link ▲ +251 B (+0.38% ) 65.5 kB ▼ -93 B (-0.45% ) 20.6 kB
TreeItem ▲ +251 B (+0.35% ) 72.4 kB ▲ +88 B (+0.39% ) 22.8 kB
Snackbar ▲ +251 B (+0.33% ) 76 kB ▲ +87 B (+0.37% ) 23.7 kB
ExpansionPanelSummary ▲ +251 B (+0.33% ) 76.9 kB ▲ +84 B (+0.35% ) 24.2 kB
MobileStepper ▲ +251 B (+0.38% ) 66.6 kB ▲ +82 B (+0.40% ) 20.8 kB
StepContent ▲ +251 B (+0.37% ) 67.9 kB ▲ +80 B (+0.38% ) 21.2 kB
AppBar ▲ +251 B (+0.40% ) 62.6 kB ▼ -71 B (-0.36% ) 19.5 kB
ToggleButton ▲ +251 B (+0.34% ) 75 kB ▲ +67 B (+0.28% ) 23.7 kB
Breadcrumbs ▲ +251 B (+0.38% ) 66.9 kB ▼ -62 B (-0.30% ) 20.9 kB
InputLabel ▲ +251 B (+0.39% ) 64.2 kB ▲ +62 B (+0.31% ) 20 kB
FormHelperText ▲ +251 B (+0.41% ) 62.1 kB ▲ +60 B (+0.31% ) 19.4 kB
TableCell ▲ +251 B (+0.40% ) 62.9 kB ▲ +60 B (+0.30% ) 19.7 kB
SpeedDialAction ▲ +251 B (+0.22% ) 115 kB ▲ +57 B (+0.16% ) 36.5 kB
InputAdornment ▲ +251 B (+0.39% ) 63.9 kB ▼ -56 B (-0.28% ) 20 kB
StepLabel ▲ +251 B (+0.37% ) 67.5 kB ▲ +56 B (+0.27% ) 21.1 kB
SpeedDialIcon ▲ +251 B (+0.40% ) 63.4 kB ▲ +54 B (+0.27% ) 19.9 kB
FormGroup ▲ +251 B (+0.41% ) 60.9 kB ▲ +53 B (+0.28% ) 19 kB
Tab ▲ +251 B (+0.34% ) 75.2 kB ▼ -53 B (-0.22% ) 23.7 kB
LinearProgress ▲ +251 B (+0.39% ) 64.2 kB ▲ +52 B (+0.26% ) 20 kB
ListItemText ▲ +251 B (+0.39% ) 63.8 kB ▼ -52 B (-0.26% ) 19.9 kB
StepConnector ▲ +251 B (+0.41% ) 61.6 kB ▲ +52 B (+0.27% ) 19.3 kB
FormControlLabel ▲ +251 B (+0.39% ) 64.4 kB ▼ -51 B (-0.25% ) 20.1 kB
Skeleton ▲ +251 B (+0.41% ) 61.5 kB ▲ +51 B (+0.26% ) 19.3 kB
Badge ▲ +251 B (+0.39% ) 64.2 kB ▲ +50 B (+0.25% ) 19.9 kB
CardHeader ▲ +251 B (+0.39% ) 63.9 kB ▼ -50 B (-0.25% ) 20 kB
Stepper ▲ +251 B (+0.40% ) 63.6 kB ▲ +50 B (+0.25% ) 20 kB
Toolbar ▲ +251 B (+0.41% ) 61.2 kB ▲ +49 B (+0.26% ) 19.1 kB
ListSubheader ▲ +251 B (+0.41% ) 61.6 kB ▲ +48 B (+0.25% ) 19.3 kB
SnackbarContent ▲ +251 B (+0.39% ) 64.5 kB ▲ +47 B (+0.23% ) 20.2 kB
SpeedDial ▲ +251 B (+0.30% ) 84.9 kB ▲ +45 B (+0.17% ) 26.7 kB
Hidden ▲ +251 B (+0.39% ) 64.8 kB ▲ +42 B (+0.21% ) 20.3 kB
Box ▲ +251 B (+0.36% ) 69.6 kB ▲ +39 B (+0.19% ) 21 kB
ExpansionPanel ▲ +251 B (+0.36% ) 70.1 kB ▲ +39 B (+0.18% ) 21.8 kB
InputBase ▲ +251 B (+0.36% ) 69.5 kB ▲ +39 B (+0.18% ) 21.7 kB
ButtonGroup ▲ +251 B (+0.31% ) 80.9 kB ▲ +37 B (+0.15% ) 24.8 kB
RadioGroup ▲ +251 B (+0.41% ) 62.1 kB ▲ +33 B (+0.17% ) 19.4 kB
TextField ▲ +251 B (+0.21% ) 122 kB ▲ +30 B (+0.08% ) 35.5 kB
Card ▲ +251 B (+0.41% ) 61.6 kB ▼ -25 B (-0.13% ) 19.2 kB
CardContent ▲ +251 B (+0.41% ) 60.9 kB ▲ +24 B (+0.13% ) 19 kB
CircularProgress ▲ +251 B (+0.40% ) 63 kB ▲ +23 B (+0.12% ) 19.8 kB
ExpansionPanelDetails ▲ +251 B (+0.41% ) 60.8 kB ▲ +23 B (+0.12% ) 19 kB
DialogTitle ▲ +251 B (+0.40% ) 63.1 kB ▼ -21 B (-0.11% ) 19.7 kB
GridListTile ▲ +251 B (+0.40% ) 62.6 kB ▼ -21 B (-0.11% ) 19.5 kB
CardActions ▲ +251 B (+0.41% ) 60.9 kB ▲ +20 B (+0.11% ) 19 kB
DialogActions ▲ +251 B (+0.41% ) 61 kB ▲ +20 B (+0.11% ) 19 kB
DialogContentText ▲ +251 B (+0.40% ) 62.9 kB ▲ +19 B (+0.10% ) 19.7 kB
CardActionArea ▲ +251 B (+0.34% ) 73.9 kB ▼ -18 B (-0.08% ) 23.2 kB
GridList ▲ +251 B (+0.41% ) 61.4 kB ▲ +17 B (+0.09% ) 19.2 kB
GridListTileBar ▲ +251 B (+0.41% ) 62.1 kB ▼ -16 B (-0.08% ) 19.3 kB
DialogContent ▲ +251 B (+0.41% ) 61.1 kB ▲ +15 B (+0.08% ) 19.1 kB
Grid ▲ +251 B (+0.39% ) 64 kB ▲ +15 B (+0.08% ) 20 kB
BottomNavigationAction ▲ +251 B (+0.34% ) 74.3 kB ▼ -14 B (-0.06% ) 23.4 kB
CssBaseline ▲ +251 B (+0.45% ) 56.4 kB ▲ +14 B (+0.08% ) 17.6 kB
ListItemSecondaryAction ▲ +251 B (+0.41% ) 60.9 kB ▲ +14 B (+0.07% ) 19 kB
TableBody ▲ +251 B (+0.41% ) 61 kB ▲ +14 B (+0.07% ) 19 kB
ExpansionPanelActions ▲ +251 B (+0.41% ) 61 kB ▲ +12 B (+0.06% ) 19 kB
TableFooter ▲ +251 B (+0.41% ) 61 kB ▲ +11 B (+0.06% ) 19 kB
ToggleButtonGroup ▲ +251 B (+0.41% ) 62.1 kB ▼ -11 B (-0.06% ) 19.4 kB
TableHead ▲ +251 B (+0.41% ) 61 kB ▲ +10 B (+0.05% ) 19 kB
BottomNavigation ▲ +251 B (+0.41% ) 61.3 kB ▲ +9 B (+0.05% ) 19.1 kB
CardMedia ▲ +251 B (+0.41% ) 61.2 kB ▲ +8 B (+0.04% ) 19.2 kB
Step ▲ +251 B (+0.41% ) 61.5 kB ▲ +7 B (+0.04% ) 19.2 kB
ListItemIcon ▲ +251 B (+0.41% ) 61.1 kB ▼ -6 B (-0.03% ) 19 kB
TableRow ▲ +251 B (+0.41% ) 61.4 kB ▼ -6 B (-0.03% ) 19.1 kB
Divider ▲ +251 B (+0.41% ) 61.5 kB ▲ +4 B (+0.02% ) 19.2 kB
Icon ▲ +251 B (+0.41% ) 61.7 kB ▼ -3 B (-0.02% ) 19.2 kB
Avatar ▲ +251 B (+0.41% ) 61.6 kB ▲ +2 B (+0.01% ) 19.3 kB
ListItemAvatar ▲ +251 B (+0.41% ) 61 kB ▼ -2 B (-0.01% ) 19 kB
Table ▲ +251 B (+0.41% ) 61.4 kB ▼ -2 B (-0.01% ) 19.2 kB
Container ▲ +251 B (+0.41% ) 62 kB -- 19.3 kB
Paper ▲ +250 B (+0.41% ) 61.1 kB ▲ +49 B (+0.26% ) 19 kB
Typography ▲ +250 B (+0.40% ) 62.5 kB ▲ +48 B (+0.25% ) 19.5 kB
SvgIcon ▲ +249 B (+0.40% ) 61.9 kB ▲ +44 B (+0.23% ) 19.3 kB
Button ▲ +246 B (+0.32% ) 78.3 kB ▲ +53 B (+0.22% ) 23.9 kB
Collapse ▲ +246 B (+0.37% ) 66.8 kB ▲ +50 B (+0.24% ) 20.6 kB
List ▲ +246 B (+0.40% ) 61.2 kB ▲ +48 B (+0.25% ) 19 kB
Menu ▲ +244 B (+0.28% ) 87.1 kB ▼ -493 B (-1.81% ) 26.8 kB
IconButton ▲ +244 B (+0.33% ) 74.9 kB ▲ +54 B (+0.23% ) 23.3 kB
Popover ▲ +238 B (+0.29% ) 81.5 kB ▲ +58 B (+0.23% ) 25.1 kB
MenuList ▲ +238 B (+0.37% ) 64.8 kB ▲ +56 B (+0.28% ) 20.2 kB
Backdrop ▲ +238 B (+0.36% ) 66.6 kB ▲ +54 B (+0.26% ) 20.5 kB
FormControl ▲ +237 B (+0.38% ) 63.2 kB ▲ +49 B (+0.25% ) 19.6 kB
Fab ▲ +236 B (+0.31% ) 75.6 kB ▲ +52 B (+0.22% ) 23.5 kB
FormLabel ▲ +233 B (+0.38% ) 62.3 kB ▲ +47 B (+0.24% ) 19.2 kB
StepIcon ▲ +233 B (+0.37% ) 63.5 kB ▲ +47 B (+0.24% ) 19.7 kB
ListItem ▲ +233 B (+0.31% ) 75.9 kB ▲ +46 B (+0.19% ) 23.6 kB
Drawer ▲ +231 B (+0.28% ) 83.2 kB ▼ -484 B (-1.89% ) 25.2 kB
Tooltip ▲ +225 B (+0.23% ) 99.4 kB ▲ +53 B (+0.17% ) 31.4 kB
Slide ▲ +211 B (+0.87% ) 24.5 kB ▲ +48 B (+0.58% ) 8.32 kB
Fade ▲ +211 B (+0.95% ) 22.4 kB ▲ +41 B (+0.53% ) 7.71 kB
Zoom ▲ +211 B (+0.95% ) 22.5 kB ▲ +40 B (+0.52% ) 7.71 kB
styles/createMuiTheme ▲ +211 B (+1.37% ) 15.6 kB ▲ +37 B (+0.68% ) 5.47 kB
Grow ▲ +208 B (+0.91% ) 23 kB ▲ +38 B (+0.49% ) 7.83 kB
@material-ui/styles ▲ +205 B (+0.40% ) 51 kB ▼ -64 B (-0.42% ) 15.3 kB
Autocomplete ▲ +192 B (+0.15% ) 126 kB ▼ -521 B (-1.30% ) 39.5 kB
Modal -- 14.2 kB ▲ +12 B (+0.24% ) 4.99 kB
@material-ui/system -- 14.8 kB ▲ +4 B (+0.10% ) 4.06 kB
useAutocomplete -- 12.3 kB ▲ +4 B (+0.09% ) 4.54 kB
useMediaQuery -- 2.49 kB ▼ -4 B (-0.38% ) 1.05 kB
Popper -- 28.6 kB ▼ -2 B (-0.02% ) 10.2 kB
ClickAwayListener -- 3.87 kB ▼ -1 B (-0.06% ) 1.56 kB
docs.main -- 609 kB ▲ +1 B (0.00% ) 194 kB
Portal -- 2.87 kB ▲ +1 B (+0.08% ) 1.29 kB
RootRef -- 4.43 kB ▼ -1 B (-0.06% ) 1.67 kB
TextareaAutosize -- 5.06 kB ▼ -1 B (-0.05% ) 2.11 kB
colorManipulator -- 3.83 kB -- 1.52 kB
docs.landing -- 55.5 kB -- 14.4 kB
NoSsr -- 2.19 kB -- 1.03 kB

Generated by 🚫 dangerJS against bc77b50

packages/material-ui/src/index.js Outdated Show resolved Hide resolved
packages/material-ui/src/index.d.ts Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari added the core Infrastructure work going on behind the scenes label Nov 10, 2019
@merceyz merceyz changed the title [core] Add some missing exports [core] Export everything from the second level Nov 12, 2019
@oliviertassinari
Copy link
Member

@merceyz Let me know if you need any assistance with this effort.

@merceyz
Copy link
Member Author

merceyz commented Nov 16, 2019

Yes please, I don't know what to do about the codemod.
Could use rollup to build the package as rollup expands export * from '/styles' to export useTheme from '/styles/useTheme etc

As for the import/export, the idea was to just disable that eslint rule

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 19, 2019

@merceyz I will look at it after dinner :)

@oliviertassinari
Copy link
Member

@merceyz Updated, let me know what you think about the approach.

Comment on lines +57 to +58
import withWidth from '@material-ui/core/withWidth';
import { isWidthUp } from '@material-ui/core/withWidth';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oliviertassinari What happened here?

Copy link
Member

@oliviertassinari oliviertassinari Nov 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, isWidthUp wasn't exported from the barrel index.js. With the latest changes, imports can be changed. However, the codemod doesn't support the following case well:

import withWidth, { isWidthUp } from '@material-ui/core/withWidth';

It needs two runs to handle it correctly. This breaks the idempotent assertion.

I haven't found how to fix the 2 runs issue. Instead, I have changed the import syntax so the codemod test can be idempotent (equivalent to ignoring the problem).

@oliviertassinari
Copy link
Member

@merceyz Thank you

@merceyz merceyz deleted the exports branch November 25, 2019 09:02
eps1lon added a commit to eps1lon/material-ui that referenced this pull request Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typescript definitions not available on root of @material-ui/core
3 participants