magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.06k stars 682 forks source link

Update networkUtils.js to check saveData mode #4176

Open rafaelstz opened 11 months ago

rafaelstz commented 11 months ago

This PR is adding data saver verification before prefetching images.

Data Savers allow users to signal to a site if they would prefer lighter data-usage where possible. PWA Studio respects Save-Data preferences where navigator.connection.saveData is supported by the browser.

pwa-studio-bot commented 11 months ago
Fails
:no_entry_sign: `node` failed.
:no_entry_sign: A version label is required. A maintainer must add one.
:no_entry_sign: Unit tests in the following files did _not_ pass 😔. All tests must pass before this PR can be merged
  • packages/peregrine/lib/hooks/useCustomerWishlistSkus/__tests__/useCustomerWishlistSkus.spec.js
:no_entry_sign: No linked issue found. Please link a relevant open issue by adding the text "closes #" or "closes JIRA-" in your PR.
:no_entry_sign: Missing "Verification Steps" section. Please add it back, with detail.
:no_entry_sign: Missing "Description" section. Please add it back, with detail.
:no_entry_sign: The following file(s) were not formatted with **prettier**. Make sure to execute `yarn run prettier` locally prior to committing. ``` packages/venia-concept/src/ServiceWorker/Utilities/networkUtils.js ```
Messages
:book: DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next pr-test build run (assuming they are fixed).
:book: Access a deployed version of this PR [here](https://pr-4176.pwa-venia.com/). Make sure to wait for the "pwa-pull-request-deploy" job to complete.

Log

ERROR ON TASK: prettierCheck

ERROR ON TASK: unitTests


Error:  Danger had errors running. See message(s) above for more details.
danger-results://tmp/danger-results.json

If your PR is missing information, check against the original template here. At a minimum you must have the section headers from the template and provide some information in each section.

Generated by :no_entry_sign: dangerJS against 990bed0729fe0e10d6b5537c6721775ad976129e