cypress 15.21.0 → 15.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/bin/cypress +1 -1
  2. package/dist/{cli-_xePNEPj.js → cli-Bq37KsfF.js} +14 -3
  3. package/dist/cli.js +1 -1
  4. package/dist/{cypress-DCSAOi2D.js → cypress-afrMJjAu.js} +1 -1
  5. package/dist/cypress.js +2 -2
  6. package/dist/index.js +2 -2
  7. package/dist/{tap-BkTD6Abc.js → tap-M6WV-Whx.js} +34 -12
  8. package/package.json +4 -4
  9. package/angular/angular/README.md +0 -15
  10. package/angular/angular/dist/index.d.ts +0 -136
  11. package/angular/angular/dist/index.js +0 -493
  12. package/angular/angular/package.json +0 -83
  13. package/angular-zoneless/angular-zoneless/README.md +0 -15
  14. package/angular-zoneless/angular-zoneless/dist/index.d.ts +0 -119
  15. package/angular-zoneless/angular-zoneless/dist/index.js +0 -482
  16. package/angular-zoneless/angular-zoneless/package.json +0 -74
  17. package/mount-utils/mount-utils/README.md +0 -140
  18. package/mount-utils/mount-utils/dist/index.d.ts +0 -12
  19. package/mount-utils/mount-utils/dist/index.js +0 -41
  20. package/mount-utils/mount-utils/package.json +0 -52
  21. package/react/react/README.md +0 -19
  22. package/react/react/dist/cypress-react.cjs.js +0 -293
  23. package/react/react/dist/cypress-react.esm-bundler.js +0 -268
  24. package/react/react/dist/index.d.ts +0 -94
  25. package/react/react/package.json +0 -113
  26. package/svelte/svelte/README.md +0 -19
  27. package/svelte/svelte/dist/cypress-svelte.cjs.js +0 -122
  28. package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +0 -120
  29. package/svelte/svelte/dist/index.d.ts +0 -30
  30. package/svelte/svelte/package.json +0 -63
  31. package/vue/vue/README.md +0 -14
  32. package/vue/vue/dist/cypress-vue.cjs.js +0 -8696
  33. package/vue/vue/dist/cypress-vue.esm-bundler.js +0 -8675
  34. package/vue/vue/dist/index.d.ts +0 -1375
  35. package/vue/vue/package.json +0 -97
package/dist/bin/cypress CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- var cli = require('../cli-_xePNEPj.js');
4
+ var cli = require('../cli-Bq37KsfF.js');
5
5
  require('../xvfb-BKRGwxlS.js');
6
6
  require('os');
7
7
  require('bluebird');
@@ -1327,7 +1327,7 @@ function requireTapErrors () {
1327
1327
  description: `The targeted ${exports$1.TAP_TARGET} is newer than this CLI.`,
1328
1328
  solution: `Update the CLI with ${UPDATE_COMMAND}, then try again.`,
1329
1329
  },
1330
- /** Raised when the handshake reported an older schema version, or GraphQL redirected. */
1330
+ /** Raised when the handshake reported an older schema version, or the session does not serve the tap GraphQL route. */
1331
1331
  SESSION_OUTDATED: {
1332
1332
  description: `The targeted ${exports$1.TAP_TARGET} is older than this CLI.`,
1333
1333
  solution: `Update Cypress in the running project with ${UPDATE_COMMAND}, restart it, then try again.`,
@@ -2166,7 +2166,7 @@ function requireDist () {
2166
2166
  return (mod && mod.__esModule) ? mod : { "default": mod };
2167
2167
  };
2168
2168
  Object.defineProperty(exports$1, "__esModule", { value: true });
2169
- exports$1.isCompatibleRecord = exports$1.sessionProbePath = exports$1.recordPath = exports$1.cypressSessionsDir = exports$1.parseRecordPid = exports$1.recordFileName = exports$1.isTapSupportedBrowser = exports$1.TAP_SUPPORTED_BROWSER_FAMILY = exports$1.SESSION_ID_HEADER = exports$1.SESSIONS_ROUTE_PREFIX = exports$1.SESSIONS_DIRNAME = exports$1.MIN_SCHEMA_VERSION = exports$1.SCHEMA_VERSION = void 0;
2169
+ exports$1.isCompatibleRecord = exports$1.tapGraphqlPath = exports$1.sessionProbePath = exports$1.recordPath = exports$1.cypressSessionsDir = exports$1.parseRecordPid = exports$1.recordFileName = exports$1.isTapSupportedBrowser = exports$1.TAP_SUPPORTED_BROWSER_FAMILY = exports$1.LEGACY_TAP_GRAPHQL_PATH = exports$1.TAP_GRAPHQL_ROUTE_PREFIX = exports$1.SESSION_ID_HEADER = exports$1.SESSIONS_ROUTE_PREFIX = exports$1.SESSIONS_DIRNAME = exports$1.MIN_SCHEMA_VERSION = exports$1.SCHEMA_VERSION = void 0;
2170
2170
  const path_1 = __importDefault(path);
2171
2171
  __exportStar(requireTapContract(), exports$1);
2172
2172
  __exportStar(requireTapOperations(), exports$1);
@@ -2176,6 +2176,13 @@ function requireDist () {
2176
2176
  const RECORD_EXTENSION = '.json';
2177
2177
  exports$1.SESSIONS_ROUTE_PREFIX = '/__cypress/sessions/';
2178
2178
  exports$1.SESSION_ID_HEADER = 'x-cypress-session-id';
2179
+ // Fixed rather than namespaced, as the sessions route is: the CLI has to find it
2180
+ // knowing only the port from the record.
2181
+ exports$1.TAP_GRAPHQL_ROUTE_PREFIX = '/__cypress/tap/graphql/';
2182
+ // Where tap GraphQL lived before the fixed route, under the default `namespace`.
2183
+ // The CLI falls back to it to keep tapping sessions that predate the route, and it
2184
+ // can go once those are no longer supported.
2185
+ exports$1.LEGACY_TAP_GRAPHQL_PATH = '/__cypress/graphql';
2179
2186
  exports$1.TAP_SUPPORTED_BROWSER_FAMILY = 'chromium';
2180
2187
  // tap drives the browser over CDP, which only Chromium-based browsers speak. A
2181
2188
  // null family means no browser is open yet — nothing to call unsupported.
@@ -2207,6 +2214,10 @@ function requireDist () {
2207
2214
  return `${exports$1.SESSIONS_ROUTE_PREFIX}${sessionId}`;
2208
2215
  };
2209
2216
  exports$1.sessionProbePath = sessionProbePath;
2217
+ const tapGraphqlPath = (operationName) => {
2218
+ return `${exports$1.TAP_GRAPHQL_ROUTE_PREFIX}${operationName}`;
2219
+ };
2220
+ exports$1.tapGraphqlPath = tapGraphqlPath;
2210
2221
  const isValidTestingType = (value) => {
2211
2222
  return value === 'e2e' || value === 'component' || value === null;
2212
2223
  };
@@ -3121,7 +3132,7 @@ const cliModule = {
3121
3132
  .action(function (opts, args) {
3122
3133
  return xvfb.__awaiter(this, void 0, void 0, function* () {
3123
3134
  try {
3124
- const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-BkTD6Abc.js'); });
3135
+ const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-M6WV-Whx.js'); });
3125
3136
  const code = yield tapModule.start(args || [], _.pick(opts, ['session', 'json', 'timeout']));
3126
3137
  process.exit(code);
3127
3138
  }
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ require('commander');
8
8
  require('common-tags');
9
9
  require('log-symbols');
10
10
  require('debug');
11
- var cli = require('./cli-_xePNEPj.js');
11
+ var cli = require('./cli-Bq37KsfF.js');
12
12
  require('./spawn-BkpC5qQ4.js');
13
13
  require('os');
14
14
  require('bluebird');
@@ -3,7 +3,7 @@
3
3
  var xvfb = require('./xvfb-BKRGwxlS.js');
4
4
  var tmp = require('tmp');
5
5
  var fs = require('fs-extra');
6
- var cli$1 = require('./cli-_xePNEPj.js');
6
+ var cli$1 = require('./cli-Bq37KsfF.js');
7
7
 
8
8
  /**
9
9
  * Opens Cypress GUI
package/dist/cypress.js CHANGED
@@ -3,8 +3,8 @@
3
3
  require('./xvfb-BKRGwxlS.js');
4
4
  require('tmp');
5
5
  require('fs-extra');
6
- require('./cli-_xePNEPj.js');
7
- var cypress = require('./cypress-DCSAOi2D.js');
6
+ require('./cli-Bq37KsfF.js');
7
+ var cypress = require('./cypress-afrMJjAu.js');
8
8
  require('os');
9
9
  require('bluebird');
10
10
  require('@cypress/xvfb');
package/dist/index.js CHANGED
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var xvfb = require('./xvfb-BKRGwxlS.js');
6
6
  var minimist = require('minimist');
7
7
  var Debug = require('debug');
8
- var cli$1 = require('./cli-_xePNEPj.js');
8
+ var cli$1 = require('./cli-Bq37KsfF.js');
9
9
  var spawn = require('./spawn-BkpC5qQ4.js');
10
- var cypress = require('./cypress-DCSAOi2D.js');
10
+ var cypress = require('./cypress-afrMJjAu.js');
11
11
  require('os');
12
12
  require('bluebird');
13
13
  require('@cypress/xvfb');
@@ -4,7 +4,7 @@ var xvfb = require('./xvfb-BKRGwxlS.js');
4
4
  var Debug = require('debug');
5
5
  var commander = require('commander');
6
6
  var path = require('path');
7
- var cli = require('./cli-_xePNEPj.js');
7
+ var cli = require('./cli-Bq37KsfF.js');
8
8
  var CRI = require('chrome-remote-interface');
9
9
  var chalk = require('chalk');
10
10
  var crypto = require('crypto');
@@ -1954,7 +1954,6 @@ const statusCommand = defineNativeCommand('status', reportStatus);
1954
1954
 
1955
1955
  const debug$2 = Debug('cypress:cli:tap');
1956
1956
  const GRAPHQL_HOST = '127.0.0.1';
1957
- const GRAPHQL_PATH = '/__cypress/graphql';
1958
1957
  const DEFAULT_QUERY_TIMEOUT_MS = 4000;
1959
1958
  const firstErrorMessage = (envelopeErrors) => {
1960
1959
  const first = Array.isArray(envelopeErrors) ? envelopeErrors[0] : undefined;
@@ -1976,28 +1975,51 @@ const validateEnvelope = (operationName, envelope) => {
1976
1975
  }
1977
1976
  return envelope.data;
1978
1977
  };
1978
+ // Whether the session served this path at all. The force-proxy guard redirects an
1979
+ // unrecognized path to the runner page while the MITM proxy is on, and Express 404s
1980
+ // it when CDP owns browser traffic instead; graphql itself answers 400 or 500, so
1981
+ // neither of these comes from the query.
1982
+ const isUnservedPath = (response) => {
1983
+ return response.redirected || response.status === 404;
1984
+ };
1985
+ // A session serving neither path is the reason for the failure, so the fault lies with
1986
+ // it rather than the request. Its liveness probe tells the two apart: the route is
1987
+ // unnamespaced and present in every build that has tap, so an answer means a live
1988
+ // session that simply predates the tap route, and silence means it is gone.
1989
+ const throwForUnservedPaths = (session, operationName) => xvfb.__awaiter(void 0, void 0, void 0, function* () {
1990
+ const live = yield cli.verifySessionRecord(session);
1991
+ if (live === null) {
1992
+ return throwTapError('STALE_SESSION', `The session stopped answering while running ${operationName}.`);
1993
+ }
1994
+ return throwTapError('SESSION_OUTDATED', `The session does not serve ${operationName} over tap GraphQL.`);
1995
+ });
1979
1996
  const querySessionGraphql = (session_1, operation_1, ...args_1) => xvfb.__awaiter(void 0, [session_1, operation_1, ...args_1], void 0, function* (session, operation, timeoutMs = DEFAULT_QUERY_TIMEOUT_MS) {
1980
1997
  const { operationName, query, variables } = operation;
1981
- const url = `http://${GRAPHQL_HOST}:${session.serverPort}${GRAPHQL_PATH}/${operationName}`;
1982
- let response;
1983
- try {
1984
- response = yield fetch(url, {
1998
+ const post = (path) => {
1999
+ return fetch(`http://${GRAPHQL_HOST}:${session.serverPort}${path}`, {
1985
2000
  method: 'POST',
1986
2001
  headers: { 'content-type': 'application/json', [cli.distExports.SESSION_ID_HEADER]: session.sessionId },
1987
2002
  body: JSON.stringify({ operationName, query, variables: variables !== null && variables !== void 0 ? variables : {} }),
1988
2003
  signal: AbortSignal.timeout(timeoutMs),
1989
2004
  });
2005
+ };
2006
+ let response;
2007
+ try {
2008
+ response = yield post(cli.distExports.tapGraphqlPath(operationName));
2009
+ // Sessions that predate the fixed tap route only serve GraphQL under the project's
2010
+ // `namespace`, so retry the default one — every such session that did not override
2011
+ // it answers there.
2012
+ if (isUnservedPath(response)) {
2013
+ debug$2('graphql request %s to pid %d went unserved; retrying the legacy path', operationName, session.pid);
2014
+ response = yield post(`${cli.distExports.LEGACY_TAP_GRAPHQL_PATH}/${operationName}`);
2015
+ }
1990
2016
  }
1991
2017
  catch (err) {
1992
2018
  debug$2('graphql request %s to pid %d failed: %o', operationName, session.pid, err);
1993
2019
  return throwTapError('GRAPHQL_UNREACHABLE', `Could not reach the session to run ${operationName}: ${err.message}`, err);
1994
2020
  }
1995
- // A valid request passes the server's force-proxy guard untouched; a redirect
1996
- // means the guard sent us to the runner page because the session doesn't allow
1997
- // direct tap GraphQL — an older Cypress that predates it (or one that rejected
1998
- // our session-id). Report that instead of the runner HTML as a data error.
1999
- if (response.redirected) {
2000
- return throwTapError('SESSION_OUTDATED', `The session redirected the ${operationName} request instead of answering it, so it does not support direct tap GraphQL.`);
2021
+ if (isUnservedPath(response)) {
2022
+ return yield throwForUnservedPaths(session, operationName);
2001
2023
  }
2002
2024
  if (response.status !== 200) {
2003
2025
  // express-graphql answers parse/validation failures with 400 + { errors: [...] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "15.21.0",
3
+ "version": "15.21.2",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node dist/index.js --exec install",
@@ -137,9 +137,9 @@
137
137
  ]
138
138
  },
139
139
  "buildInfo": {
140
- "commitBranch": "develop",
141
- "commitSha": "f7281bae34c0895a29e67d1c6d87b8fe7d0f4e27",
142
- "commitDate": "2026-08-18T16:13:49.000Z",
140
+ "commitBranch": "v15",
141
+ "commitSha": "e0e8f963e23d845799c62bc1c74642b533ba3fd7",
142
+ "commitDate": "2026-11-12T22:33:48.000Z",
143
143
  "stable": true
144
144
  },
145
145
  "description": "Cypress is a next generation front end testing tool built for the modern web",
@@ -1,15 +0,0 @@
1
- # @cypress/angular
2
-
3
- Mount Angular components in the open source [Cypress.io](https://www.cypress.io/) test runner
4
-
5
- > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Angular Component Testing Docs](https://docs.cypress.io/guides/component-testing/angular/overview) for mounting Angular components. Installing and importing `mount` from `@cypress/angular` should only be done for advanced use-cases.
6
-
7
- ## Requirements
8
-
9
- - Angular 18.0.0+ (`@cypress/angular@2` supports Angular 13 - 16 and `@cypress/angular@3` supports Angular 17).
10
-
11
- ## Development
12
-
13
- Run `yarn build` to compile and sync packages to the `cypress` cli package.
14
-
15
- ## [Changelog](./CHANGELOG.md)
@@ -1,136 +0,0 @@
1
- /// <reference types="cypress" />
2
-
3
- import { InputSignal, WritableSignal, Type } from '@angular/core';
4
- import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@angular/core/testing';
5
-
6
- /**
7
- * Additional module configurations needed while mounting the component, like
8
- * providers, declarations, imports and even component @Inputs()
9
- *
10
- * @interface MountConfig
11
- * @see https://angular.io/api/core/testing/TestModuleMetadata
12
- */
13
- interface MountConfig<T> extends TestModuleMetadata {
14
- /**
15
- * @memberof MountConfig
16
- * @description flag to automatically create a cy.spy() for every component @Output() property
17
- * @example
18
- * export class ButtonComponent {
19
- * @Output clicked = new EventEmitter()
20
- * }
21
- *
22
- * cy.mount(ButtonComponent, { autoSpyOutputs: true })
23
- * cy.get('@clickedSpy).should('have.been.called')
24
- */
25
- autoSpyOutputs?: boolean;
26
- /**
27
- * @memberof MountConfig
28
- * @description flag defaulted to true to automatically detect changes in your components
29
- */
30
- autoDetectChanges?: boolean;
31
- /**
32
- * @memberof MountConfig
33
- * @example
34
- * import { ButtonComponent } from 'button/button.component'
35
- * it('renders a button with Save text', () => {
36
- * cy.mount(ButtonComponent, { componentProperties: { text: 'Save' }})
37
- * cy.get('button').contains('Save')
38
- * })
39
- *
40
- * it('renders a button with a cy.spy() replacing EventEmitter', () => {
41
- * cy.mount(ButtonComponent, {
42
- * componentProperties: {
43
- * clicked: cy.spy().as('mySpy)
44
- * }
45
- * })
46
- * cy.get('button').click()
47
- * cy.get('@mySpy').should('have.been.called')
48
- * })
49
- */
50
- componentProperties?: Partial<{
51
- [P in keyof T]: T[P] extends InputSignal<infer V> ? InputSignal<V> | WritableSignal<V> | V : T[P];
52
- }>;
53
- }
54
- /**
55
- * Type that the `mount` function returns
56
- * @type MountResponse<T>
57
- */
58
- type MountResponse<T> = {
59
- /**
60
- * Fixture for debugging and testing a component.
61
- *
62
- * @memberof MountResponse
63
- * @see https://angular.io/api/core/testing/ComponentFixture
64
- */
65
- fixture: ComponentFixture<T>;
66
- /**
67
- * The instance of the root component class
68
- *
69
- * @memberof MountResponse
70
- * @see https://angular.io/api/core/testing/ComponentFixture#componentInstance
71
- */
72
- component: T;
73
- };
74
- declare class CypressTestComponentRenderer extends TestComponentRenderer {
75
- insertRootElement(rootElId: string): void;
76
- removeAllRootElements(): void;
77
- }
78
- /**
79
- * Mounts an Angular component inside Cypress browser
80
- *
81
- * @param component Angular component being mounted or its template
82
- * @param config configuration used to configure the TestBed
83
- * @example
84
- * import { mount } from '@cypress/angular'
85
- * import { StepperComponent } from './stepper.component'
86
- * import { MyService } from 'services/my.service'
87
- * import { SharedModule } from 'shared/shared.module';
88
- * it('mounts', () => {
89
- * mount(StepperComponent, {
90
- * providers: [MyService],
91
- * imports: [SharedModule]
92
- * })
93
- * cy.get('[data-cy=increment]').click()
94
- * cy.get('[data-cy=counter]').should('have.text', '1')
95
- * })
96
- *
97
- * // or
98
- *
99
- * it('mounts with template', () => {
100
- * mount('<app-stepper></app-stepper>', {
101
- * declarations: [StepperComponent],
102
- * })
103
- * })
104
- *
105
- * @see {@link https://on.cypress.io/mounting-angular} for more details.
106
- *
107
- * @returns A component and component fixture
108
- */
109
- declare function mount<T>(component: Type<T> | string, config?: MountConfig<T>): Cypress.Chainable<MountResponse<T>>;
110
- /**
111
- * Creates a new Event Emitter and then spies on it's `emit` method
112
- *
113
- * @param {string} alias name you want to use for your cy.spy() alias
114
- * @returns EventEmitter<T>
115
- * @example
116
- * import { StepperComponent } from './stepper.component'
117
- * import { mount, createOutputSpy } from '@cypress/angular'
118
- *
119
- * it('Has spy', () => {
120
- * mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } })
121
- * cy.get('[data-cy=increment]').click()
122
- * cy.get('@changeSpy').should('have.been.called')
123
- * })
124
- *
125
- * // Or for use with Angular Signals following the output nomenclature.
126
- * // see https://v17.angular.io/guide/model-inputs#differences-between-model-and-input/
127
- *
128
- * it('Has spy', () => {
129
- * mount(StepperComponent, { componentProperties: { count: signal(0), countChange: createOutputSpy('countChange') } })
130
- * cy.get('[data-cy=increment]').click()
131
- * cy.get('@countChange').should('have.been.called')
132
- * })
133
- */
134
- declare const createOutputSpy: <T>(alias: string) => any;
135
-
136
- export { CypressTestComponentRenderer, MountConfig, MountResponse, createOutputSpy, mount };