@nx/workspace 20.5.0-rc.0 → 20.5.0-rc.1
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 +3 -3
- package/src/generators/ci-workflow/ci-workflow.js +3 -0
- package/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ +1 -1
- package/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ +2 -2
- package/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ +1 -1
- package/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ +1 -1
- package/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/workspace",
|
3
|
-
"version": "20.5.0-rc.
|
3
|
+
"version": "20.5.0-rc.1",
|
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.5.0-rc.
|
41
|
+
"@nx/devkit": "20.5.0-rc.1",
|
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.5.0-rc.
|
46
|
+
"nx": "20.5.0-rc.1"
|
47
47
|
},
|
48
48
|
"publishConfig": {
|
49
49
|
"access": "public"
|
@@ -5,6 +5,7 @@ const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const default_base_1 = require("../../utilities/default-base");
|
6
6
|
const path_1 = require("path");
|
7
7
|
const nx_cloud_utils_1 = require("nx/src/utils/nx-cloud-utils");
|
8
|
+
const ts_solution_setup_1 = require("../../utilities/typescript/ts-solution-setup");
|
8
9
|
async function ciWorkflowGenerator(tree, schema) {
|
9
10
|
const ci = schema.ci;
|
10
11
|
const options = normalizeOptions(schema, tree);
|
@@ -35,6 +36,7 @@ function normalizeOptions(options, tree) {
|
|
35
36
|
const hasCypress = allDependencies['@nx/cypress'];
|
36
37
|
const hasPlaywright = allDependencies['@nx/playwright'];
|
37
38
|
const hasE2E = hasCypress || hasPlaywright;
|
39
|
+
const hasTypecheck = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
|
38
40
|
const connectedToCloud = (0, nx_cloud_utils_1.isNxCloudUsed)((0, devkit_1.readJson)(tree, 'nx.json'));
|
39
41
|
return {
|
40
42
|
workflowName,
|
@@ -47,6 +49,7 @@ function normalizeOptions(options, tree) {
|
|
47
49
|
hasCypress,
|
48
50
|
hasE2E,
|
49
51
|
hasPlaywright,
|
52
|
+
hasTypecheck,
|
50
53
|
nxCloudHost,
|
51
54
|
tmpl: '',
|
52
55
|
connectedToCloud,
|
@@ -68,4 +68,4 @@ jobs:
|
|
68
68
|
# - script: <%= packageManagerPrefix %> nx-cloud record -- echo Hello World
|
69
69
|
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
|
70
70
|
# When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
|
71
|
-
- script: <%= packageManagerPrefix %> nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build<% if(hasE2E){ %> e2e<% } %>
|
71
|
+
- script: <%= packageManagerPrefix %> nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build<% if(hasTypecheck){ %> typecheck<% } %><% if(hasE2E){ %> e2e<% } %>
|
package/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__
CHANGED
@@ -33,7 +33,7 @@ pipelines:
|
|
33
33
|
# <%= packageManagerPrefix %> nx-cloud record -- echo Hello World
|
34
34
|
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
|
35
35
|
# When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
|
36
|
-
- <%= packageManagerPrefix %> nx affected --base=origin/<%= mainBranch %> -t lint test build<% if(hasE2E){ %> e2e<% } %>
|
36
|
+
- <%= packageManagerPrefix %> nx affected --base=origin/<%= mainBranch %> -t lint test build<% if(hasTypecheck){ %> typecheck<% } %><% if(hasE2E){ %> e2e<% } %>
|
37
37
|
|
38
38
|
branches:
|
39
39
|
main:
|
@@ -59,4 +59,4 @@ pipelines:
|
|
59
59
|
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
60
60
|
# - <%= packageManagerPrefix %> nx-cloud record -- echo Hello World
|
61
61
|
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
|
62
|
-
- <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e-ci<% } %> --base=HEAD~1
|
62
|
+
- <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasTypecheck){ %> typecheck<% } %><% if(hasE2E){ %> e2e-ci<% } %> --base=HEAD~1
|
@@ -37,7 +37,7 @@ jobs:
|
|
37
37
|
# - run: <%= packageManagerPrefix %> nx-cloud record -- echo Hello World
|
38
38
|
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
|
39
39
|
# When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
|
40
|
-
- run: <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e<% } %>
|
40
|
+
- run: <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasTypecheck){ %> typecheck<% } %><% if(hasE2E){ %> e2e<% } %>
|
41
41
|
|
42
42
|
workflows:
|
43
43
|
version: 2
|
package/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__
CHANGED
@@ -50,4 +50,4 @@ jobs:
|
|
50
50
|
# - run: <%= packageManagerPrefix %> nx-cloud record -- echo Hello World
|
51
51
|
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
|
52
52
|
# When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
|
53
|
-
- run: <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e<% } %>
|
53
|
+
- run: <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasTypecheck){ %> typecheck<% } %><% if(hasE2E){ %> e2e<% } %>
|
@@ -31,4 +31,4 @@ variables:
|
|
31
31
|
# - <%= packageManagerPrefix %> nx-cloud record -- echo Hello World
|
32
32
|
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
|
33
33
|
# When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
|
34
|
-
- <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e<% } %>
|
34
|
+
- <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasTypecheck){ %> typecheck<% } %><% if(hasE2E){ %> e2e<% } %>
|