reactjs / react-tabs

An accessible and easy tab component for ReactJS.
https://reactcommunity.org/react-tabs/
MIT License
3.1k stars 447 forks source link

Improve output code size and do not package tests #463

Closed danez closed 2 years ago

danez commented 2 years ago

BREAKING CHANGE: The package now does use Object.assign directly instead of babel helpers. In older browsers you might need to pollyfill these. react itself has the same dependency.

codecov-commenter commented 2 years ago

Codecov Report

Merging #463 (ae2d2a6) into main (d40cd52) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #463   +/-   ##
=======================================
  Coverage   98.21%   98.21%           
=======================================
  Files          10       10           
  Lines         337      337           
  Branches      107      107           
=======================================
  Hits          331      331           
  Misses          6        6           

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update d40cd52...ae2d2a6. Read the comment docs.

github-actions[bot] commented 2 years ago

πŸ“Š Package size report   -21.4%↓

File Before (Size / Gzip) After (Size / Gzip)
dist/react-tabs.development.js 29.7 kB / 6.7 kB -1.29%↓29.3 kB / -1.8%↓6.6 kB
dist/react-tabs.production.min.js 7.6 kB / 2.8 kB -1.79%↓7.5 kB / -2.7%↓2.7 kB
esm/components/Tab.js 3.0 kB / 1.1 kB -10.3%↓2.7 kB / -9.43%↓1.0 kB
esm/components/TabList.js 1.5 kB / 679 B -20.5%↓1.2 kB / -15.3%↓575 B
esm/components/TabPanel.js 2.2 kB / 882 B -14.5%↓1.9 kB / -12.1%↓775 B
esm/components/Tabs.js 4.8 kB / 1.7 kB -6.52%↓4.5 kB / -8.46%↓1.6 kB
esm/components/UncontrolledTabs.js 12.4 kB / 3.4 kB -2.52%↓12.1 kB / -2.86%↓3.3 kB
esm/helpers/childrenDeepMap.js 1.7 kB / 610 B -18.4%↓1.4 kB / -24.8%↓459 B
lib/components/Tab.js 4.7 kB / 1.5 kB -6.66%↓4.4 kB / -5.08%↓1.4 kB
lib/components/TabList.js 1.9 kB / 774 B -16.2%↓1.6 kB / -13.7%↓668 B
lib/components/TabPanel.js 2.6 kB / 981 B -12%↓2.3 kB / -10.9%↓874 B
lib/components/Tabs.js 6.5 kB / 2.1 kB -4.84%↓6.2 kB / -5.01%↓2.0 kB
lib/components/UncontrolledTabs.js 14.3 kB / 3.8 kB -2.2%↓14.0 kB / -1.95%↓3.7 kB
lib/helpers/childrenDeepMap.js 1.9 kB / 655 B -16.4%↓1.6 kB / -21.8%↓512 B
package.json 3.5 kB / 1.3 kB 2%↑3.5 kB / 1%↑1.3 kB
src/__tests__/index-test.js 547 B / 222 B β€”
src/components/__tests__/__snapshots__/Tab-test.js.snap 2.5 kB / 471 B β€”
src/components/__tests__/__snapshots__/TabList-test.js.snap 5.0 kB / 700 B β€”
src/components/__tests__/__snapshots__/TabPanel-test.js.snap 1.4 kB / 362 B β€”
src/components/__tests__/__snapshots__/Tabs-test.js.snap 19.8 kB / 1.3 kB β€”
src/components/__tests__/helpers/higherOrder/index.js 192 B / 93 B β€”
src/components/__tests__/helpers/higherOrder/TabListWrapper.js 229 B / 158 B β€”
src/components/__tests__/helpers/higherOrder/TabPanelWrapper.js 235 B / 161 B β€”
src/components/__tests__/helpers/higherOrder/TabWrapper.js 205 B / 154 B β€”
src/components/__tests__/Tab-test.js 1.7 kB / 597 B β€”
src/components/__tests__/TabList-test.js 2.6 kB / 686 B β€”
src/components/__tests__/TabPanel-test.js 1.7 kB / 563 B β€”
src/components/__tests__/Tabs-errors-test.js 5.2 kB / 1.3 kB β€”
src/components/__tests__/Tabs-node-test.js 982 B / 443 B β€”
src/components/__tests__/Tabs-test.js 16.6 kB / 2.8 kB β€”
Total (Includes all files) 296.3 kB / 80.7 kB -21.4%↓233.0 kB / -14.1%↓69.3 kB
Tarball size 56.9 kB -14.2%↓48.8 kB
Unchanged files | File | Size (Size / Gzip) | | -------------------------------------------------------------------------------------------------------------------------- | -------------------: | | `esm/helpers/count.js` | `253 B` / `173 B` | | `esm/helpers/elementTypes.js` | `286 B` / `160 B` | | `esm/helpers/propTypes.js` | `3.1 kB` / `979 B` | | `esm/helpers/uuid.js` | `163 B` / `136 B` | | `esm/index.js` | `281 B` / `132 B` | | `lib/helpers/count.js` | `380 B` / `215 B` | | `lib/helpers/elementTypes.js` | `460 B` / `219 B` | | `lib/helpers/propTypes.js` | `3.3 kB` / `1.0 kB` | | `lib/helpers/uuid.js` | `235 B` / `177 B` | | `lib/index.js` | `746 B` / `275 B` | | [`LICENSE`](https://github.com/reactjs/react-tabs/blob/size/LICENSE) | `1.1 kB` / `646 B` | | [`README.md`](https://github.com/reactjs/react-tabs/blob/size/README.md) | `13.1 kB` / `4.0 kB` | | [`src/components/Tab.js`](https://github.com/reactjs/react-tabs/blob/size/src/components/Tab.js) | `1.9 kB` / `704 B` | | [`src/components/TabList.js`](https://github.com/reactjs/react-tabs/blob/size/src/components/TabList.js) | `670 B` / `326 B` | | [`src/components/TabPanel.js`](https://github.com/reactjs/react-tabs/blob/size/src/components/TabPanel.js) | `1.2 kB` / `496 B` | | [`src/components/Tabs.js`](https://github.com/reactjs/react-tabs/blob/size/src/components/Tabs.js) | `4.2 kB` / `1.5 kB` | | [`src/components/UncontrolledTabs.js`](https://github.com/reactjs/react-tabs/blob/size/src/components/UncontrolledTabs.js) | `11.2 kB` / `3.1 kB` | | [`src/helpers/childrenDeepMap.js`](https://github.com/reactjs/react-tabs/blob/size/src/helpers/childrenDeepMap.js) | `1.4 kB` / `441 B` | | [`src/helpers/count.js`](https://github.com/reactjs/react-tabs/blob/size/src/helpers/count.js) | `250 B` / `176 B` | | [`src/helpers/elementTypes.js`](https://github.com/reactjs/react-tabs/blob/size/src/helpers/elementTypes.js) | `269 B` / `156 B` | | [`src/helpers/propTypes.js`](https://github.com/reactjs/react-tabs/blob/size/src/helpers/propTypes.js) | `3.3 kB` / `1.0 kB` | | [`src/helpers/uuid.js`](https://github.com/reactjs/react-tabs/blob/size/src/helpers/uuid.js) | `165 B` / `140 B` | | [`src/index.js`](https://github.com/reactjs/react-tabs/blob/size/src/index.js) | `282 B` / `133 B` | | [`style/react-tabs.css`](https://github.com/reactjs/react-tabs/blob/size/style/react-tabs.css) | `842 B` / `369 B` | | [`style/react-tabs.less`](https://github.com/reactjs/react-tabs/blob/size/style/react-tabs.less) | `879 B` / `393 B` | | [`style/react-tabs.scss`](https://github.com/reactjs/react-tabs/blob/size/style/react-tabs.scss) | `879 B` / `393 B` |
Hidden files | File | Before (Size / Gzip) | After (Size / Gzip) | | --------------------------------------- | --------------------: | -------------------------------------------------------: | | `dist/react-tabs.development.js.map` | `55.1 kB` / `14.6 kB` | 0.01%↑`55.1 kB` / -0.01%↓`14.6 kB` | | `dist/react-tabs.production.min.js.map` | `32.9 kB` / `9.6 kB` | 0.04%↑`32.9 kB` / `9.6 kB` |

πŸ€– This report was automatically generated by pkg-size-action