From 0dd9851b3a505d241699a609a149bada30cee0e0 Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Mon, 31 Mar 2025 09:49:07 -0400 Subject: [PATCH 1/3] chore: remove CDP deprecation notice in launching browsers related to firefox (#6116) --- docs/app/references/launching-browsers.mdx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/app/references/launching-browsers.mdx b/docs/app/references/launching-browsers.mdx index f1a34a72f7..97d4aab9d2 100644 --- a/docs/app/references/launching-browsers.mdx +++ b/docs/app/references/launching-browsers.mdx @@ -190,22 +190,6 @@ of our [docker images](/app/continuous-integration/overview#Cypress-Docker-Image By default, we will launch Firefox headlessly during `cypress run`. To run Firefox headed, you can pass the `--headed` argument to `cypress run`. -##### Webdriver BiDi and CDP Deprecation - -:::info - -Since Firefox 129, Chrome DevTools Protocol (CDP) has been [deprecated in Firefox](https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/). -In Firefox 135 and above, Cypress defaults to automating the Firefox browser with WebDriver BiDi. -Cypress will no longer support CDP within Firefox in the future and is planned for removal in Cypress 15. - -If CDP still needs to be used, you can force enablement via the `FORCE_FIREFOX_CDP=1` environment variable, regardless of Firefox version. For example: - -```bash -FORCE_FIREFOX_CDP=1 npx cypress run --browser firefox -``` - -::: - ### WebKit (Experimental) Cypress has [experimental](/app/references/experiments) support for WebKit, From 065e567ff97f4ad63a9fc1b54016e0290a5a67c5 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Tue, 8 Apr 2025 10:29:40 -0400 Subject: [PATCH 2/3] chore: Node.js 18/23 removal (#6138) * Update Node.js versions that will be supported for 15 * update lowest npm version supported --- docs/app/get-started/install-cypress.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/app/get-started/install-cypress.mdx b/docs/app/get-started/install-cypress.mdx index 7e50c869ef..3367b76004 100644 --- a/docs/app/get-started/install-cypress.mdx +++ b/docs/app/get-started/install-cypress.mdx @@ -113,7 +113,7 @@ Cypress supports running under these operating systems: Cypress requires [Node.js](https://nodejs.org/) in order to install. We support the versions listed below: -- **Node.js** 18.x, 20.x, 22.x and above +- **Node.js** 20.x, 22.x, 24.x and above Cypress generally aligns with [Node's release schedule](https://github.com/nodejs/Release). @@ -145,7 +145,7 @@ Cypress is [installed](#Install) using one of the following supported package ma | Package Manager | Version | Installation instructions | | ------------------------------------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------- | -| [npm](https://docs.npmjs.com/) | `8.6.0` and above | [Downloading and installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) | +| [npm](https://docs.npmjs.com/) | `10.1.0` and above | [Downloading and installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) | | [Yarn 1 (Classic)](https://classic.yarnpkg.com/) | `1.22.22` and above | [Yarn 1 (Classic) Installation](https://classic.yarnpkg.com/en/docs/install) | | [Yarn (Modern aka berry)](https://yarnpkg.com/) | `4.x` and above | [Yarn Installation](https://yarnpkg.com/getting-started/install) | | [pnpm](https://pnpm.io/) | `8.x` and above | [pnpm Installation](https://pnpm.io/installation) | From becd3da3ca46d2ca5bcb28bc3d0ab514549ec48c Mon Sep 17 00:00:00 2001 From: Bill Glesias Date: Tue, 22 Apr 2025 14:15:08 -0400 Subject: [PATCH 3/3] chore: update typescript docs to tsx (#6155) * chore: remove ts-node references and workarounds and replace them with tsx * add empty changelog entry for 15 to allow for linked out changes to build --- docs/app/references/changelog.mdx | 4 +++ docs/app/tooling/typescript-support.mdx | 37 ++++++++----------------- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/docs/app/references/changelog.mdx b/docs/app/references/changelog.mdx index 5f926b69aa..1c1a27a45f 100644 --- a/docs/app/references/changelog.mdx +++ b/docs/app/references/changelog.mdx @@ -8,6 +8,10 @@ sidebar_label: Changelog # Changelog +## 15.0.0 + +_Released 7/01/2025 (PENDING)_ + ## 14.2.1 _Released 3/26/2025_ diff --git a/docs/app/tooling/typescript-support.mdx b/docs/app/tooling/typescript-support.mdx index 87ad0a22c2..89bf5ae148 100644 --- a/docs/app/tooling/typescript-support.mdx +++ b/docs/app/tooling/typescript-support.mdx @@ -29,7 +29,7 @@ tests in TypeScript. ### Install TypeScript -To use TypeScript with Cypress, you will need TypeScript 4.0+. If you do not +To use TypeScript with Cypress, you will need TypeScript 5.0+. If you do not already have TypeScript installed as a part of your framework, you will need to install it: @@ -61,8 +61,8 @@ with the following configuration: ```json title="tsconfig.json" { "compilerOptions": { - "target": "es5", - "lib": ["es5", "dom"], + "target": "es6", + "lib": ["es6", "dom"], "sourceMap": true, "types": ["cypress", "node"] }, @@ -94,23 +94,9 @@ If that does not work, try restarting the IDE. ### Processing your Cypress configuration and plugins -Cypress needs to be able to transpile your Cypress configuration and plugins written in TypeScript in order to make them executable within Cypress's Node.js runtime. To do this, Cypress will attempt to read the user's TypeScript and project configuration to apply the correct TypeScript loader to Cypress's Node.js runtime. +Under the hood, Cypress uses [tsx](https://tsx.is/) to parse and run the `cypress.config.ts` file. -If your project is an `ESM` package (short for [ECMAScript Module](https://nodejs.org/api/esm.html#modules-ecmascript-modules)), Cypress attempts to apply the [ts-node/esm](https://github.com/TypeStrong/ts-node?tab=readme-ov-file#esm) Node.js loader to resolve the Cypress configuration and plugins. `ESM` is determined by Cypress if you have the `type: "module"` key-value pair present inside your project's `package.json`. - -Otherwise, regular [ts-node](https://github.com/TypeStrong/ts-node?tab=readme-ov-file#node-flags-and-other-tools) is required into Cypress's Node.js runtime. -Since Node.js by itself can only interpret CommonJS files, Cypress attempts to make your TypeScript configuration compatible with Cypress' Node.js runtime. -To do this, Cypress overrides the following configuration values found inside your project's `tsconfig.json`: - -```json -{ - "module": "commonjs", - "moduleResolution": "node", - "preserveValueImports": false -} -``` - -This does not have an impact on your project or its TypeScript configuration settings. This override only happens within the context of the Cypress runtime. +This allows Cypress to run your TypeScript configuration inside the Cypress runtime without being bound to limitations of Node or other loaders. ## Extending TypeScript Support @@ -380,12 +366,13 @@ root `tsconfig.json` file. ## History -| Version | Changes | -| ------------------------------------------ | ------------------------------------------------------------------------------------------ | -| [13.0.0](/app/references/changelog#13-0-0) | Raised minimum required TypeScript version from 3.4+ to 4.0+ | -| [10.0.0](/app/references/changelog#10-0-0) | Update guide to cover TypeScript setup for component testing | -| [5.0.0](/app/references/changelog#5-0-0) | Raised minimum required TypeScript version from 2.9+ to 3.4+ | -| [4.4.0](/app/references/changelog#4-4-0) | Added support for TypeScript without needing your own transpilation through preprocessors. | +| Version | Changes | +| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | +| [15.0.0](/app/references/changelog#15-0-0) | Raised minimum required TypeScript version from 4.0+ to 5.0+ and replaced `ts-node` with `tsx` to parse and run the `cypress.config.ts` file. | +| [13.0.0](/app/references/changelog#13-0-0) | Raised minimum required TypeScript version from 3.4+ to 4.0+ | +| [10.0.0](/app/references/changelog#10-0-0) | Update guide to cover TypeScript setup for component testing | +| [5.0.0](/app/references/changelog#5-0-0) | Raised minimum required TypeScript version from 2.9+ to 3.4+ | +| [4.4.0](/app/references/changelog#4-4-0) | Added support for TypeScript without needing your own transpilation through preprocessors. | ## See also