Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cwvtech-improvements
Browse files Browse the repository at this point in the history
sarahfossheim authored Jul 4, 2024
2 parents 2442a21 + f936274 commit ddd3f6d
Showing 9 changed files with 53 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/predeploy.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ jobs:
- name: Setup Node.js for use with actions
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
2 changes: 1 addition & 1 deletion .github/workflows/production-checks.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
- name: Set the list of URLs for Lighthouse to check
run: ./tools/scripts/set_lighthouse_urls.sh -p
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@11.4.0
uses: treosh/lighthouse-ci-action@12.1.0
id: LHCIAction
with:
# For prod, we simply check for 100% in Accessibility, Best Practices and SEO
4 changes: 2 additions & 2 deletions .github/workflows/test-website.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js for use with actions
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
@@ -48,7 +48,7 @@ jobs:
COMMIT_SHA: ${{ github.sha }}
run: ./tools/scripts/set_lighthouse_urls.sh
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@11.4.0
uses: treosh/lighthouse-ci-action@12.1.0
id: LHCIAction
with:
# For dev, turn off all timing perf audits (too unreliable) and a few others that don't work on dev
12 changes: 6 additions & 6 deletions config/last_updated.json
Original file line number Diff line number Diff line change
@@ -131,8 +131,8 @@
},
"/static/js/send-web-vitals.js": {
"date_published": "2022-01-03T00:00:00.000Z",
"date_modified": "2024-06-05T00:00:00.000Z",
"hash": "c468af1b2ac8681da4927af4a5de0a5a"
"date_modified": "2024-06-10T00:00:00.000Z",
"hash": "2d30d305f5baf1d90a0a70b3bd9186aa"
},
"/static/js/summaryLinked.js": {
"date_published": "2023-10-09T00:00:00.000Z",
@@ -166,8 +166,8 @@
},
"/static/js/techreport.js": {
"date_published": "2023-10-09T00:00:00.000Z",
"date_modified": "2024-05-31T00:00:00.000Z",
"hash": "2de9980fe1428a97844ee7b131ceb48f"
"date_modified": "2024-06-12T00:00:00.000Z",
"hash": "11c8cb0f2458a2955b6ae454e0efc288"
},
"/static/js/techreport/section.js": {
"date_published": "2023-10-09T00:00:00.000Z",
@@ -186,8 +186,8 @@
},
"/static/js/web-vitals.js": {
"date_published": "2022-01-03T00:00:00.000Z",
"date_modified": "2024-05-31T00:00:00.000Z",
"hash": "10638eba1611ff0dc07edbe721e3eb45"
"date_modified": "2024-06-21T00:00:00.000Z",
"hash": "0bf1a7e9889865e1cbbc6058659c9d83"
},
"about.html": {
"date_published": "2018-05-08T00:00:00.000Z",
64 changes: 32 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -37,8 +37,8 @@
"node-fetch": "3.3.2",
"recursive-readdir": "2.2.3",
"run-script-os": "1.1.6",
"web-vitals": "4.1.0",
"webpack": "5.91.0",
"web-vitals": "4.2.1",
"webpack": "5.92.1",
"webpack-cli": "5.1.4",
"xml-js": "1.6.11"
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flask==3.0.3
flask-talisman==1.1.0
google-cloud-storage==2.16.0
google-cloud-storage==2.17.0
gunicorn==22.0.0
markdown==3.6
pytest==8.2.2
4 changes: 2 additions & 2 deletions server/csp.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"'self'",
"'strict-dynamic'",
"cdn.httparchive.org",
"www.google-analytics.com",
"*.google-analytics.com",
"use.fontawesome.com",
"cdn.speedcurve.com",
"spdcrv.global.ssl.fastly.net",
@@ -22,7 +22,7 @@
"dev.to",
"cdn.rawgit.com",
"www.webpagetest.org",
"www.google-analytics.com",
"*.google-analytics.com",
"analytics.google.com",
"*.analytics.google.com",
"stats.g.doubleclick.net",
7 changes: 6 additions & 1 deletion src/js/send-web-vitals.js
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ function sendWebVitals() {
}));
}

function sendWebVitalsGAEvents({name, delta, id, attribution, navigationType}) {
function sendWebVitalsGAEvents({name, value, delta, id, attribution, navigationType}) {
let overrides = {};

switch (name) {
@@ -136,6 +136,11 @@ function sendWebVitals() {
event_category: 'Web Vitals',
event_value: Math.round(name === 'CLS' ? delta * 1000 : delta),
event_label: id,
// Repeat with new fields to match web-vitals documentation
// TODO deprecate above UA-style names
metric_value: Math.round(name === 'CLS' ? value * 1000 : value),
metric_delta: Math.round(name === 'CLS' ? delta * 1000 : delta),
metric_id: id,
nonInteraction: true,

effective_type: effectiveType,

0 comments on commit ddd3f6d

Please sign in to comment.