cypress 6.3.0 → 6.4.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.
@@ -14,7 +14,9 @@ const {
14
14
 
15
15
  const Table = require('cli-table3');
16
16
 
17
- const moment = require('moment');
17
+ const dayjs = require('dayjs');
18
+
19
+ const relativeTime = require('dayjs/plugin/relativeTime');
18
20
 
19
21
  const chalk = require('chalk');
20
22
 
@@ -22,8 +24,9 @@ const _ = require('lodash');
22
24
 
23
25
  const getFolderSize = require('./get-folder-size');
24
26
 
25
- const Bluebird = require('bluebird'); // output colors for the table
27
+ const Bluebird = require('bluebird');
26
28
 
29
+ dayjs.extend(relativeTime); // output colors for the table
27
30
 
28
31
  const colors = {
29
32
  titles: chalk.white,
@@ -123,7 +126,7 @@ const getCachedVersions = showSize => {
123
126
  return binary;
124
127
  }
125
128
 
126
- const accessed = moment(lastAccessedTime).fromNow();
129
+ const accessed = dayjs(lastAccessedTime).fromNow();
127
130
  binary.accessed = accessed;
128
131
  return binary;
129
132
  }, e => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node index.js --exec install",
@@ -21,6 +21,7 @@
21
21
  "cli-table3": "~0.6.0",
22
22
  "commander": "^5.1.0",
23
23
  "common-tags": "^1.8.0",
24
+ "dayjs": "^1.9.3",
24
25
  "debug": "^4.1.1",
25
26
  "eventemitter2": "^6.4.2",
26
27
  "execa": "^4.0.2",
@@ -35,7 +36,7 @@
35
36
  "lodash": "^4.17.19",
36
37
  "log-symbols": "^4.0.0",
37
38
  "minimist": "^1.2.5",
38
- "moment": "^2.27.0",
39
+ "moment": "^2.29.1",
39
40
  "ospath": "^1.2.2",
40
41
  "pretty-bytes": "^5.4.1",
41
42
  "ramda": "~0.26.1",
@@ -281,7 +281,7 @@ declare namespace Cypress {
281
281
  // {defaultCommandTimeout: 10000, pageLoadTimeout: 30000, ...}
282
282
  ```
283
283
  */
284
- config(): ResolvedConfigOptions
284
+ config(): ResolvedConfigOptions & RuntimeConfigOptions
285
285
  /**
286
286
  * Returns one configuration value.
287
287
  * @see https://on.cypress.io/config
@@ -2614,6 +2614,110 @@ declare namespace Cypress {
2614
2614
  includeShadowDom: boolean
2615
2615
  }
2616
2616
 
2617
+ /**
2618
+ * Options appended to config object on runtime.
2619
+ */
2620
+ interface RuntimeConfigOptions {
2621
+ /**
2622
+ * CPU architecture, from Node `os.arch()`
2623
+ *
2624
+ * @see https://nodejs.org/api/os.html#os_os_arch
2625
+ */
2626
+ arch: string
2627
+ /**
2628
+ * The list of hosts to be blocked
2629
+ */
2630
+ blockHosts: null | string | string[]
2631
+ /**
2632
+ * The browser Cypress is running on.
2633
+ */
2634
+ browser: Browser
2635
+ /**
2636
+ * Available browsers found on your system.
2637
+ */
2638
+ browsers: Browser[]
2639
+ /**
2640
+ * Path to folder containing component test files.
2641
+ */
2642
+ componentFolder: string
2643
+ /**
2644
+ * Whether component testing is enabled.
2645
+ */
2646
+ experimentalComponentTesting: boolean
2647
+ /**
2648
+ * Hosts mappings to IP addresses.
2649
+ */
2650
+ hosts: null | string[]
2651
+ /**
2652
+ * Whether Cypress was launched via 'cypress open' (interactive mode)
2653
+ */
2654
+ isInteractive: boolean
2655
+ /**
2656
+ * Whether Cypress will search for and replace
2657
+ * obstructive JS code in .js or .html files.
2658
+ *
2659
+ * @see https://on.cypress.io/configuration#modifyObstructiveCode
2660
+ */
2661
+ modifyObstructiveCode: boolean
2662
+ /**
2663
+ * The platform Cypress is running on.
2664
+ */
2665
+ platform: 'linux' | 'darwin' | 'win32'
2666
+ /**
2667
+ * A unique ID for the project used for recording
2668
+ */
2669
+ projectId: null | string
2670
+ /**
2671
+ * Path to the support folder.
2672
+ */
2673
+ supportFolder: string
2674
+ /**
2675
+ * Glob pattern to determine what test files to load.
2676
+ */
2677
+ testFiles: string
2678
+ /**
2679
+ * The user agent the browser sends in all request headers.
2680
+ */
2681
+ userAgent: null | string
2682
+ /**
2683
+ * The Cypress version being used.
2684
+ */
2685
+ version: string
2686
+
2687
+ // Internal or Unlisted at server/lib/config_options
2688
+ autoOpen: boolean
2689
+ browserUrl: string
2690
+ clientRoute: string
2691
+ configFile: string
2692
+ cypressEnv: string
2693
+ integrationExampleName: string
2694
+ integrationExamplePath: string
2695
+ isNewProject: boolean
2696
+ isTextTerminal: boolean
2697
+ morgan: boolean
2698
+ namespace: string
2699
+ parentTestsFolder: string
2700
+ parentTestsFolderDisplay: string
2701
+ projectName: string
2702
+ projectRoot: string
2703
+ proxyUrl: string
2704
+ report: boolean
2705
+ reporterRoute: string
2706
+ reporterUrl: string
2707
+ socketId: null | string
2708
+ socketIoCookie: string
2709
+ socketIoRoute: string
2710
+ spec: {
2711
+ absolute: string
2712
+ name: string
2713
+ relative: string
2714
+ specFilter: null | string
2715
+ specType: 'integration' | 'component'
2716
+ }
2717
+ xhrRoute: string
2718
+ xhrUrl: string
2719
+ }
2720
+
2617
2721
  interface TestConfigOverrides extends Partial<Pick<ConfigOptions, 'animationDistanceThreshold' | 'baseUrl' | 'defaultCommandTimeout' | 'env' | 'execTimeout' | 'includeShadowDom' | 'requestTimeout' | 'responseTimeout' | 'retries' | 'scrollBehavior' | 'taskTimeout' | 'viewportHeight' | 'viewportWidth' | 'waitForAnimations'>> {
2618
2722
  browser?: IsBrowserMatcher | IsBrowserMatcher[]
2619
2723
  }
@@ -95,9 +95,9 @@ export namespace CyHttpMessages {
95
95
  */
96
96
  send(): void
97
97
  /**
98
- * Wait for `delayMs` milliseconds before sending the response to the client.
98
+ * Wait for `delay` milliseconds before sending the response to the client.
99
99
  */
100
- delay: (delayMs: number) => IncomingHttpResponse
100
+ delay: (delay: number) => IncomingHttpResponse
101
101
  /**
102
102
  * Serve the response at `throttleKbps` kilobytes per second.
103
103
  */
@@ -295,8 +295,9 @@ export type RouteHandler = string | StaticResponse | RouteHandlerController | ob
295
295
  export type StaticResponse = GenericStaticResponse<string, string | object> & {
296
296
  /**
297
297
  * Milliseconds to delay before the response is sent.
298
+ * @deprecated Use `delay` instead of `delayMs`.
298
299
  */
299
- delayMs?: number
300
+ delayMs?: number
300
301
  }
301
302
 
302
303
  export interface GenericStaticResponse<Fixture, Body> {
@@ -328,6 +329,10 @@ export interface GenericStaticResponse<Fixture, Body> {
328
329
  * Kilobits per second to send 'body'.
329
330
  */
330
331
  throttleKbps?: number
332
+ /**
333
+ * Milliseconds to delay before the response is sent.
334
+ */
335
+ delay?: number
331
336
  }
332
337
 
333
338
  /**