@nx/cypress 23.0.0-pr.35413.460eeef → 23.0.0-rc.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.
Files changed (155) hide show
  1. package/{index.d.ts → dist/index.d.ts} +0 -1
  2. package/dist/internal.d.ts +5 -0
  3. package/dist/internal.js +12 -0
  4. package/{plugin.d.ts → dist/plugin.d.ts} +0 -1
  5. package/{plugins → dist/plugins}/cypress-preset.d.ts +0 -1
  6. package/{plugins → dist/plugins}/cypress-preset.js +15 -5
  7. package/{src → dist/src}/executors/cypress/cypress.impl.d.ts +0 -1
  8. package/{src → dist/src}/executors/cypress/cypress.impl.js +2 -0
  9. package/{src → dist/src}/executors/cypress/schema.json +1 -0
  10. package/{src → dist/src}/generators/base-setup/base-setup.d.ts +0 -1
  11. package/{src → dist/src}/generators/base-setup/base-setup.js +5 -19
  12. package/dist/src/generators/base-setup/files/config-ts-cjs/cypress.config.ts__ext__ +3 -0
  13. package/dist/src/generators/base-setup/files/config-ts-esm/__directory__/support/commands.ts__ext__ +35 -0
  14. package/{src → dist/src}/generators/component-configuration/component-configuration.d.ts +0 -1
  15. package/{src → dist/src}/generators/component-configuration/component-configuration.js +25 -22
  16. package/{src → dist/src}/generators/configuration/configuration.d.ts +0 -1
  17. package/{src → dist/src}/generators/configuration/configuration.js +12 -11
  18. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
  19. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +7 -6
  20. package/{src → dist/src}/generators/convert-to-inferred/lib/add-dev-server-target-to-config.d.ts +0 -1
  21. package/{src → dist/src}/generators/convert-to-inferred/lib/add-exclude-spec-pattern.d.ts +0 -1
  22. package/{src → dist/src}/generators/convert-to-inferred/lib/target-options-map.d.ts +0 -1
  23. package/{src → dist/src}/generators/convert-to-inferred/lib/upsert-baseUrl.d.ts +0 -1
  24. package/{src → dist/src}/generators/init/init.d.ts +0 -1
  25. package/{src → dist/src}/generators/init/init.js +24 -11
  26. package/{src → dist/src}/generators/init/schema.json +1 -1
  27. package/{src → dist/src}/generators/migrate-to-cypress-11/conversion.util.d.ts +0 -1
  28. package/{src → dist/src}/generators/migrate-to-cypress-11/conversion.util.js +5 -6
  29. package/{src → dist/src}/generators/migrate-to-cypress-11/migrate-to-cypress-11.d.ts +0 -1
  30. package/{src → dist/src}/generators/migrate-to-cypress-11/migrate-to-cypress-11.js +3 -3
  31. package/{src/migrations/update-20-8-0/set-inject-document-domain.d.ts → dist/src/migrations/update-21-0-0/remove-tsconfig-and-copy-files-options-from-cypress-executor.d.ts} +0 -1
  32. package/{src → dist/src}/migrations/update-21-0-0/remove-tsconfig-and-copy-files-options-from-cypress-executor.js +29 -17
  33. package/dist/src/migrations/update-21-0-0/remove-tsconfig-and-copy-files-options-from-cypress-executor.md +103 -0
  34. package/{src → dist/src}/migrations/update-22-1-0/rename-cy-exec-code-property.d.ts +0 -1
  35. package/{src → dist/src}/migrations/update-22-1-0/rename-cy-exec-code-property.js +4 -4
  36. package/dist/src/migrations/update-22-1-0/rename-cy-exec-code-property.md +19 -0
  37. package/{src → dist/src}/migrations/update-22-1-0/update-angular-component-testing-support.d.ts +0 -1
  38. package/{src → dist/src}/migrations/update-22-1-0/update-angular-component-testing-support.js +4 -4
  39. package/dist/src/migrations/update-22-1-0/update-angular-component-testing-support.md +19 -0
  40. package/{src → dist/src}/migrations/update-22-1-0/update-selector-playground-api.d.ts +0 -1
  41. package/{src → dist/src}/migrations/update-22-1-0/update-selector-playground-api.js +3 -3
  42. package/dist/src/migrations/update-22-1-0/update-selector-playground-api.md +24 -0
  43. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
  44. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +223 -0
  45. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
  46. package/dist/src/migrations/update-23-0-0/remove-experimental-prompt-command.d.ts +2 -0
  47. package/dist/src/migrations/update-23-0-0/remove-experimental-prompt-command.js +47 -0
  48. package/dist/src/migrations/update-23-0-0/remove-experimental-prompt-command.md +55 -0
  49. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
  50. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +199 -0
  51. package/dist/src/plugins/plugin.d.ts +10 -0
  52. package/{src → dist/src}/plugins/plugin.js +88 -40
  53. package/{src → dist/src}/plugins/preprocessor-vite.d.ts +0 -1
  54. package/{src → dist/src}/utils/add-linter.d.ts +0 -1
  55. package/{src → dist/src}/utils/add-linter.js +16 -18
  56. package/dist/src/utils/assert-supported-cypress-version.d.ts +2 -0
  57. package/dist/src/utils/assert-supported-cypress-version.js +8 -0
  58. package/{src → dist/src}/utils/config.d.ts +10 -5
  59. package/{src → dist/src}/utils/config.js +52 -48
  60. package/{src → dist/src}/utils/constants.d.ts +0 -1
  61. package/{src → dist/src}/utils/ct-helpers.d.ts +0 -1
  62. package/dist/src/utils/deprecation.d.ts +3 -0
  63. package/dist/src/utils/deprecation.js +20 -0
  64. package/{src → dist/src}/utils/find-target-options.d.ts +0 -1
  65. package/{src → dist/src}/utils/migrations.d.ts +0 -1
  66. package/{src → dist/src}/utils/migrations.js +4 -4
  67. package/{src → dist/src}/utils/project-name.d.ts +0 -1
  68. package/{src → dist/src}/utils/start-dev-server.d.ts +0 -1
  69. package/{src → dist/src}/utils/versions.d.ts +5 -5
  70. package/{src → dist/src}/utils/versions.js +14 -51
  71. package/executors.json +2 -2
  72. package/generators.json +10 -10
  73. package/migrations.json +52 -61
  74. package/package.json +60 -13
  75. package/index.d.ts.map +0 -1
  76. package/plugin.d.ts.map +0 -1
  77. package/plugins/cypress-preset.d.ts.map +0 -1
  78. package/src/executors/cypress/cypress.impl.d.ts.map +0 -1
  79. package/src/generators/base-setup/base-setup.d.ts.map +0 -1
  80. package/src/generators/component-configuration/component-configuration.d.ts.map +0 -1
  81. package/src/generators/configuration/configuration.d.ts.map +0 -1
  82. package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
  83. package/src/generators/convert-to-inferred/lib/add-dev-server-target-to-config.d.ts.map +0 -1
  84. package/src/generators/convert-to-inferred/lib/add-exclude-spec-pattern.d.ts.map +0 -1
  85. package/src/generators/convert-to-inferred/lib/target-options-map.d.ts.map +0 -1
  86. package/src/generators/convert-to-inferred/lib/upsert-baseUrl.d.ts.map +0 -1
  87. package/src/generators/init/init.d.ts.map +0 -1
  88. package/src/generators/migrate-to-cypress-11/conversion.util.d.ts.map +0 -1
  89. package/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.d.ts.map +0 -1
  90. package/src/migrations/update-20-8-0/remove-experimental-fetch-polyfill.d.ts +0 -3
  91. package/src/migrations/update-20-8-0/remove-experimental-fetch-polyfill.d.ts.map +0 -1
  92. package/src/migrations/update-20-8-0/remove-experimental-fetch-polyfill.js +0 -48
  93. package/src/migrations/update-20-8-0/replace-experimental-just-in-time-compile.d.ts +0 -3
  94. package/src/migrations/update-20-8-0/replace-experimental-just-in-time-compile.d.ts.map +0 -1
  95. package/src/migrations/update-20-8-0/replace-experimental-just-in-time-compile.js +0 -94
  96. package/src/migrations/update-20-8-0/set-inject-document-domain.d.ts.map +0 -1
  97. package/src/migrations/update-20-8-0/set-inject-document-domain.js +0 -128
  98. package/src/migrations/update-20-8-0/update-component-testing-mount-imports.d.ts +0 -3
  99. package/src/migrations/update-20-8-0/update-component-testing-mount-imports.d.ts.map +0 -1
  100. package/src/migrations/update-20-8-0/update-component-testing-mount-imports.js +0 -151
  101. package/src/migrations/update-21-0-0/remove-tsconfig-and-copy-files-options-from-cypress-executor.d.ts +0 -3
  102. package/src/migrations/update-21-0-0/remove-tsconfig-and-copy-files-options-from-cypress-executor.d.ts.map +0 -1
  103. package/src/migrations/update-22-1-0/rename-cy-exec-code-property.d.ts.map +0 -1
  104. package/src/migrations/update-22-1-0/update-angular-component-testing-support.d.ts.map +0 -1
  105. package/src/migrations/update-22-1-0/update-selector-playground-api.d.ts.map +0 -1
  106. package/src/plugins/plugin.d.ts +0 -11
  107. package/src/plugins/plugin.d.ts.map +0 -1
  108. package/src/plugins/preprocessor-vite.d.ts.map +0 -1
  109. package/src/utils/add-linter.d.ts.map +0 -1
  110. package/src/utils/config.d.ts.map +0 -1
  111. package/src/utils/constants.d.ts.map +0 -1
  112. package/src/utils/ct-helpers.d.ts.map +0 -1
  113. package/src/utils/cypress-version.d.ts +0 -12
  114. package/src/utils/cypress-version.d.ts.map +0 -1
  115. package/src/utils/cypress-version.js +0 -38
  116. package/src/utils/find-target-options.d.ts.map +0 -1
  117. package/src/utils/migrations.d.ts.map +0 -1
  118. package/src/utils/project-name.d.ts.map +0 -1
  119. package/src/utils/start-dev-server.d.ts.map +0 -1
  120. package/src/utils/versions.d.ts.map +0 -1
  121. /package/{LICENSE → dist/LICENSE} +0 -0
  122. /package/{PLUGIN.md → dist/PLUGIN.md} +0 -0
  123. /package/{index.js → dist/index.js} +0 -0
  124. /package/{plugin.js → dist/plugin.js} +0 -0
  125. /package/{src → dist/src}/generators/base-setup/files/common/__directory__/fixtures/example.json +0 -0
  126. /package/{src → dist/src}/generators/base-setup/files/common/__directory__/support/commands.ts__ext__ +0 -0
  127. /package/{src → dist/src}/generators/base-setup/files/config-js-cjs/__directory__/support/commands.js__ext__ +0 -0
  128. /package/{src → dist/src}/generators/base-setup/files/config-js-cjs/cypress.config.js__ext__ +0 -0
  129. /package/{src → dist/src}/generators/base-setup/files/config-js-esm/__directory__/support/commands.js__ext__ +0 -0
  130. /package/{src → dist/src}/generators/base-setup/files/config-js-esm/cypress.config.js__ext__ +0 -0
  131. /package/{src/generators/base-setup/files/config-ts → dist/src/generators/base-setup/files/config-ts-cjs}/__directory__/support/commands.ts__ext__ +0 -0
  132. /package/{src/generators/base-setup/files/config-ts → dist/src/generators/base-setup/files/config-ts-esm}/cypress.config.ts__ext__ +0 -0
  133. /package/{src → dist/src}/generators/base-setup/files/tsconfig/non-ts-solution/__directory__/tsconfig.json__ext__ +0 -0
  134. /package/{src → dist/src}/generators/base-setup/files/tsconfig/ts-solution/__directory__/tsconfig.json__ext__ +0 -0
  135. /package/{src → dist/src}/generators/component-configuration/files/__directory__/support/component-index.html +0 -0
  136. /package/{src → dist/src}/generators/component-configuration/files/__directory__/support/component.ts__ext__ +0 -0
  137. /package/{src → dist/src}/generators/component-configuration/schema.d.ts +0 -0
  138. /package/{src → dist/src}/generators/component-configuration/schema.json +0 -0
  139. /package/{src → dist/src}/generators/configuration/files/__directory__/e2e/app.cy.ts__tmpl__ +0 -0
  140. /package/{src → dist/src}/generators/configuration/files/__directory__/support/app.po.ts__tmpl__ +0 -0
  141. /package/{src → dist/src}/generators/configuration/files/__directory__/support/e2e.ts__tmpl__ +0 -0
  142. /package/{src → dist/src}/generators/configuration/schema.json +0 -0
  143. /package/{src → dist/src}/generators/convert-to-inferred/lib/add-dev-server-target-to-config.js +0 -0
  144. /package/{src → dist/src}/generators/convert-to-inferred/lib/add-exclude-spec-pattern.js +0 -0
  145. /package/{src → dist/src}/generators/convert-to-inferred/lib/target-options-map.js +0 -0
  146. /package/{src → dist/src}/generators/convert-to-inferred/lib/upsert-baseUrl.js +0 -0
  147. /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
  148. /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
  149. /package/{src → dist/src}/generators/migrate-to-cypress-11/schema.json +0 -0
  150. /package/{src → dist/src}/plugins/preprocessor-vite.js +0 -0
  151. /package/{src → dist/src}/utils/constants.js +0 -0
  152. /package/{src → dist/src}/utils/ct-helpers.js +0 -0
  153. /package/{src → dist/src}/utils/find-target-options.js +0 -0
  154. /package/{src → dist/src}/utils/project-name.js +0 -0
  155. /package/{src → dist/src}/utils/start-dev-server.js +0 -0
@@ -2,4 +2,3 @@ export { configurationGenerator } from './src/generators/configuration/configura
2
2
  export { componentConfigurationGenerator } from './src/generators/component-configuration/component-configuration';
3
3
  export { cypressInitGenerator } from './src/generators/init/init';
4
4
  export { migrateCypressProject } from './src/generators/migrate-to-cypress-11/migrate-to-cypress-11';
5
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ export * from './src/utils/versions';
2
+ export * from './src/utils/ct-helpers';
3
+ export * from './src/utils/find-target-options';
4
+ export * from './src/utils/config';
5
+ export type { CypressExecutorOptions } from './src/executors/cypress/cypress.impl';
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // Semi-private surface for first-party Nx packages.
3
+ //
4
+ // External plugins should NOT import from here — this entry is curated for
5
+ // internal consumers and may change without semver protection. Mirrors
6
+ // `@nx/devkit/internal`.
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const tslib_1 = require("tslib");
9
+ tslib_1.__exportStar(require("./src/utils/versions"), exports);
10
+ tslib_1.__exportStar(require("./src/utils/ct-helpers"), exports);
11
+ tslib_1.__exportStar(require("./src/utils/find-target-options"), exports);
12
+ tslib_1.__exportStar(require("./src/utils/config"), exports);
@@ -1,2 +1 @@
1
1
  export { createNodesV2, createNodes } from './src/plugins/plugin';
2
- //# sourceMappingURL=plugin.d.ts.map
@@ -78,4 +78,3 @@ export type NxCypressE2EPresetOptions = {
78
78
  viteConfigOverrides?: InlineConfig;
79
79
  };
80
80
  export {};
81
- //# sourceMappingURL=cypress-preset.d.ts.map
@@ -4,12 +4,13 @@ exports.nxBaseCypressPreset = nxBaseCypressPreset;
4
4
  exports.nxE2EPreset = nxE2EPreset;
5
5
  const tslib_1 = require("tslib");
6
6
  const devkit_1 = require("@nx/devkit");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
+ const internal_1 = require("@nx/js/internal");
8
8
  const child_process_1 = require("child_process");
9
9
  const fs_1 = require("fs");
10
10
  const http_1 = require("http");
11
11
  const https_1 = require("https");
12
12
  const path_1 = require("path");
13
+ const url_1 = require("url");
13
14
  const preprocessor_vite_1 = tslib_1.__importDefault(require("../src/plugins/preprocessor-vite"));
14
15
  const constants_1 = require("../src/utils/constants");
15
16
  const treeKill = require('tree-kill');
@@ -17,14 +18,23 @@ function nxBaseCypressPreset(pathToConfig, options) {
17
18
  // used to set babel settings for react CT.
18
19
  process.env.NX_CYPRESS_COMPONENT_TEST =
19
20
  options?.testingType === 'component' ? 'true' : 'false';
21
+ // ESM-shape configs pass `import.meta.url` (a `file://...` URL string) so
22
+ // the same expression works under both Node's native TS strip (ESM,
23
+ // import.meta.url defined) and Cypress's bundled tsx CJS loader, which
24
+ // exposes `import.meta.url` but not `import.meta.dirname`. CJS-shape
25
+ // configs still pass `__filename` directly. Normalize either form to a
26
+ // filesystem path before stat-checking.
27
+ const resolvedPath = pathToConfig?.startsWith('file://')
28
+ ? (0, url_1.fileURLToPath)(pathToConfig)
29
+ : pathToConfig;
20
30
  // prevent from placing path outside the root of the workspace
21
31
  // if they pass in a file or directory
22
- const normalizedPath = (0, fs_1.lstatSync)(pathToConfig).isDirectory()
23
- ? pathToConfig
24
- : (0, path_1.dirname)(pathToConfig);
32
+ const normalizedPath = (0, fs_1.lstatSync)(resolvedPath).isDirectory()
33
+ ? resolvedPath
34
+ : (0, path_1.dirname)(resolvedPath);
25
35
  const projectPath = (0, path_1.relative)(devkit_1.workspaceRoot, normalizedPath);
26
36
  const offset = (0, path_1.relative)(normalizedPath, devkit_1.workspaceRoot);
27
- const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)();
37
+ const isTsSolutionSetup = (0, internal_1.isUsingTsSolutionSetup)();
28
38
  const videosFolder = isTsSolutionSetup
29
39
  ? (0, path_1.join)('test-output', 'cypress', 'videos')
30
40
  : (0, path_1.join)(offset, 'dist', 'cypress', projectPath, 'videos');
@@ -36,4 +36,3 @@ export interface CypressExecutorOptions extends Json {
36
36
  export default function cypressExecutor(options: CypressExecutorOptions, context: ExecutorContext): Promise<{
37
37
  success: any;
38
38
  }>;
39
- //# sourceMappingURL=cypress.impl.d.ts.map
@@ -5,9 +5,11 @@ const devkit_1 = require("@nx/devkit");
5
5
  const fs_1 = require("fs");
6
6
  const path_1 = require("path");
7
7
  const ct_helpers_1 = require("../../utils/ct-helpers");
8
+ const deprecation_1 = require("../../utils/deprecation");
8
9
  const start_dev_server_1 = require("../../utils/start-dev-server");
9
10
  const Cypress = require('cypress'); // @NOTE: Importing via ES6 messes the whole test dependencies.
10
11
  async function cypressExecutor(options, context) {
12
+ (0, deprecation_1.warnCypressExecutorDeprecation)();
11
13
  options = normalizeOptions(options, context);
12
14
  // this is used by cypress component testing presets to build the executor contexts with the correct configuration options.
13
15
  process.env.NX_CYPRESS_TARGET_CONFIGURATION = context.configurationName;
@@ -5,6 +5,7 @@
5
5
  "type": "object",
6
6
  "outputCapture": "pipe",
7
7
  "cli": "nx",
8
+ "x-deprecated": "The `@nx/cypress:cypress` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/cypress:convert-to-inferred` to migrate to the `@nx/cypress/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
8
9
  "presets": [
9
10
  {
10
11
  "name": "Starting Dev Server",
@@ -10,4 +10,3 @@ export interface CypressBaseSetupSchema {
10
10
  jsx?: boolean;
11
11
  }
12
12
  export declare function addBaseCypressSetup(tree: Tree, options: CypressBaseSetupSchema): void;
13
- //# sourceMappingURL=base-setup.d.ts.map
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addBaseCypressSetup = addBaseCypressSetup;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const js_1 = require("@nx/js");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
+ const internal_1 = require("@nx/js/internal");
7
7
  const path_1 = require("path");
8
8
  function addBaseCypressSetup(tree, options) {
9
9
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
@@ -12,7 +12,7 @@ function addBaseCypressSetup(tree, options) {
12
12
  return;
13
13
  }
14
14
  const opts = normalizeOptions(tree, projectConfig, options);
15
- const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
15
+ const isUsingTsSolutionConfig = (0, internal_1.isUsingTsSolutionSetup)(tree);
16
16
  const templateVars = {
17
17
  ...opts,
18
18
  jsx: !!opts.jsx,
@@ -35,16 +35,12 @@ function addBaseCypressSetup(tree, options) {
35
35
  (0, devkit_1.generateFiles)(tree, isUsingTsSolutionConfig
36
36
  ? (0, path_1.join)(__dirname, 'files/tsconfig/ts-solution')
37
37
  : (0, path_1.join)(__dirname, 'files/tsconfig/non-ts-solution'), projectConfig.root, templateVars);
38
+ const isEsm = (0, internal_1.isEsmProject)(tree, projectConfig.root);
38
39
  if (options.js) {
39
- if (isEsmProject(tree, projectConfig.root)) {
40
- (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files/config-js-esm'), projectConfig.root, templateVars);
41
- }
42
- else {
43
- (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files/config-js-cjs'), projectConfig.root, templateVars);
44
- }
40
+ (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, isEsm ? 'files/config-js-esm' : 'files/config-js-cjs'), projectConfig.root, templateVars);
45
41
  }
46
42
  else {
47
- (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files/config-ts'), projectConfig.root, templateVars);
43
+ (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, isEsm ? 'files/config-ts-esm' : 'files/config-ts-cjs'), projectConfig.root, templateVars);
48
44
  }
49
45
  if (opts.hasTsConfig) {
50
46
  (0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(projectConfig.root, 'tsconfig.json'), (json) => {
@@ -80,16 +76,6 @@ function normalizeOptions(tree, projectConfig, options) {
80
76
  hasTsConfig,
81
77
  };
82
78
  }
83
- function isEsmProject(tree, projectRoot) {
84
- let packageJson;
85
- if (tree.exists((0, devkit_1.joinPathFragments)(projectRoot, 'package.json'))) {
86
- packageJson = (0, devkit_1.readJson)(tree, (0, devkit_1.joinPathFragments)(projectRoot, 'package.json'));
87
- }
88
- else {
89
- packageJson = (0, devkit_1.readJson)(tree, 'package.json');
90
- }
91
- return packageJson.type === 'module';
92
- }
93
79
  function isEslintInstalled(tree) {
94
80
  const { dependencies, devDependencies } = (0, devkit_1.readJson)(tree, 'package.json');
95
81
  return !!(dependencies?.eslint || devDependencies?.eslint);
@@ -0,0 +1,3 @@
1
+ const { defineConfig } = require('cypress');
2
+
3
+ module.exports = defineConfig({});
@@ -0,0 +1,35 @@
1
+ /// <reference types="cypress" />
2
+
3
+ // ***********************************************
4
+ // This example commands.ts shows you how to
5
+ // create various custom commands and overwrite
6
+ // existing commands.
7
+ //
8
+ // For more comprehensive examples of custom
9
+ // commands please read more here:
10
+ // https://on.cypress.io/custom-commands
11
+ // ***********************************************
12
+ <% if (linter === 'eslint') { %>
13
+ // eslint-disable-next-line @typescript-eslint/no-namespace<% } %>
14
+ declare namespace Cypress {<% if (linter === 'eslint') { %>
15
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars<% } %>
16
+ interface Chainable<Subject> {
17
+ login(email: string, password: string): void;
18
+ }
19
+ }
20
+
21
+ // -- This is a parent command --
22
+ Cypress.Commands.add('login', (email, password) => {
23
+ console.log('Custom command example: Login', email, password);
24
+ });
25
+ //
26
+ // -- This is a child command --
27
+ // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
28
+ //
29
+ //
30
+ // -- This is a dual command --
31
+ // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
32
+ //
33
+ //
34
+ // -- This will overwrite an existing command --
35
+ // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
@@ -4,4 +4,3 @@ export declare function componentConfigurationGenerator(tree: Tree, options: Cyp
4
4
  export declare function componentConfigurationGeneratorInternal(tree: Tree, options: CypressComponentConfigurationSchema): Promise<GeneratorCallback>;
5
5
  export declare function updateTsConfigForComponentTesting(tree: Tree, projectConfig: ProjectConfiguration): void;
6
6
  export default componentConfigurationGenerator;
7
- //# sourceMappingURL=component-configuration.d.ts.map
@@ -5,8 +5,10 @@ exports.componentConfigurationGeneratorInternal = componentConfigurationGenerato
5
5
  exports.updateTsConfigForComponentTesting = updateTsConfigForComponentTesting;
6
6
  const tslib_1 = require("tslib");
7
7
  const devkit_1 = require("@nx/devkit");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
- const semver_1 = require("semver");
8
+ const internal_1 = require("@nx/devkit/internal");
9
+ const internal_2 = require("@nx/js/internal");
10
+ const assert_supported_cypress_version_1 = require("../../utils/assert-supported-cypress-version");
11
+ const deprecation_1 = require("../../utils/deprecation");
10
12
  const versions_1 = require("../../utils/versions");
11
13
  const base_setup_1 = require("../base-setup/base-setup");
12
14
  const init_1 = tslib_1.__importDefault(require("../init/init"));
@@ -17,18 +19,8 @@ function componentConfigurationGenerator(tree, options) {
17
19
  });
18
20
  }
19
21
  async function componentConfigurationGeneratorInternal(tree, options) {
20
- (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'cypress', 'component-configuration');
21
- // Cypress CT does not support Vite 8 yet (@cypress/vite-dev-server
22
- // peer dep is ^5.0.0 || ^6.0.0 || ^7.0.0).
23
- const viteVersion = (0, devkit_1.getDependencyVersionFromPackageJson)(tree, 'vite');
24
- if (viteVersion) {
25
- const viteMajor = (0, semver_1.major)((0, semver_1.coerce)(viteVersion));
26
- if (viteMajor >= 8) {
27
- throw new Error(`Cypress component testing does not yet support Vite ${viteMajor}. ` +
28
- `Downgrade to Vite 7 or earlier to use Cypress component testing. ` +
29
- `See: https://github.com/cypress-io/cypress/issues/33078`);
30
- }
31
- }
22
+ (0, assert_supported_cypress_version_1.assertSupportedCypressVersion)(tree);
23
+ (0, internal_2.assertNotUsingTsSolutionSetup)(tree, 'cypress', 'component-configuration');
32
24
  const tasks = [];
33
25
  const opts = normalizeOptions(tree, options);
34
26
  if (!(0, versions_1.getInstalledCypressMajorVersion)(tree)) {
@@ -47,6 +39,7 @@ async function componentConfigurationGeneratorInternal(tree, options) {
47
39
  }
48
40
  addProjectFiles(tree, projectConfig, opts);
49
41
  if (!hasPlugin || opts.addExplicitTargets) {
42
+ (0, deprecation_1.warnCypressExecutorGenerating)();
50
43
  addTargetToProject(tree, projectConfig, opts);
51
44
  }
52
45
  updateNxJsonConfiguration(tree, hasPlugin);
@@ -123,14 +116,24 @@ function updateNxJsonConfiguration(tree, hasPlugin) {
123
116
  !cacheableOperations.includes('component-test')) {
124
117
  cacheableOperations.push('component-test');
125
118
  }
126
- nxJson.targetDefaults ??= {};
127
- nxJson.targetDefaults['component-test'] ??= {};
128
- nxJson.targetDefaults['component-test'].cache ??= true;
129
- nxJson.targetDefaults['component-test'] ??= {};
130
- nxJson.targetDefaults['component-test'].inputs ??= [
131
- 'default',
132
- productionFileSet ? '^production' : '^default',
133
- ];
119
+ // Either a `target: 'component-test'` default or a default keyed on
120
+ // the executor we're scaffolding will apply to the new target — pick
121
+ // the more specific (target-keyed) when both are present.
122
+ const existingForTarget = (0, internal_1.findTargetDefault)(nxJson.targetDefaults, {
123
+ target: 'component-test',
124
+ });
125
+ const existingForExecutor = (0, internal_1.findTargetDefault)(nxJson.targetDefaults, {
126
+ executor: '@nx/cypress:cypress',
127
+ });
128
+ const existing = existingForTarget ?? existingForExecutor;
129
+ (0, internal_1.upsertTargetDefault)(tree, nxJson, {
130
+ target: 'component-test',
131
+ cache: existing?.cache ?? true,
132
+ inputs: existing?.inputs ?? [
133
+ 'default',
134
+ productionFileSet ? '^production' : '^default',
135
+ ],
136
+ });
134
137
  }
135
138
  (0, devkit_1.updateNxJson)(tree, nxJson);
136
139
  }
@@ -22,4 +22,3 @@ export interface CypressE2EConfigSchema {
22
22
  export declare function configurationGenerator(tree: Tree, options: CypressE2EConfigSchema): Promise<GeneratorCallback>;
23
23
  export declare function configurationGeneratorInternal(tree: Tree, options: CypressE2EConfigSchema): Promise<GeneratorCallback>;
24
24
  export default configurationGenerator;
25
- //# sourceMappingURL=configuration.d.ts.map
@@ -3,16 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.configurationGenerator = configurationGenerator;
4
4
  exports.configurationGeneratorInternal = configurationGeneratorInternal;
5
5
  const tslib_1 = require("tslib");
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const devkit_1 = require("@nx/devkit");
7
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
8
- const prompt_1 = require("@nx/devkit/src/generators/prompt");
9
8
  const js_1 = require("@nx/js");
10
- const generator_prompts_1 = require("@nx/js/src/utils/generator-prompts");
11
- const package_manager_workspaces_1 = require("@nx/js/src/utils/package-manager-workspaces");
12
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
+ const internal_2 = require("@nx/js/internal");
13
10
  const path_1 = require("path");
14
11
  const add_linter_1 = require("../../utils/add-linter");
12
+ const assert_supported_cypress_version_1 = require("../../utils/assert-supported-cypress-version");
15
13
  const config_1 = require("../../utils/config");
14
+ const deprecation_1 = require("../../utils/deprecation");
16
15
  const versions_1 = require("../../utils/versions");
17
16
  const base_setup_1 = require("../base-setup/base-setup");
18
17
  const init_1 = tslib_1.__importStar(require("../init/init"));
@@ -23,6 +22,7 @@ function configurationGenerator(tree, options) {
23
22
  });
24
23
  }
25
24
  async function configurationGeneratorInternal(tree, options) {
25
+ (0, assert_supported_cypress_version_1.assertSupportedCypressVersion)(tree);
26
26
  const opts = await normalizeOptions(tree, options);
27
27
  const tasks = [];
28
28
  const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
@@ -42,6 +42,7 @@ async function configurationGeneratorInternal(tree, options) {
42
42
  : p.plugin === '@nx/cypress/plugin');
43
43
  await addFiles(tree, opts, projectGraph, hasPlugin);
44
44
  if (!hasPlugin) {
45
+ (0, deprecation_1.warnCypressExecutorGenerating)();
45
46
  addTarget(tree, opts, projectGraph);
46
47
  }
47
48
  const projectTsConfigPath = (0, devkit_1.joinPathFragments)(opts.projectRoot, 'tsconfig.json');
@@ -59,7 +60,7 @@ async function configurationGeneratorInternal(tree, options) {
59
60
  });
60
61
  }
61
62
  const { root: projectRoot } = (0, devkit_1.readProjectConfiguration)(tree, options.project);
62
- const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
63
+ const isTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)(tree);
63
64
  if (isTsSolutionSetup) {
64
65
  createPackageJson(tree, opts);
65
66
  ignoreTestOutput(tree);
@@ -84,9 +85,9 @@ async function configurationGeneratorInternal(tree, options) {
84
85
  await (0, devkit_1.formatFiles)(tree);
85
86
  }
86
87
  if (isTsSolutionSetup) {
87
- const projectPackageManagerWorkspaceState = (0, package_manager_workspaces_1.getProjectPackageManagerWorkspaceState)(tree, projectRoot);
88
+ const projectPackageManagerWorkspaceState = (0, internal_2.getProjectPackageManagerWorkspaceState)(tree, projectRoot);
88
89
  if (projectPackageManagerWorkspaceState !== 'included') {
89
- tasks.push((0, package_manager_workspaces_1.getProjectPackageManagerWorkspaceStateWarningTask)(projectPackageManagerWorkspaceState, tree.root));
90
+ tasks.push((0, internal_2.getProjectPackageManagerWorkspaceStateWarningTask)(projectPackageManagerWorkspaceState, tree.root));
90
91
  }
91
92
  }
92
93
  return (0, devkit_1.runTasksInSerial)(...tasks);
@@ -102,7 +103,7 @@ function ensureDependencies(tree, options) {
102
103
  return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, true);
103
104
  }
104
105
  async function normalizeOptions(tree, options) {
105
- const linter = await (0, generator_prompts_1.normalizeLinterOption)(tree, options.linter);
106
+ const linter = await (0, internal_2.normalizeLinterOption)(tree, options.linter);
106
107
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
107
108
  if (projectConfig?.targets?.e2e) {
108
109
  throw new Error(`Project ${options.project} already has an e2e target.
@@ -141,7 +142,7 @@ In this case you need to provide a devServerTarget,'<projectName>:<targetName>[:
141
142
  };
142
143
  }
143
144
  async function promptForMissingServeData(projectName) {
144
- const { devServerTarget, port } = await (0, prompt_1.promptWhenInteractive)([
145
+ const { devServerTarget, port } = await (0, internal_1.promptWhenInteractive)([
145
146
  {
146
147
  type: 'input',
147
148
  name: 'devServerTarget',
@@ -273,7 +274,7 @@ function createPackageJson(tree, options) {
273
274
  if (tree.exists(packageJsonPath)) {
274
275
  return;
275
276
  }
276
- const importPath = (0, project_name_and_root_utils_1.resolveImportPath)(tree, projectConfig.name, projectConfig.root);
277
+ const importPath = (0, internal_1.resolveImportPath)(tree, projectConfig.name, projectConfig.root);
277
278
  const packageJson = {
278
279
  name: importPath,
279
280
  version: '0.0.1',
@@ -6,4 +6,3 @@ interface Schema {
6
6
  }
7
7
  export declare function convertToInferred(tree: Tree, options: Schema): Promise<void>;
8
8
  export default convertToInferred;
9
- //# sourceMappingURL=convert-to-inferred.d.ts.map
@@ -1,17 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertToInferred = convertToInferred;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_to_plugin_migrator_1 = require("@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator");
6
- const plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
7
6
  const plugin_1 = require("../../plugins/plugin");
7
+ const assert_supported_cypress_version_1 = require("../../utils/assert-supported-cypress-version");
8
8
  const add_dev_server_target_to_config_1 = require("./lib/add-dev-server-target-to-config");
9
9
  const add_exclude_spec_pattern_1 = require("./lib/add-exclude-spec-pattern");
10
10
  const target_options_map_1 = require("./lib/target-options-map");
11
11
  const upsert_baseUrl_1 = require("./lib/upsert-baseUrl");
12
12
  async function convertToInferred(tree, options) {
13
+ (0, assert_supported_cypress_version_1.assertSupportedCypressVersion)(tree);
13
14
  const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
14
- const migratedProjects = await (0, executor_to_plugin_migrator_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/cypress/plugin', plugin_1.createNodesV2, {
15
+ const migratedProjects = await (0, internal_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/cypress/plugin', plugin_1.createNodesV2, {
15
16
  targetName: 'cypress',
16
17
  ciTargetName: 'e2e-ci',
17
18
  componentTestingTargetName: 'component-test',
@@ -24,7 +25,7 @@ async function convertToInferred(tree, options) {
24
25
  },
25
26
  ], options.project);
26
27
  if (migratedProjects.size === 0) {
27
- throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
28
+ throw new internal_1.NoTargetsToMigrateError();
28
29
  }
29
30
  if (!options.skipFormat) {
30
31
  await (0, devkit_1.formatFiles)(tree);
@@ -54,7 +55,7 @@ function postTargetTransformer(target, tree, projectDetails, inferredTargetConfi
54
55
  }
55
56
  }
56
57
  if (target.outputs) {
57
- (0, plugin_migration_utils_1.processTargetOutputs)(target, [], inferredTargetConfiguration, {
58
+ (0, internal_1.processTargetOutputs)(target, [], inferredTargetConfiguration, {
58
59
  projectName: projectDetails.projectName,
59
60
  projectRoot: projectDetails.root,
60
61
  });
@@ -65,7 +66,7 @@ function handlePropertiesInOptions(tree, options, projectRoot, target) {
65
66
  let configFilePath;
66
67
  if ('cypressConfig' in options) {
67
68
  configFilePath = options.cypressConfig;
68
- options['config-file'] = (0, plugin_migration_utils_1.toProjectRelativePath)(configFilePath, projectRoot);
69
+ options['config-file'] = (0, internal_1.toProjectRelativePath)(configFilePath, projectRoot);
69
70
  delete options.cypressConfig;
70
71
  }
71
72
  if ('copyFiles' in options) {
@@ -10,4 +10,3 @@ import type { Tree } from '@nx/devkit';
10
10
  * b. Replace the existing webServerCommands with the value passed in
11
11
  */
12
12
  export declare function addDevServerTargetToConfig(tree: Tree, configFilePath: string, webServerCommands: Record<string, string>, ciDevServerTarget?: string): void;
13
- //# sourceMappingURL=add-dev-server-target-to-config.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  export declare function addExcludeSpecPattern(tree: Tree, configFilePath: string, excludeSpecPattern: string | string[]): void;
3
- //# sourceMappingURL=add-exclude-spec-pattern.d.ts.map
@@ -16,4 +16,3 @@ export declare const targetOptionsToCliMap: {
16
16
  quiet: string;
17
17
  runnerUi: string;
18
18
  };
19
- //# sourceMappingURL=target-options-map.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { Tree } from '@nx/devkit';
2
2
  export declare function upsertBaseUrl(tree: Tree, configFilePath: string, baseUrlValueInProject: string): void;
3
- //# sourceMappingURL=upsert-baseUrl.d.ts.map
@@ -4,4 +4,3 @@ export declare function addPlugin(tree: Tree, graph: ProjectGraph, updatePackage
4
4
  export declare function cypressInitGenerator(tree: Tree, options: Schema): Promise<GeneratorCallback>;
5
5
  export declare function cypressInitGeneratorInternal(tree: Tree, options: Schema): Promise<GeneratorCallback>;
6
6
  export default cypressInitGenerator;
7
- //# sourceMappingURL=init.d.ts.map
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addPlugin = addPlugin;
4
4
  exports.cypressInitGenerator = cypressInitGenerator;
5
5
  exports.cypressInitGeneratorInternal = cypressInitGeneratorInternal;
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const devkit_1 = require("@nx/devkit");
7
- const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
8
8
  const plugin_1 = require("../../plugins/plugin");
9
+ const assert_supported_cypress_version_1 = require("../../utils/assert-supported-cypress-version");
9
10
  const versions_1 = require("../../utils/versions");
10
11
  function setupE2ETargetDefaults(tree) {
11
12
  const nxJson = (0, devkit_1.readNxJson)(tree);
@@ -13,15 +14,26 @@ function setupE2ETargetDefaults(tree) {
13
14
  return;
14
15
  }
15
16
  // E2e targets depend on all their project's sources + production sources of dependencies
16
- nxJson.targetDefaults ??= {};
17
17
  const productionFileSet = !!nxJson.namedInputs?.production;
18
- nxJson.targetDefaults.e2e ??= {};
19
- nxJson.targetDefaults.e2e.cache ??= true;
20
- nxJson.targetDefaults.e2e.inputs ??= [
21
- 'default',
22
- productionFileSet ? '^production' : '^default',
23
- ];
24
- (0, devkit_1.updateNxJson)(tree, nxJson);
18
+ const existing = findExistingE2eDefault(nxJson.targetDefaults);
19
+ const patch = {};
20
+ if (existing?.cache === undefined)
21
+ patch.cache = true;
22
+ if (existing?.inputs === undefined) {
23
+ patch.inputs = ['default', productionFileSet ? '^production' : '^default'];
24
+ }
25
+ if (Object.keys(patch).length > 0) {
26
+ (0, internal_1.upsertTargetDefault)(tree, nxJson, { target: 'e2e', ...patch });
27
+ (0, devkit_1.updateNxJson)(tree, nxJson);
28
+ }
29
+ }
30
+ function findExistingE2eDefault(td) {
31
+ if (!td)
32
+ return undefined;
33
+ if (Array.isArray(td)) {
34
+ return td.find((e) => e.target === 'e2e' && e.projects === undefined && e.plugin === undefined);
35
+ }
36
+ return td['e2e'];
25
37
  }
26
38
  function updateDependencies(tree, options) {
27
39
  const tasks = [];
@@ -32,11 +44,11 @@ function updateDependencies(tree, options) {
32
44
  if (!(0, versions_1.getInstalledCypressVersion)(tree)) {
33
45
  devDependencies.cypress = versions_1.cypressVersion;
34
46
  }
35
- tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, options.keepExistingVersions));
47
+ tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, options.keepExistingVersions ?? true));
36
48
  return (0, devkit_1.runTasksInSerial)(...tasks);
37
49
  }
38
50
  function addPlugin(tree, graph, updatePackageScripts) {
39
- return (0, add_plugin_1.addPlugin)(tree, graph, '@nx/cypress/plugin', plugin_1.createNodesV2, {
51
+ return (0, internal_1.addPlugin)(tree, graph, '@nx/cypress/plugin', plugin_1.createNodesV2, {
40
52
  targetName: ['e2e', 'cypress:e2e', 'cypress-e2e'],
41
53
  openTargetName: ['open-cypress', 'cypress-open'],
42
54
  componentTestingTargetName: [
@@ -64,6 +76,7 @@ async function cypressInitGenerator(tree, options) {
64
76
  return cypressInitGeneratorInternal(tree, { addPlugin: false, ...options });
65
77
  }
66
78
  async function cypressInitGeneratorInternal(tree, options) {
79
+ (0, assert_supported_cypress_version_1.assertSupportedCypressVersion)(tree);
67
80
  updateProductionFileset(tree);
68
81
  const nxJson = (0, devkit_1.readNxJson)(tree);
69
82
  options.addPlugin ??=
@@ -22,7 +22,7 @@
22
22
  "type": "boolean",
23
23
  "x-priority": "internal",
24
24
  "description": "Keep existing dependencies versions",
25
- "default": false
25
+ "default": true
26
26
  },
27
27
  "updatePackageScripts": {
28
28
  "type": "boolean",
@@ -37,4 +37,3 @@ export declare function updatePluginFile(tree: Tree, projectConfig: ProjectConfi
37
37
  };
38
38
  cypressConfigJson: Record<string, any>;
39
39
  };
40
- //# sourceMappingURL=conversion.util.d.ts.map
@@ -9,8 +9,7 @@ exports.writeNewConfig = writeNewConfig;
9
9
  exports.addConfigToTsConfig = addConfigToTsConfig;
10
10
  exports.updatePluginFile = updatePluginFile;
11
11
  const devkit_1 = require("@nx/devkit");
12
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
13
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
12
+ const internal_1 = require("@nx/js/internal");
14
13
  const path_1 = require("path");
15
14
  let tsModule;
16
15
  let tsquery;
@@ -51,7 +50,7 @@ function createNewCypressConfig(tree, projectConfig, cypressConfigPathJson) {
51
50
  const { modifyObstructiveCode = null, // no longer needed in configs
52
51
  integrationFolder = 'src/e2e', // provide the new defaults if the value isn't present
53
52
  supportFile = 'src/support/e2e.ts', ...restOfConfig } = cypressConfigJson;
54
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, tree);
53
+ const sourceRoot = (0, internal_1.getProjectSourceRoot)(projectConfig, tree);
55
54
  const newIntegrationFolder = tree.exists((0, devkit_1.joinPathFragments)(sourceRoot, 'integration'))
56
55
  ? 'src/e2e'
57
56
  : integrationFolder;
@@ -99,7 +98,7 @@ function createSupportFileImport(oldSupportFilePath, newSupportFilePath, project
99
98
  }
100
99
  function updateProjectPaths(tree, projectConfig, { cypressConfigTs, cypressConfigJson, }) {
101
100
  const { integrationFolder, supportFile } = cypressConfigTs['e2e'];
102
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, tree);
101
+ const sourceRoot = (0, internal_1.getProjectSourceRoot)(projectConfig, tree);
103
102
  const oldIntegrationFolder = (0, devkit_1.joinPathFragments)(projectConfig.root, cypressConfigJson.integrationFolder);
104
103
  const newIntegrationFolder = (0, devkit_1.joinPathFragments)(projectConfig.root, integrationFolder);
105
104
  let newSupportFile;
@@ -165,10 +164,10 @@ function updateProjectPaths(tree, projectConfig, { cypressConfigTs, cypressConfi
165
164
  }
166
165
  function updateImports(tree, filePath, oldImportPath, newImportPath) {
167
166
  if (!tsModule) {
168
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
167
+ tsModule = (0, internal_1.ensureTypescript)();
169
168
  }
170
169
  if (!tsquery) {
171
- (0, ensure_typescript_1.ensureTypescript)();
170
+ (0, internal_1.ensureTypescript)();
172
171
  tsquery = require('@phenomnomnominal/tsquery').tsquery;
173
172
  }
174
173
  const { isCallExpression, isExportDeclaration, isImportDeclaration } = tsModule;
@@ -1,4 +1,3 @@
1
1
  import { Tree } from '@nx/devkit';
2
2
  export declare function migrateCypressProject(tree: Tree): Promise<() => void>;
3
3
  export default migrateCypressProject;
4
- //# sourceMappingURL=migrate-to-cypress-11.d.ts.map
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrateCypressProject = migrateCypressProject;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const versions_1 = require("../../utils/versions");
7
7
  const conversion_util_1 = require("./conversion.util");
8
8
  function migrateCypressExecutorOptions(tree, projectName, target, configuration, previousCypressConfigs) {
@@ -66,10 +66,10 @@ async function migrateCypressProject(tree) {
66
66
  // if we don't have the already migrated configs
67
67
  // it prevents us from being able to rename files for those projects
68
68
  const previousCypressConfigs = new Map();
69
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/cypress:cypress', (currentValue, projectName, target, configuration) => {
69
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/cypress:cypress', (currentValue, projectName, target, configuration) => {
70
70
  migrateCypressExecutorOptions(tree, projectName, target, configuration, previousCypressConfigs);
71
71
  });
72
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/cypress:cypress', (currentValue, projectName, target, configuration) => {
72
+ (0, internal_1.forEachExecutorOptions)(tree, '@nrwl/cypress:cypress', (currentValue, projectName, target, configuration) => {
73
73
  migrateCypressExecutorOptions(tree, projectName, target, configuration, previousCypressConfigs);
74
74
  });
75
75
  (0, devkit_1.updateJson)(tree, 'package.json', (json) => {
@@ -1,3 +1,2 @@
1
1
  import { type Tree } from '@nx/devkit';
2
2
  export default function (tree: Tree): Promise<void>;
3
- //# sourceMappingURL=set-inject-document-domain.d.ts.map