cypress 15.9.0 → 15.10.0

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.
package/dist/cli.js CHANGED
@@ -114,6 +114,7 @@ const descriptions = {
114
114
  dev: 'runs cypress in development and bypasses binary check',
115
115
  e2e: 'runs end to end tests',
116
116
  env: 'sets environment variables. separate multiple values with a comma. overrides any value in cypress.config.{js,ts,mjs,cjs} or cypress.env.json',
117
+ expose: 'sets exposed public configuration variables. separate multiple values with a comma. overrides any value in cypress.config.{js,ts,mjs,cjs}',
117
118
  exit: 'keep the browser open after tests finish',
118
119
  forceInstall: 'force install the Cypress binary',
119
120
  global: 'force Cypress into global mode as if it were globally installed',
@@ -229,6 +230,7 @@ const addCypressRunCommand = (program) => {
229
230
  .option('-C, --config-file <config-file>', text('configFile'))
230
231
  .option('--e2e', text('e2e'))
231
232
  .option('-e, --env <env>', text('env'))
233
+ .option('-x, --expose <expose>', text('expose'))
232
234
  .option('--group <name>', text('group'))
233
235
  .option('-k, --key <record-key>', text('key'))
234
236
  .option('--headed', text('headed'))
@@ -260,6 +262,7 @@ const addCypressOpenCommand = (program) => {
260
262
  .option('-d, --detached [bool]', text('detached'), coerceFalse)
261
263
  .option('--e2e', text('e2e'))
262
264
  .option('-e, --env <env>', text('env'))
265
+ .option('-x, --expose <expose>', text('expose'))
263
266
  .option('--global', text('global'))
264
267
  .option('-p, --port <port>', text('port'))
265
268
  .option('-P, --project <project-path>', text('project'))
package/dist/exec/open.js CHANGED
@@ -52,6 +52,9 @@ const processOpenOptions = (options = {}) => {
52
52
  if (options.env) {
53
53
  args.push('--env', options.env);
54
54
  }
55
+ if (options.expose) {
56
+ args.push('--expose', options.expose);
57
+ }
55
58
  if (options.port) {
56
59
  args.push('--port', options.port);
57
60
  }
package/dist/exec/run.js CHANGED
@@ -70,6 +70,9 @@ const processRunOptions = (options = {}) => {
70
70
  if (options.env) {
71
71
  args.push('--env', options.env);
72
72
  }
73
+ if (options.expose) {
74
+ args.push('--expose', options.expose);
75
+ }
73
76
  if (options.exit === false) {
74
77
  args.push('--no-exit');
75
78
  }
package/dist/util.js CHANGED
@@ -159,7 +159,7 @@ const dequote = (str) => {
159
159
  return str;
160
160
  };
161
161
  const parseOpts = (opts) => {
162
- opts = lodash_1.default.pick(opts, 'autoCancelAfterFailures', 'browser', 'cachePath', 'cacheList', 'cacheClear', 'cachePrune', 'ciBuildId', 'ct', 'component', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'e2e', 'exit', 'env', 'force', 'global', 'group', 'headed', 'headless', 'inspect', 'inspectBrk', 'key', 'path', 'parallel', 'port', 'posixExitCodes', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'runnerUi', 'runProject', 'spec', 'tag');
162
+ opts = lodash_1.default.pick(opts, 'autoCancelAfterFailures', 'browser', 'cachePath', 'cacheList', 'cacheClear', 'cachePrune', 'ciBuildId', 'ct', 'component', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'e2e', 'exit', 'env', 'expose', 'force', 'global', 'group', 'headed', 'headless', 'inspect', 'inspectBrk', 'key', 'path', 'parallel', 'port', 'posixExitCodes', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'runnerUi', 'runProject', 'spec', 'tag');
163
163
  if (opts.exit) {
164
164
  opts = lodash_1.default.omit(opts, 'exit');
165
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "15.9.0",
3
+ "version": "15.10.0",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node dist/index.js --exec install",
@@ -35,7 +35,7 @@
35
35
  "hasha": "5.2.2",
36
36
  "is-installed-globally": "~0.4.0",
37
37
  "listr2": "^3.8.3",
38
- "lodash": "^4.17.21",
38
+ "lodash": "^4.17.23",
39
39
  "log-symbols": "^4.0.0",
40
40
  "minimist": "^1.2.8",
41
41
  "ospath": "^1.2.2",
@@ -132,8 +132,8 @@
132
132
  },
133
133
  "buildInfo": {
134
134
  "commitBranch": "develop",
135
- "commitSha": "2b07fd10b0b4899893346b8da834cac1f2eb3eea",
136
- "commitDate": "2026-01-12T21:04:46.000Z",
135
+ "commitSha": "e4324d18b55a114e81e1a2b76cd6e7d910e23732",
136
+ "commitDate": "2026-02-03T18:28:26.000Z",
137
137
  "stable": true
138
138
  },
139
139
  "description": "Cypress is a next generation front end testing tool built for the modern web",
@@ -512,6 +512,7 @@ declare namespace Cypress {
512
512
  * Returns all environment variables set with CYPRESS_ prefix or in "env" object in "cypress.config.{js,ts,mjs,cjs}"
513
513
  *
514
514
  * @see https://on.cypress.io/env
515
+ * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead.
515
516
  */
516
517
  env(): ObjectLike
517
518
  /**
@@ -521,6 +522,7 @@ declare namespace Cypress {
521
522
  * // cypress.config.js
522
523
  * { "env": { "foo": "bar" } }
523
524
  * Cypress.env("foo") // => bar
525
+ * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead.
524
526
  */
525
527
  env(key: string): any
526
528
  /**
@@ -529,6 +531,7 @@ declare namespace Cypress {
529
531
  * @see https://on.cypress.io/env
530
532
  * @example
531
533
  * Cypress.env("host", "http://server.dev.local")
534
+ * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead.
532
535
  */
533
536
  env(key: string, value: any): void
534
537
  /**
@@ -536,8 +539,40 @@ declare namespace Cypress {
536
539
  * @see https://on.cypress.io/env
537
540
  * @example
538
541
  * Cypress.env({ host: "http://server.dev.local", foo: "foo" })
542
+ * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead.
539
543
  */
540
544
  env(object: ObjectLike): void
545
+ /**
546
+ * Returns all exposed public configuration variables set with --expose in the CLI or in "expose" object in "cypress.config.{js,ts,mjs,cjs}"
547
+ *
548
+ * @see https://on.cypress.io/expose
549
+ */
550
+
551
+ expose(): ObjectLike
552
+ /**
553
+ * Returns specific exposed public configuration variable or undefined
554
+ * @see https://on.cypress.io/expose
555
+ * @example
556
+ * // cypress.config.js
557
+ * { "expose": { "foo": "bar" } }
558
+ * Cypress.expose("foo") // => bar
559
+ */
560
+ expose(key: string): any
561
+ /**
562
+ * Set value for an exposed public configuration variable.
563
+ * Any value you change will be permanently changed for the remainder of your tests.
564
+ * @see https://on.cypress.io/expose
565
+ * @example
566
+ * Cypress.expose("host", "http://server.dev.local")
567
+ */
568
+ expose(key: string, value: any): void
569
+ /**
570
+ * Set values for multiple exposed public configuration variables at once. Values are merged with existing values.
571
+ * @see https://on.cypress.io/expose
572
+ * @example
573
+ * Cypress.expose({ host: "http://server.dev.local", foo: "foo" })
574
+ */
575
+ expose(object: ObjectLike): void
541
576
 
542
577
  /**
543
578
  * @returns the number of test retries currently enabled for the run
@@ -2191,6 +2226,25 @@ declare namespace Cypress {
2191
2226
  */
2192
2227
  task<S = unknown>(event: string, arg?: any, options?: Partial<Loggable & Timeoutable>): Chainable<S>
2193
2228
 
2229
+ /**
2230
+ * Gets multiple environment variables.
2231
+ * @see https://on.cypress.io/env
2232
+ * @example
2233
+ * cy.env(['KEY_1', 'KEY_2']).then(({ KEY_1, KEY_2 }) => { ... })
2234
+ */
2235
+ env(keys: string[]): Chainable<Record<string, any>>
2236
+
2237
+ /**
2238
+ * Gets multiple environment variables with a specific type.
2239
+ * @see https://on.cypress.io/env
2240
+ * @example
2241
+ * cy.env<{ KEY_1: string, KEY_2: number }>(['KEY_1', 'KEY_2']).then(({ KEY_1, KEY_2 }) => {
2242
+ * expect(KEY_1).to.be.a('string')
2243
+ * expect(KEY_2).to.be.a('number')
2244
+ * })
2245
+ */
2246
+ env<T extends object>(keys: string[]): Chainable<T>
2247
+
2194
2248
  /**
2195
2249
  * Enables you to work with the subject yielded from the previous command.
2196
2250
  *
@@ -2934,11 +2988,28 @@ declare namespace Cypress {
2934
2988
  * @default null
2935
2989
  */
2936
2990
  baseUrl: string | null
2991
+
2992
+ /**
2993
+ * Whether Cypress should allow [Cypress.env()](https://on.cypress.io/env) API to be available in the browser.
2994
+ *
2995
+ * Cypress recommends migrating to the cy.env() command and disabling this within your Cypress configuration.
2996
+ *
2997
+ * The use of Cypress.env() will warn and throw an error when this is set to false.
2998
+ *
2999
+ * This will be the default behavior in a future major version of Cypress and Cypress.env() will be removed.
3000
+ * @default true
3001
+ */
3002
+ allowCypressEnv: boolean
2937
3003
  /**
2938
3004
  * Any values to be set as [environment variables](https://on.cypress.io/environment-variables)
2939
3005
  * @default {}
2940
3006
  */
2941
3007
  env: { [key: string]: any }
3008
+ /**
3009
+ * Any values to be set as [exposed public configuration variables](https://on.cypress.io/expose).
3010
+ * @default {}
3011
+ */
3012
+ expose: { [key: string]: any }
2942
3013
  /**
2943
3014
  * A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses minimatch with the options: {dot: true, matchBase: true}. We suggest using a tool to test what files would match.
2944
3015
  * @default "*.hot-update.js"
@@ -780,7 +780,7 @@ declare module "../index" {
780
780
  /**
781
781
  * @see _.intersectionWith
782
782
  */
783
- intersectionWith<T>(array?: List<T> | null, ...values: Array<List<T> | Comparator2<T, never>>): T[];
783
+ intersectionWith<T>(array?: List<T> | null, ...values: Array<List<T> | Comparator<T>>): T[];
784
784
  }
785
785
  interface Collection<T> {
786
786
  /**
@@ -790,7 +790,7 @@ declare module "../index" {
790
790
  /**
791
791
  * @see _.intersectionWith
792
792
  */
793
- intersectionWith(...values: Array<List<unknown> | Comparator2<T, never>>): Collection<T>;
793
+ intersectionWith(...values: Array<List<unknown> | Comparator<T>>): Collection<T>;
794
794
  }
795
795
  interface CollectionChain<T> {
796
796
  /**
@@ -800,7 +800,7 @@ declare module "../index" {
800
800
  /**
801
801
  * @see _.intersectionWith
802
802
  */
803
- intersectionWith(...values: Array<List<unknown> | Comparator2<T, never>>): CollectionChain<T>;
803
+ intersectionWith(...values: Array<List<unknown> | Comparator<T>>): CollectionChain<T>;
804
804
  }
805
805
  interface LoDashStatic {
806
806
  /**
@@ -342,10 +342,6 @@ declare module "../index" {
342
342
  * @return Returns true if value is correctly classified, else false.
343
343
  */
344
344
  isArray(value?: any): value is any[];
345
- /**
346
- * @see _.isArray
347
- */
348
- isArray<T>(value?: any): value is any[];
349
345
  }
350
346
  interface LoDashImplicitWrapper<TValue> {
351
347
  /**