@nx/workspace 23.0.0-beta.20 → 23.0.0-beta.21
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.
|
@@ -146,7 +146,7 @@ async function generateWorkspaceFiles(tree, options) {
|
|
|
146
146
|
const [packageMajor] = packageManagerVersion.split('.');
|
|
147
147
|
if (options.packageManager === 'pnpm' && +packageMajor >= 7) {
|
|
148
148
|
if ((0, semver_1.gte)(packageManagerVersion, '10.6.0')) {
|
|
149
|
-
addPnpmSettings(tree, options);
|
|
149
|
+
addPnpmSettings(tree, options, packageManagerVersion);
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
152
|
createNpmrc(tree, options);
|
|
@@ -269,10 +269,11 @@ async function createReadme(tree, { name, appName, directory, preset, nxCloud, w
|
|
|
269
269
|
nxCloudOnboardingUrl,
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
`
|
|
272
|
+
function addPnpmSettings(tree, options, packageManagerVersion) {
|
|
273
|
+
const buildAllowlist = (0, semver_1.gte)(packageManagerVersion, '11.0.0')
|
|
274
|
+
? `allowBuilds:\n nx: true`
|
|
275
|
+
: `onlyBuiltDependencies:\n - nx`;
|
|
276
|
+
tree.write((0, path_1.join)(options.directory, 'pnpm-workspace.yaml'), `autoInstallPeers: true\n${buildAllowlist}\n`);
|
|
276
277
|
}
|
|
277
278
|
function createNpmrc(tree, options) {
|
|
278
279
|
tree.write((0, path_1.join)(options.directory, '.npmrc'), 'strict-peer-dependencies=false\nauto-install-peers=true\n');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/workspace",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -85,11 +85,11 @@
|
|
|
85
85
|
"semver": "^7.6.3",
|
|
86
86
|
"tslib": "^2.3.0",
|
|
87
87
|
"yargs-parser": "21.1.1",
|
|
88
|
-
"nx": "23.0.0-beta.
|
|
89
|
-
"@nx/devkit": "23.0.0-beta.
|
|
88
|
+
"nx": "23.0.0-beta.21",
|
|
89
|
+
"@nx/devkit": "23.0.0-beta.21"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"nx": "23.0.0-beta.
|
|
92
|
+
"nx": "23.0.0-beta.21"
|
|
93
93
|
},
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"access": "public"
|