@nx/cypress 21.2.0 → 21.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/cypress",
3
- "version": "21.2.0",
3
+ "version": "21.2.2",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.",
6
6
  "repository": {
@@ -36,9 +36,9 @@
36
36
  "migrations": "./migrations.json"
37
37
  },
38
38
  "dependencies": {
39
- "@nx/devkit": "21.2.0",
40
- "@nx/eslint": "21.2.0",
41
- "@nx/js": "21.2.0",
39
+ "@nx/devkit": "21.2.2",
40
+ "@nx/eslint": "21.2.2",
41
+ "@nx/js": "21.2.2",
42
42
  "@phenomnomnominal/tsquery": "~5.0.1",
43
43
  "detect-port": "^1.5.1",
44
44
  "semver": "^7.6.3",
@@ -32,7 +32,9 @@ function setInjectDocumentDomain(cypressConfig) {
32
32
  }
33
33
  const sourceFile = tsquery_1.tsquery.ast(cypressConfig);
34
34
  let e2eProperty = (0, migrations_1.getObjectProperty)(config, 'e2e');
35
- let componentProperty = (0, migrations_1.getObjectProperty)(config, 'component');
35
+ let hasOtherTopLevelProperties = config.properties.some((p) => ts.isPropertyAssignment(p) &&
36
+ p.name.getText() !== 'e2e' &&
37
+ p.name.getText() !== 'component');
36
38
  let updatedConfig = config;
37
39
  const topLevelExperimentalSkipDomainInjectionProperty = (0, migrations_1.getObjectProperty)(updatedConfig, 'experimentalSkipDomainInjection');
38
40
  const topLevelSkipDomainState = !topLevelExperimentalSkipDomainInjectionProperty
@@ -76,43 +78,9 @@ function setInjectDocumentDomain(cypressConfig) {
76
78
  });
77
79
  }
78
80
  }
79
- let componentSkipDomainState = 'not-set';
80
- if (componentProperty) {
81
- let experimentalSkipDomainInjectionProperty;
82
- let isObjectLiteral = false;
83
- if (ts.isObjectLiteralExpression(componentProperty.initializer)) {
84
- experimentalSkipDomainInjectionProperty = (0, migrations_1.getObjectProperty)(componentProperty.initializer, 'experimentalSkipDomainInjection');
85
- isObjectLiteral = true;
86
- }
87
- if (experimentalSkipDomainInjectionProperty) {
88
- componentSkipDomainState =
89
- !ts.isArrayLiteralExpression(experimentalSkipDomainInjectionProperty.initializer) ||
90
- experimentalSkipDomainInjectionProperty.initializer.elements.length > 0
91
- ? 'skipping'
92
- : 'not-skipping';
93
- }
94
- if (componentSkipDomainState === 'not-set' &&
95
- topLevelSkipDomainState === 'not-set') {
96
- updatedConfig = (0, migrations_1.updateObjectProperty)(updatedConfig, componentProperty, {
97
- newValue: setInjectDocumentDomainInObject(componentProperty.initializer),
98
- });
99
- }
100
- else if (componentSkipDomainState === 'not-skipping') {
101
- updatedConfig = (0, migrations_1.updateObjectProperty)(updatedConfig, componentProperty, {
102
- newValue: replaceExperimentalSkipDomainInjectionInObject(componentProperty.initializer),
103
- });
104
- }
105
- else if (componentSkipDomainState === 'skipping') {
106
- updatedConfig = (0, migrations_1.updateObjectProperty)(updatedConfig, componentProperty, {
107
- newValue: (0, migrations_1.removeObjectProperty)(
108
- // we only determine that it's skipping if it's an object literal
109
- componentProperty.initializer, (0, migrations_1.getObjectProperty)(componentProperty.initializer, 'experimentalSkipDomainInjection')),
110
- });
111
- }
112
- }
113
81
  if (topLevelSkipDomainState === 'not-set' &&
114
82
  !e2eProperty &&
115
- !componentProperty) {
83
+ hasOtherTopLevelProperties) {
116
84
  updatedConfig = setInjectDocumentDomainInObject(updatedConfig);
117
85
  }
118
86
  else if (topLevelSkipDomainState === 'not-skipping') {
@@ -327,7 +327,10 @@ async function buildCypressTargets(configFilePath, projectRoot, options, context
327
327
  }
328
328
  targets[options.openTargetName] = {
329
329
  command: `cypress open`,
330
- options: { cwd: projectRoot },
330
+ options: {
331
+ cwd: projectRoot,
332
+ env: { TS_NODE_COMPILER_OPTIONS: tsNodeCompilerOptions },
333
+ },
331
334
  metadata: {
332
335
  technologies: ['cypress'],
333
336
  description: 'Opens Cypress',