@nx/workspace 20.1.0-canary.20241023-12cbfc3 → 20.1.0-canary.20241024-0bea5b2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/workspace",
3
- "version": "20.1.0-canary.20241023-12cbfc3",
3
+ "version": "20.1.0-canary.20241024-0bea5b2",
4
4
  "private": false,
5
5
  "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.",
6
6
  "repository": {
@@ -38,12 +38,12 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@nx/devkit": "20.1.0-canary.20241023-12cbfc3",
41
+ "@nx/devkit": "20.1.0-canary.20241024-0bea5b2",
42
42
  "chalk": "^4.1.0",
43
43
  "enquirer": "~2.3.6",
44
44
  "tslib": "^2.3.0",
45
45
  "yargs-parser": "21.1.1",
46
- "nx": "20.1.0-canary.20241023-12cbfc3"
46
+ "nx": "20.1.0-canary.20241024-0bea5b2"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -32,7 +32,9 @@ function normalizeOptions(options, tree) {
32
32
  ...packageJson.dependencies,
33
33
  ...packageJson.devDependencies,
34
34
  };
35
- const hasE2E = allDependencies['@nx/cypress'] || allDependencies['@nx/playwright'];
35
+ const hasCypress = allDependencies['@nx/cypress'];
36
+ const hasPlaywright = allDependencies['@nx/playwright'];
37
+ const hasE2E = hasCypress || hasPlaywright;
36
38
  const connectedToCloud = (0, nx_cloud_utils_1.isNxCloudUsed)((0, devkit_1.readJson)(tree, 'nx.json'));
37
39
  return {
38
40
  workflowName,
@@ -42,7 +44,9 @@ function normalizeOptions(options, tree) {
42
44
  packageManagerPrefix,
43
45
  packageManagerPreInstallPrefix,
44
46
  mainBranch: (0, default_base_1.deduceDefaultBase)(),
47
+ hasCypress,
45
48
  hasE2E,
49
+ hasPlaywright,
46
50
  nxCloudHost,
47
51
  tmpl: '',
48
52
  connectedToCloud,
@@ -55,11 +55,12 @@ jobs:
55
55
  # This enables task distribution via Nx Cloud
56
56
  # Run this command as early as possible, before dependencies are installed
57
57
  # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
58
- <% if (connectedToCloud) { %>- script: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
59
- <% } else { %># Connect your workspace by running "nx connect" and uncomment this
58
+ <% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
60
59
  # - script: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
61
- <% } %>
62
- - script: <%= packageManagerInstall %>
60
+
61
+ - script: <%= packageManagerInstall %><% if(hasCypress){ %>
62
+ - script: <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
63
+ - script: <%= packageManagerPrefix %> playwright install<% } %>
63
64
  - script: git branch --track <%= mainBranch %> origin/<%= mainBranch %>
64
65
  condition: eq(variables['Build.Reason'], 'PullRequest')
65
66
 
@@ -22,11 +22,12 @@ pipelines:
22
22
  # This enables task distribution via Nx Cloud
23
23
  # Run this command as early as possible, before dependencies are installed
24
24
  # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
25
- <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
26
- <% } else { %># Connect your workspace by running "nx connect" and uncomment this
25
+ <% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
27
26
  # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
28
- <% } %>
29
- - <%= packageManagerInstall %>
27
+
28
+ - <%= packageManagerInstall %><% if(hasCypress){ %>
29
+ - <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
30
+ - <%= packageManagerPrefix %> playwright install<% } %>
30
31
 
31
32
  # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
32
33
  # <%= packageManagerPrefix %> nx-cloud record -- echo Hello World
@@ -24,11 +24,12 @@ jobs:
24
24
  # This enables task distribution via Nx Cloud
25
25
  # Run this command as early as possible, before dependencies are installed
26
26
  # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
27
- <% if (connectedToCloud) { %>- run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
28
- <% } else { %># Connect your workspace by running "nx connect" and uncomment this
27
+ <% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
29
28
  # - run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
30
- <% } %>
31
- - run: <%= packageManagerInstall %>
29
+
30
+ - run: <%= packageManagerInstall %><% if(hasCypress){ %>
31
+ - run: <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
32
+ - run: <%= packageManagerPrefix %> playwright install<% } %>
32
33
  - nx/set-shas:
33
34
  main-branch-name: '<%= mainBranch %>'
34
35
 
@@ -31,10 +31,9 @@ jobs:
31
31
  # This enables task distribution via Nx Cloud
32
32
  # Run this command as early as possible, before dependencies are installed
33
33
  # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
34
- <% if (connectedToCloud) { %>- run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
35
- <% } else { %># Connect your workspace by running "nx connect" and uncomment this
34
+ <% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
36
35
  # - run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
37
- <% } %>
36
+
38
37
  <% if(packageManager != 'bun'){ %>
39
38
  # Cache node_modules
40
39
  - uses: actions/setup-node@v4
@@ -42,7 +41,9 @@ jobs:
42
41
  node-version: 20
43
42
  cache: '<%= packageManager %>'
44
43
  <% } %>
45
- - run: <%= packageManagerInstall %>
44
+ - run: <%= packageManagerInstall %><% if(hasCypress){ %>
45
+ - run: <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
46
+ - run: <%= packageManagerPrefix %> playwright install<% } %>
46
47
  - uses: nrwl/nx-set-shas@v4
47
48
 
48
49
  # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
@@ -18,11 +18,12 @@ variables:
18
18
  # This enables task distribution via Nx Cloud
19
19
  # Run this command as early as possible, before dependencies are installed
20
20
  # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
21
- <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
22
- <% } else { %># Connect your workspace by running "nx connect" and uncomment this
21
+ <% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
23
22
  # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
24
- <% } %>
25
- - <%= packageManagerInstall %>
23
+
24
+ - <%= packageManagerInstall %><% if(hasCypress){ %>
25
+ - <%= packageManagerPrefix %> cypress install<% } %><% if(hasPlaywright){ %>
26
+ - <%= packageManagerPrefix %> playwright install<% } %>
26
27
  - NX_HEAD=$CI_COMMIT_SHA
27
28
  - NX_BASE=${CI_MERGE_REQUEST_DIFF_BASE_SHA:-$CI_COMMIT_BEFORE_SHA}
28
29