fix: Add existential operators to properties before calling split in processBrowserPreRequest (#28952)

* fix: Add existential operators to properties before calling split

* empty commit

* changelog entry

* Add note about regression

* remove duplicate dep in changelog

* Add link to issue

* Update packages/proxy/lib/http/util/service-worker-manager.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update packages/proxy/lib/http/util/service-worker-manager.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
This commit is contained in:
Jennifer Shehane
2024-02-15 13:29:40 -05:00
committed by GitHub
parent 0ea72a4c62
commit a0b2d1e912
2 changed files with 7 additions and 9 deletions

View File

@@ -7,22 +7,20 @@ _Released 2/13/2024 (PENDING)_
- Fixed an issue which caused the browser to relaunch after closing the browser from the Launchpad. Fixes [#28852](https://github.com/cypress-io/cypress/issues/28852).
- Fixed an issue with the unzip promise never being rejected when an empty error happens. Fixed in [#28850](https://github.com/cypress-io/cypress/pull/28850).
- Fixed a regression introduced in [`13.6.3`](https://docs.cypress.io/guides/references/changelog#13.6.3) where Cypress could crash when processing service worker requests through our proxy. Fixes [#28950](https://github.com/cypress-io/cypress/issues/28950).
- Fixed incorrect type definition of `dom.getContainsSelector`. Fixed in [#28339](https://github.com/cypress-io/cypress/pull/28339).
**Dependency Updates:**
- Upgraded `electron` from `25.8.4` to `27.1.3`
- Upgraded bundled Node.js version from `18.15.0` to `18.17.0`
- Upgraded bundled Chromium version from `114.0.5735.289` to `118.0.5993.117`
- Updated [`is-ci`](https://www.npmjs.com/package/is-ci) from `3.0.0` to `3.0.1`. Addressed in [#28933](https://github.com/cypress-io/cypress/pull/28933).
**Misc:**
- Improved accessibility of the Cypress App in some areas. Addressed in [#28774](https://github.com/cypress-io/cypress/pull/28774).
**Dependency Updates:**
- Upgraded `electron` from `25.8.4` to `27.1.3`.
- Upgraded bundled Node.js version from `18.15.0` to `18.17.0`.
- Upgraded bundled Chromium version from `114.0.5735.289` to `118.0.5993.117`.
- Updated buffer from `5.6.0` to `5.7.1`. Addressed in [#28934](https://github.com/cypress-io/cypress/pull/28934).
- Updated [`is-ci`](https://www.npmjs.com/package/is-ci) from `3.0.0` to `3.0.1`. Addressed in [#28933](https://github.com/cypress-io/cypress/pull/28933).
## 13.6.4

View File

@@ -118,7 +118,7 @@ export class ServiceWorkerManager {
this.serviceWorkerRegistrations.forEach((registration) => {
const activatedServiceWorker = registration.activatedServiceWorker
const paramlessDocumentURL = browserPreRequest.documentURL.split('?')[0]
const paramlessDocumentURL = browserPreRequest.documentURL?.split('?')[0] || ''
// We are determining here if a request is controlled by a service worker. A request is controlled by a service worker if
// we have an activated service worker, the request URL does not come from the service worker, and the request
@@ -130,7 +130,7 @@ export class ServiceWorkerManager {
return
}
const paramlessURL = browserPreRequest.url.split('?')[0]
const paramlessURL = browserPreRequest.url?.split('?')[0] || ''
const paramlessInitiatorURL = browserPreRequest.initiator?.url?.split('?')[0]
const paramlessCallStackURL = browserPreRequest.initiator?.stack?.callFrames[0]?.url?.split('?')[0]
const urlIsControlled = paramlessURL.startsWith(registration.scopeURL)