Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: service worker cache collision on same domain #159

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

divdavem
Copy link
Member

@divdavem divdavem commented Sep 27, 2023

Without this PR, if the AgnosUI demo is deployed on the same domain as another application that uses the CacheStorage (such as another instance of the AgnosUI demo), the service worker of AgnosUI will delete all other caches than its own latest version when it is activated (which happens each time the browser notices there is a new version of AgnosUI deployed).
With this PR, such deletion of caches will only happen for caches containing in their name the current service worker scope, which means only caches created from a previous version of the same service worker will be deleted.

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #159 (da770d4) into main (62d56ac) will decrease coverage by 0.77%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
- Coverage   88.65%   87.88%   -0.77%     
==========================================
  Files          55       55              
  Lines        1445     1445              
  Branches      225      225              
==========================================
- Hits         1281     1270      -11     
- Misses        126      137      +11     
  Partials       38       38              
Flag Coverage Δ
e2e-1 63.49% <ø> (ø)
e2e-2 ?
e2e-4 66.07% <ø> (ø)
e2e-5 49.55% <ø> (ø)
e2e-7 58.36% <ø> (ø)
e2e-8 57.40% <ø> (ø)
unit 91.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@divdavem divdavem marked this pull request as ready for review September 27, 2023 10:56
Copy link
Contributor

@fbasso fbasso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@divdavem
Copy link
Member Author

@fbasso Thank you for your review!

@divdavem divdavem merged commit 38bceff into AmadeusITGroup:main Sep 27, 2023
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants