From 42ccfc128e8a4b77bd4bb13305f5cc40f0bee112 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Tue, 5 Nov 2024 09:22:39 -0500 Subject: [PATCH] deprecation: Deprecate resource type of intercept's request object (#30512) * deprecation: deprecate resourceType of intercept's request object * Add changelog entry --- cli/CHANGELOG.md | 5 +++++ packages/net-stubbing/lib/external-types.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 0210a84c7c32..e33d2a5af742 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -20,6 +20,11 @@ _Released 12/3/2024 (PENDING)_ - Cypress Component Testing no longer supports `Nuxt.js` version 2. Addresses [#30468](https://github.com/cypress-io/cypress/issues/30468). - Cypress Component Testing no longer supports `Vue` version 2. Addresses [#30295](https://github.com/cypress-io/cypress/issues/30295). +**Deprecations:** + +- The `resourceType` option on `cy.intercept` has been deprecated. We anticipate the resource types to change or be completely removed in the future. Our intention is to replace essential functionality dependent on the `resourceType` within Cypress in a future version (like hiding network logs that are not fetch/xhr). Please leave feedback on any essential uses of `resourceType` +in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addresses [#30433](https://github.com/cypress-io/cypress/issues/30433). + **Bugfixes:** - The CSS pseudo-class `:dir()` is now supported when testing in Electron. Addresses [#29766](https://github.com/cypress-io/cypress/issues/29766). diff --git a/packages/net-stubbing/lib/external-types.ts b/packages/net-stubbing/lib/external-types.ts index aa7d5dabccc5..c74c3d043890 100644 --- a/packages/net-stubbing/lib/external-types.ts +++ b/packages/net-stubbing/lib/external-types.ts @@ -144,6 +144,7 @@ export namespace CyHttpMessages { httpVersion: string /** * The resource type that is being requested, according to the browser. + * @deprecated the resource types may change or be completely removed in a future version of Cypress */ resourceType: ResourceType /**