mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GLDS: Get metrics of '@emotion/css' imports (#71064)
This commit is contained in:
parent
441660b7b4
commit
76974009d0
@ -6,6 +6,8 @@ ACCESSIBILITY_ERRORS="$(grep -oP '\"errors\":(\d+),' pa11y-ci-results.json | gre
|
|||||||
DIRECTIVES="$(grep -r -o directive public/app/ | wc -l)"
|
DIRECTIVES="$(grep -r -o directive public/app/ | wc -l)"
|
||||||
CONTROLLERS="$(grep -r -oP 'class .*Ctrl' public/app/ | wc -l)"
|
CONTROLLERS="$(grep -r -oP 'class .*Ctrl' public/app/ | wc -l)"
|
||||||
LEGACY_FORMS="$(grep -r -oP 'LegacyForms;' public/app | wc -l)"
|
LEGACY_FORMS="$(grep -r -oP 'LegacyForms;' public/app | wc -l)"
|
||||||
|
EMOTION_IMPORTS="$(grep -r -o -E --include="*.ts*" --exclude="*.test*" "\{.*css.*\} from '@emotion/css'" public/app | wc -l)"
|
||||||
|
TS_FILES="$(find public/app -type f -name "*.ts*" -not -name "*.test*" | wc -l)"
|
||||||
|
|
||||||
TOTAL_BUNDLE="$(du -sk ./public/build | cut -f1)"
|
TOTAL_BUNDLE="$(du -sk ./public/build | cut -f1)"
|
||||||
OUTDATED_DEPENDENCIES="$(yarn outdated --all | grep -oP '[[:digit:]]+ *(?= dependencies are out of date)')"
|
OUTDATED_DEPENDENCIES="$(yarn outdated --all | grep -oP '[[:digit:]]+ *(?= dependencies are out of date)')"
|
||||||
@ -27,6 +29,8 @@ echo -e "Low vulnerabilities: $LOW_VULNERABILITIES"
|
|||||||
echo -e "Med vulnerabilities: $MED_VULNERABILITIES"
|
echo -e "Med vulnerabilities: $MED_VULNERABILITIES"
|
||||||
echo -e "High vulnerabilities: $HIGH_VULNERABILITIES"
|
echo -e "High vulnerabilities: $HIGH_VULNERABILITIES"
|
||||||
echo -e "Critical vulnerabilities: $CRITICAL_VULNERABILITIES"
|
echo -e "Critical vulnerabilities: $CRITICAL_VULNERABILITIES"
|
||||||
|
echo -e "@emotion/css imports: $EMOTION_IMPORTS"
|
||||||
|
echo -e "Total TS files: $TS_FILES"
|
||||||
|
|
||||||
BETTERER_STATS=""
|
BETTERER_STATS=""
|
||||||
while read -r name value
|
while read -r name value
|
||||||
@ -43,5 +47,7 @@ echo "Metrics: {
|
|||||||
\"grafana.ci-code.controllers\": \"${CONTROLLERS}\",
|
\"grafana.ci-code.controllers\": \"${CONTROLLERS}\",
|
||||||
\"grafana.ci-code.legacyForms\": \"${LEGACY_FORMS}\",
|
\"grafana.ci-code.legacyForms\": \"${LEGACY_FORMS}\",
|
||||||
\"grafana.ci-code.bundleFolderSize\": \"${TOTAL_BUNDLE}\",
|
\"grafana.ci-code.bundleFolderSize\": \"${TOTAL_BUNDLE}\",
|
||||||
\"grafana.ci-code.dependencies.outdated\": \"${OUTDATED_DEPENDENCIES}\"
|
\"grafana.ci-code.dependencies.outdated\": \"${OUTDATED_DEPENDENCIES}\",
|
||||||
|
\"grafana.ci-code.imports.emotion\": \"${EMOTION_IMPORTS}\",
|
||||||
|
\"grafana.ci-code.tsFiles\": \"${TS_FILES}\"
|
||||||
}"
|
}"
|
||||||
|
Loading…
Reference in New Issue
Block a user