@nx/workspace 19.0.0-beta.2 → 19.0.0-beta.3
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 +4 -4
- package/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ +6 -4
- package/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ +4 -3
- package/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ +6 -5
- package/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ +6 -5
- package/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ +3 -3
- package/src/generators/new/schema.json +1 -1
- package/src/generators/preset/preset.js +13 -13
- package/src/generators/preset/schema.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/workspace",
|
|
3
|
-
"version": "19.0.0-beta.
|
|
3
|
+
"version": "19.0.0-beta.3",
|
|
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": {
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@nx/devkit": "19.0.0-beta.
|
|
64
|
+
"@nx/devkit": "19.0.0-beta.3",
|
|
65
65
|
"chalk": "^4.1.0",
|
|
66
66
|
"enquirer": "~2.3.6",
|
|
67
67
|
"tslib": "^2.3.0",
|
|
68
68
|
"yargs-parser": "21.1.1",
|
|
69
|
-
"nx": "19.0.0-beta.
|
|
70
|
-
"@nrwl/workspace": "19.0.0-beta.
|
|
69
|
+
"nx": "19.0.0-beta.3",
|
|
70
|
+
"@nrwl/workspace": "19.0.0-beta.3"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
@@ -41,14 +41,16 @@ jobs:
|
|
|
41
41
|
echo "##vso[task.setvariable variable=BASE_SHA]$LAST_SHA"
|
|
42
42
|
fi
|
|
43
43
|
|
|
44
|
+
<% if(packageManager == 'pnpm'){ %>
|
|
45
|
+
- script: npm install --prefix=$HOME/.local -g pnpm@8
|
|
46
|
+
displayName: Install PNPM
|
|
47
|
+
|
|
48
|
+
<% } %>
|
|
44
49
|
# Connect your workspace on <%= nxCloudHost %> and uncomment this to enable task distribution.
|
|
45
50
|
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" targets have been requested
|
|
46
51
|
# - script: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
- script: npm install --prefix=$HOME/.local -g pnpm@8
|
|
50
|
-
displayName: Install PNPM
|
|
51
|
-
<% } %>- script: <%= packageManagerInstall %>
|
|
53
|
+
- script: <%= packageManagerInstall %>
|
|
52
54
|
- script: git branch --track main origin/main
|
|
53
55
|
condition: eq(variables['Build.Reason'], 'PullRequest')
|
|
54
56
|
|
package/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__
CHANGED
|
@@ -11,13 +11,14 @@ pipelines:
|
|
|
11
11
|
script:
|
|
12
12
|
- export NX_BRANCH=$BITBUCKET_PR_ID
|
|
13
13
|
|
|
14
|
+
<% if(packageManager == 'pnpm'){ %>
|
|
15
|
+
- npm install --prefix=$HOME/.local -g pnpm@8
|
|
16
|
+
|
|
17
|
+
<% } %>
|
|
14
18
|
# Connect your workspace on <%= nxCloudHost %> and uncomment this to enable task distribution.
|
|
15
19
|
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" targets have been requested
|
|
16
20
|
# - <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
|
|
17
21
|
|
|
18
|
-
<% if(packageManager == 'pnpm'){ %>
|
|
19
|
-
- npm install --prefix=$HOME/.local -g pnpm@8
|
|
20
|
-
<% } %>
|
|
21
22
|
- <%= packageManagerInstall %>
|
|
22
23
|
|
|
23
24
|
- <%= packageManagerPrefix %> nx-cloud record -- nx format:check
|
|
@@ -9,16 +9,17 @@ jobs:
|
|
|
9
9
|
- image: cimg/node:lts-browsers
|
|
10
10
|
steps:
|
|
11
11
|
- checkout
|
|
12
|
+
<% if(packageManager == 'pnpm'){ %>
|
|
13
|
+
- run:
|
|
14
|
+
name: Install PNPM
|
|
15
|
+
command: npm install --prefix=$HOME/.local -g pnpm@8
|
|
16
|
+
<% } %>
|
|
12
17
|
|
|
13
18
|
# Connect your workspace on <%= nxCloudHost %> and uncomment this to enable task distribution.
|
|
14
19
|
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" targets have been requested
|
|
15
20
|
# - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
- run:
|
|
19
|
-
name: Install PNPM
|
|
20
|
-
command: npm install --prefix=$HOME/.local -g pnpm@8
|
|
21
|
-
<% } %>- run: <%= packageManagerInstall %>
|
|
22
|
+
- run: <%= packageManagerInstall %>
|
|
22
23
|
- nx/set-shas:
|
|
23
24
|
main-branch-name: '<%= mainBranch %>'
|
|
24
25
|
|
package/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__
CHANGED
|
@@ -17,16 +17,17 @@ jobs:
|
|
|
17
17
|
- uses: actions/checkout@v4
|
|
18
18
|
with:
|
|
19
19
|
fetch-depth: 0
|
|
20
|
+
<% if(packageManager == 'pnpm'){ %>
|
|
21
|
+
- uses: pnpm/action-setup@v2
|
|
22
|
+
with:
|
|
23
|
+
version: 8
|
|
24
|
+
<% } %>
|
|
20
25
|
|
|
21
26
|
# Connect your workspace on <%= nxCloudHost %> and uncomment this to enable task distribution.
|
|
22
27
|
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" targets have been requested
|
|
23
28
|
# - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
- uses: pnpm/action-setup@v2
|
|
27
|
-
with:
|
|
28
|
-
version: 8
|
|
29
|
-
<% } %># Cache node_modules
|
|
30
|
+
# Cache node_modules
|
|
30
31
|
- uses: actions/setup-node@v3
|
|
31
32
|
with:
|
|
32
33
|
node-version: 20
|
|
@@ -9,13 +9,13 @@ variables:
|
|
|
9
9
|
- main
|
|
10
10
|
- merge_requests
|
|
11
11
|
script:
|
|
12
|
+
<% if(packageManager == 'pnpm'){ %>
|
|
13
|
+
- npm install --prefix=$HOME/.local -g pnpm@8
|
|
14
|
+
<% } %>
|
|
12
15
|
# Connect your workspace on <%= nxCloudHost %> and uncomment this to enable task distribution.
|
|
13
16
|
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" targets have been requested
|
|
14
17
|
# - <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>"
|
|
15
18
|
|
|
16
|
-
<% if(packageManager == 'pnpm'){ %>
|
|
17
|
-
- npm install --prefix=$HOME/.local -g pnpm@8
|
|
18
|
-
<% } %>
|
|
19
19
|
- <%= packageManagerInstall %>
|
|
20
20
|
- NX_HEAD=$CI_COMMIT_SHA
|
|
21
21
|
- NX_BASE=${CI_MERGE_REQUEST_DIFF_BASE_SHA:-$CI_COMMIT_BEFORE_SHA}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"e2eTestRunner": {
|
|
77
77
|
"description": "The tool to use for running e2e tests.",
|
|
78
78
|
"type": "string",
|
|
79
|
-
"enum": ["
|
|
79
|
+
"enum": ["playwright", "cypress", "jest", "detox", "none"]
|
|
80
80
|
},
|
|
81
81
|
"ssr": {
|
|
82
82
|
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",
|
|
@@ -33,7 +33,7 @@ async function createPreset(tree, options) {
|
|
|
33
33
|
linter: options.linter,
|
|
34
34
|
standalone: options.standaloneApi,
|
|
35
35
|
routing: options.routing,
|
|
36
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
36
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
37
37
|
bundler: options.bundler,
|
|
38
38
|
ssr: options.ssr,
|
|
39
39
|
prefix: options.prefix,
|
|
@@ -50,7 +50,7 @@ async function createPreset(tree, options) {
|
|
|
50
50
|
routing: options.routing,
|
|
51
51
|
rootProject: true,
|
|
52
52
|
standalone: options.standaloneApi,
|
|
53
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
53
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
54
54
|
bundler: options.bundler,
|
|
55
55
|
ssr: options.ssr,
|
|
56
56
|
prefix: options.prefix,
|
|
@@ -66,7 +66,7 @@ async function createPreset(tree, options) {
|
|
|
66
66
|
style: options.style,
|
|
67
67
|
linter: options.linter,
|
|
68
68
|
bundler: options.bundler ?? 'webpack',
|
|
69
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
69
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
70
70
|
addPlugin,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
@@ -81,7 +81,7 @@ async function createPreset(tree, options) {
|
|
|
81
81
|
linter: options.linter,
|
|
82
82
|
rootProject: true,
|
|
83
83
|
bundler: options.bundler ?? 'vite',
|
|
84
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
84
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
85
85
|
unitTestRunner: options.bundler === 'vite' ? 'vitest' : 'jest',
|
|
86
86
|
addPlugin,
|
|
87
87
|
});
|
|
@@ -94,7 +94,7 @@ async function createPreset(tree, options) {
|
|
|
94
94
|
directory: (0, path_1.join)('apps', options.name),
|
|
95
95
|
projectNameAndRootFormat: 'as-provided',
|
|
96
96
|
linter: options.linter,
|
|
97
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
97
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
98
98
|
unitTestRunner: 'vitest',
|
|
99
99
|
addPlugin,
|
|
100
100
|
});
|
|
@@ -107,7 +107,7 @@ async function createPreset(tree, options) {
|
|
|
107
107
|
directory: '.',
|
|
108
108
|
projectNameAndRootFormat: 'as-provided',
|
|
109
109
|
linter: options.linter,
|
|
110
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
110
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
111
111
|
rootProject: true,
|
|
112
112
|
unitTestRunner: 'vitest',
|
|
113
113
|
addPlugin,
|
|
@@ -122,7 +122,7 @@ async function createPreset(tree, options) {
|
|
|
122
122
|
projectNameAndRootFormat: 'as-provided',
|
|
123
123
|
style: options.style,
|
|
124
124
|
linter: options.linter,
|
|
125
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
125
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
126
126
|
addPlugin,
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -136,7 +136,7 @@ async function createPreset(tree, options) {
|
|
|
136
136
|
style: options.style,
|
|
137
137
|
linter: options.linter,
|
|
138
138
|
rootProject: true,
|
|
139
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
139
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
140
140
|
unitTestRunner: 'vitest',
|
|
141
141
|
addPlugin,
|
|
142
142
|
});
|
|
@@ -150,7 +150,7 @@ async function createPreset(tree, options) {
|
|
|
150
150
|
projectNameAndRootFormat: 'as-provided',
|
|
151
151
|
style: options.style,
|
|
152
152
|
linter: options.linter,
|
|
153
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
153
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
154
154
|
addPlugin,
|
|
155
155
|
});
|
|
156
156
|
}
|
|
@@ -164,7 +164,7 @@ async function createPreset(tree, options) {
|
|
|
164
164
|
style: options.style,
|
|
165
165
|
linter: options.linter,
|
|
166
166
|
rootProject: true,
|
|
167
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
167
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
168
168
|
unitTestRunner: 'vitest',
|
|
169
169
|
addPlugin,
|
|
170
170
|
});
|
|
@@ -180,7 +180,7 @@ async function createPreset(tree, options) {
|
|
|
180
180
|
linter: options.linter,
|
|
181
181
|
appDir: options.nextAppDir,
|
|
182
182
|
src: options.nextSrcDir,
|
|
183
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
183
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
184
184
|
addPlugin,
|
|
185
185
|
});
|
|
186
186
|
}
|
|
@@ -195,7 +195,7 @@ async function createPreset(tree, options) {
|
|
|
195
195
|
linter: options.linter,
|
|
196
196
|
appDir: options.nextAppDir,
|
|
197
197
|
src: options.nextSrcDir,
|
|
198
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
198
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
199
199
|
rootProject: true,
|
|
200
200
|
addPlugin,
|
|
201
201
|
});
|
|
@@ -210,7 +210,7 @@ async function createPreset(tree, options) {
|
|
|
210
210
|
style: options.style,
|
|
211
211
|
linter: options.linter,
|
|
212
212
|
bundler: 'vite',
|
|
213
|
-
e2eTestRunner: options.e2eTestRunner ?? '
|
|
213
|
+
e2eTestRunner: options.e2eTestRunner ?? 'playwright',
|
|
214
214
|
addPlugin,
|
|
215
215
|
});
|
|
216
216
|
}
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"e2eTestRunner": {
|
|
94
94
|
"description": "The tool to use for running e2e tests.",
|
|
95
95
|
"type": "string",
|
|
96
|
-
"enum": ["
|
|
96
|
+
"enum": ["playwright", ",cypress", "jest", "detox", "none"]
|
|
97
97
|
},
|
|
98
98
|
"ssr": {
|
|
99
99
|
"description": "Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application.",
|