Skip to content

Commit

Permalink
fix: linting errors (#6067)
Browse files Browse the repository at this point in the history
* fix link to intercept command from migration-guide

* prettier
  • Loading branch information
cacieprins authored Jan 3, 2025
1 parent d496894 commit 35da1af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/api/commands/intercept.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ information about the request and response to the console:

| Version | Changes |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [14.0.0](/app/references/changelog#14-0-0) | Deprecated `resourceType` property |
| [14.0.0](/app/references/changelog#14-0-0) | Deprecated `resourceType` property |
| [12.2.0](/app/references/changelog#12-2-0) | Added `resourceType` property to `req` and `RouteMatcher`. |
| [7.6.0](/app/references/changelog#7-0-0) | Added `query` option to `req` (The incoming request object yielded to request handler functions). |
| [7.0.0](/app/references/changelog#7-0-0) | Removed `matchUrlAgainstPath` option from `RouteMatcher`, reversed handler ordering, added request events, removed substring URL matching, removed `cy.route2` alias, added `middleware` RouteMatcher option, renamed `res.delay()` to `res.setDelay()` and `res.throttle()` to `res.setThrottle()`. |
Expand Down
2 changes: 1 addition & 1 deletion docs/app/references/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ configuration object:

| Version | Changes |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [14.0.0](/app/references/changelog#14-0-0) | Removed `experimentalJustInTimeCompile` and `experimentalSkipDomainInjection` and made it default behavior. |
| [14.0.0](/app/references/changelog#14-0-0) | Removed `experimentalJustInTimeCompile` and `experimentalSkipDomainInjection` and made it default behavior. |
| [13.14.0](/app/references/changelog#13-14-0) | Added support for configuring the Experimental Just-In-Time (JIT) Compiling for component testing via `experimentalJustInTimeCompile`. |
| [13.4.0](/app/references/changelog#13-4-0) | Added support for configuring the Experimental Flake Detection strategy via `retries.experimentalStrategy` and `retries.experimentalOptions`. |
| [12.6.0](/app/references/changelog#12-6-0) | Removed `require`/`import` and added `Cypress.require` for `experimentalOriginDependencies`. |
Expand Down
17 changes: 9 additions & 8 deletions docs/app/references/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Older browser versions may still work with Cypress, but we recommend keeping you
The `resourceType` option on [`cy.intercept`](/api/commands/intercept) has been deprecated in Cypress 14.0.0. We anticipate the types of the `resourceType` to change in the future or be completely removed
from the API.

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](api/commands/intercept#Disabling-logs-for-a-request)). If you're using `resourceType` in your tests, please leave feedback on which `resourceType` values are important to you in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447).
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](/api/commands/intercept#Disabling-logs-for-a-request)). If you're using `resourceType` in your tests, please leave feedback on which `resourceType` values are important to you in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447).

### CT Just in Time Compile changes

Expand Down Expand Up @@ -68,7 +68,6 @@ If you would like to disable JIT compilation, you can do so by setting [`justInT

For users with the existing `experimentalJustInTimeCompile` flag set, you can remove this flag from your configuration.


### React `<18` CT no longer supported

With [LTS ending](https://github.com/reactjs/react.dev/issues/1745#issuecomment-466767389) for React 16 and 17 several years ago, the minimum required React version for component testing is now `18.0.0`.
Expand All @@ -77,7 +76,7 @@ Now that the minimum version of React supported for Component Testing is `18.0.0

To migrate, change the test harness from `cypress/react18` to `cypress/react`.

<Badge type="danger">Before</Badge>
<Badge type="danger">Before</Badge>{' '}

```ts
import { mount } from `cypress/react18`
Expand All @@ -101,7 +100,7 @@ npm install --save-dev @cypress/react@8

Inside your support file (ex: `./cypress/support/component.(js|ts)`), or wherever your mount function is imported, make the following update to add `@`.

<Badge type="danger">Before</Badge>
<Badge type="danger">Before</Badge>{' '}

```ts
import { mount } from `cypress/react`
Expand All @@ -121,7 +120,7 @@ Now that the minimum version of Angular supported for Component Testing is `17.2

To migrate, just change the test harness from `cypress/angular-signals` to `cypress/angular`.

<Badge type="danger">Before</Badge>
<Badge type="danger">Before</Badge>{' '}

```ts
import { mount } from `cypress/angular-signals`
Expand All @@ -145,7 +144,7 @@ npm install --save-dev @cypress/angular@2

Inside your support file (ex: `./cypress/support/component.(js|ts)`), or wherever your mount function is imported, make the following update to add `@`.

<Badge type="danger">Before</Badge>
<Badge type="danger">Before</Badge>{' '}

```ts
import { mount } from `cypress/angular`
Expand Down Expand Up @@ -173,7 +172,7 @@ npm install --save-dev @cypress/vue2

Inside your support file (ex: `./cypress/support/component.(js|ts)`), or wherever your mount function is imported, make the following update to add `@`.

<Badge type="danger">Before</Badge>
<Badge type="danger">Before</Badge>{' '}

```ts
import { mount } from `cypress/vue2`
Expand All @@ -188,6 +187,7 @@ import { mount } from `@cypress/vue2`
### Create React App CT no longer supported

[create-react-app](https://create-react-app.dev/) is no longer actively maintained or supported (see [CRA issue #13393](https://github.com/facebook/create-react-app/issues/13393)). Your component tests will now need a bundler to run. If still using [create-react-app](https://create-react-app.dev/), you'll either need to:

- [Eject](https://create-react-app.dev/docs/available-scripts/#npm-run-eject) the configuration to bundle with webpack.
- Leverage [vite](https://vite.dev/guide/) to bundle your component tests (quick setup with [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite)).

Expand All @@ -211,7 +211,8 @@ module.exports = defineConfig({

### `@vue/cli-service` CT no longer supported

`@vue/cli-service` is in [maintenance mode](https://cli.vuejs.org/guide/cli-service.html) and is no longer maintained by the Vue core team. Your component tests will now need a bundler to run. If still using [Vue CLI](https://cli.vuejs.org/), you will either need to:
`@vue/cli-service` is in [maintenance mode](https://cli.vuejs.org/guide/cli-service.html) and is no longer maintained by the Vue core team. Your component tests will now need a bundler to run. If still using [Vue CLI](https://cli.vuejs.org/), you will either need to:

- Migrate to webpack ([see example](https://github.com/cypress-io/cypress-component-testing-apps/tree/main/vue3-webpack-ts)).
- Leverage [vite](https://vite.dev/guide/). The Vue team recommends migrating to using `create-vue` to scaffold a [Vite](https://vite.dev/)-based project.

Expand Down

0 comments on commit 35da1af

Please sign in to comment.