@bundle-stats/html-templates
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0-beta.4
{ | ||
"name": "@bundle-stats/html-templates", | ||
"version": "2.0.0-beta.3", | ||
"version": "2.0.0-beta.4", | ||
"description": "HTML templates for report generation.", | ||
@@ -28,14 +28,14 @@ "main": "dist/index.html", | ||
"devDependencies": { | ||
"@babel/core": "7.7.7", | ||
"@babel/plugin-proposal-class-properties": "7.7.4", | ||
"@babel/plugin-proposal-object-rest-spread": "7.7.7", | ||
"@babel/preset-env": "7.7.7", | ||
"@babel/preset-react": "7.7.4", | ||
"@bundle-stats/ui": "^2.0.0-beta.3", | ||
"@bundle-stats/utils": "^2.0.0-beta.3", | ||
"@babel/core": "7.8.3", | ||
"@babel/plugin-proposal-class-properties": "7.8.3", | ||
"@babel/plugin-proposal-object-rest-spread": "7.8.3", | ||
"@babel/preset-env": "7.8.3", | ||
"@babel/preset-react": "7.8.3", | ||
"@bundle-stats/ui": "^2.0.0-beta.4", | ||
"@bundle-stats/utils": "^2.0.0-beta.4", | ||
"@moonwalker/orbit-ui": "1.14.9", | ||
"@relative-ci/agent": "1.2.0", | ||
"@storybook/addon-storyshots": "5.2.8", | ||
"@storybook/react": "5.2.8", | ||
"autoprefixer": "9.7.3", | ||
"@storybook/addon-storyshots": "5.3.5", | ||
"@storybook/react": "5.3.5", | ||
"autoprefixer": "9.7.4", | ||
"babel-eslint": "10.0.3", | ||
@@ -48,3 +48,3 @@ "babel-jest": "24.9.0", | ||
"classnames": "2.2.6", | ||
"core-js": "3.6.2", | ||
"core-js": "3.6.4", | ||
"cross-env": "6.0.3", | ||
@@ -56,8 +56,8 @@ "css-loader": "3.4.2", | ||
"eslint-config-airbnb": "18.0.1", | ||
"eslint-import-resolver-webpack": "0.12.0", | ||
"eslint-import-resolver-webpack": "0.12.1", | ||
"eslint-loader": "3.0.3", | ||
"eslint-plugin-import": "2.19.1", | ||
"eslint-plugin-jest": "23.4.0", | ||
"eslint-plugin-import": "2.20.0", | ||
"eslint-plugin-jest": "23.6.0", | ||
"eslint-plugin-jsx-a11y": "6.2.3", | ||
"eslint-plugin-react": "7.17.0", | ||
"eslint-plugin-react": "7.18.0", | ||
"html-webpack-inline-source-plugin": "0.0.10", | ||
@@ -77,4 +77,4 @@ "html-webpack-plugin": "3.2.0", | ||
"stats-webpack-plugin": "0.7.0", | ||
"stylelint": "12.0.1", | ||
"stylelint-config-css-modules": "2.1.0", | ||
"stylelint": "13.0.0", | ||
"stylelint-config-css-modules": "2.2.0", | ||
"stylelint-config-standard": "19.0.0", | ||
@@ -86,3 +86,6 @@ "terser-webpack-plugin": "2.3.2", | ||
"whatwg-fetch": "3.0.0" | ||
}, | ||
"dependencies": { | ||
"react-helmet": "^5.2.1" | ||
} | ||
} |
import PropTypes from 'prop-types'; | ||
import { Helmet } from 'react-helmet'; | ||
import { Box } from '@bundle-stats/ui/lib-esm/ui/box'; | ||
@@ -14,2 +15,3 @@ import { Container } from '@bundle-stats/ui/lib-esm/ui/container'; | ||
import appConfig from '../config.json'; | ||
import { Header } from './header'; | ||
@@ -50,6 +52,19 @@ import css from './styles.css'; | ||
const warnings = jobs[0] && jobs[0].warnings; | ||
const insights = jobs && jobs[0] && jobs[0].insights; | ||
const assetsSizeTotalInsight = insights | ||
&& insights.webpack | ||
&& insights.webpack.assetsSizeTotal; | ||
const duplicatePackagesInsights = insights | ||
&& insights.webpack | ||
&& insights.webpack.duplicatePackages; | ||
return ( | ||
<StandaloneAppLayout> | ||
{assetsSizeTotalInsight && ( | ||
<Helmet> | ||
<title> | ||
{`${assetsSizeTotalInsight.data.text} - ${appConfig.title}`} | ||
</title> | ||
</Helmet> | ||
)} | ||
<Container> | ||
@@ -65,5 +80,5 @@ <JobsHeader jobs={jobs} /> | ||
</Container> | ||
{warnings && warnings.webpack && warnings.webpack.duplicatePackages && ( | ||
{duplicatePackagesInsights && ( | ||
<Container> | ||
<DuplicatePackagesWarning duplicatePackages={warnings.webpack.duplicatePackages} /> | ||
<DuplicatePackagesWarning duplicatePackages={duplicatePackagesInsights.data} /> | ||
</Container> | ||
@@ -139,3 +154,3 @@ )} | ||
internalBuildNumber: PropTypes.number, | ||
warnings: PropTypes.object, | ||
insights: PropTypes.object, | ||
summary: PropTypes.object, | ||
@@ -142,0 +157,0 @@ })), |
@@ -40,3 +40,3 @@ /* global module */ | ||
stories.add('no warnings', () => ( | ||
stories.add('no insights', () => ( | ||
<StandaloneApp | ||
@@ -46,3 +46,3 @@ jobs={[ | ||
...CURRENT_JOB, | ||
warnings: undefined, | ||
insights: undefined, | ||
}, | ||
@@ -49,0 +49,0 @@ BASELINE_JOB, |
{ | ||
"title": "BundleStats report", | ||
"title": "BundleStats", | ||
"description": "relative-ci/bundle-stats: In-depth bundle analyzer for webpack(bundle size, assets, modules, packages)" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
432993
481
1
+ Addedreact-helmet@^5.2.1
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact@16.14.019.0.0(transitive)
+ Addedreact-fast-compare@2.0.4(transitive)
+ Addedreact-helmet@5.2.1(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedreact-side-effect@1.2.0(transitive)
+ Addedshallowequal@1.1.0(transitive)