@nrwl/workspace 15.4.5 → 15.4.7-beta.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [15.4.
|
|
6
|
+
## [15.4.7-beta.1](https://github.com/nrwl/nx/compare/15.4.7...15.4.7-beta.1) (2023-01-12)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/workspace
|
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017-
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
'Software'), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2023 Narwhal Technologies Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/workspace",
|
|
3
|
-
"version": "15.4.
|
|
3
|
+
"version": "15.4.7-beta.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": {
|
|
@@ -33,32 +33,32 @@
|
|
|
33
33
|
"requirements": {},
|
|
34
34
|
"migrations": "./migrations.json",
|
|
35
35
|
"packageGroup": {
|
|
36
|
-
"@nrwl/angular": "15.4.
|
|
37
|
-
"@nrwl/cli": "15.4.
|
|
38
|
-
"@nrwl/cypress": "15.4.
|
|
39
|
-
"@nrwl/detox": "15.4.
|
|
40
|
-
"@nrwl/devkit": "15.4.
|
|
41
|
-
"@nrwl/esbuild": "15.4.
|
|
42
|
-
"@nrwl/eslint-plugin-nx": "15.4.
|
|
43
|
-
"@nrwl/expo": "15.4.
|
|
44
|
-
"@nrwl/express": "15.4.
|
|
45
|
-
"@nrwl/jest": "15.4.
|
|
46
|
-
"@nrwl/js": "15.4.
|
|
47
|
-
"@nrwl/linter": "15.4.
|
|
48
|
-
"@nrwl/nest": "15.4.
|
|
49
|
-
"@nrwl/next": "15.4.
|
|
50
|
-
"@nrwl/node": "15.4.
|
|
36
|
+
"@nrwl/angular": "15.4.7-beta.1",
|
|
37
|
+
"@nrwl/cli": "15.4.7-beta.1",
|
|
38
|
+
"@nrwl/cypress": "15.4.7-beta.1",
|
|
39
|
+
"@nrwl/detox": "15.4.7-beta.1",
|
|
40
|
+
"@nrwl/devkit": "15.4.7-beta.1",
|
|
41
|
+
"@nrwl/esbuild": "15.4.7-beta.1",
|
|
42
|
+
"@nrwl/eslint-plugin-nx": "15.4.7-beta.1",
|
|
43
|
+
"@nrwl/expo": "15.4.7-beta.1",
|
|
44
|
+
"@nrwl/express": "15.4.7-beta.1",
|
|
45
|
+
"@nrwl/jest": "15.4.7-beta.1",
|
|
46
|
+
"@nrwl/js": "15.4.7-beta.1",
|
|
47
|
+
"@nrwl/linter": "15.4.7-beta.1",
|
|
48
|
+
"@nrwl/nest": "15.4.7-beta.1",
|
|
49
|
+
"@nrwl/next": "15.4.7-beta.1",
|
|
50
|
+
"@nrwl/node": "15.4.7-beta.1",
|
|
51
51
|
"@nrwl/nx-cloud": "latest",
|
|
52
|
-
"@nrwl/nx-plugin": "15.4.
|
|
53
|
-
"@nrwl/react-native": "15.4.
|
|
54
|
-
"@nrwl/react": "15.4.
|
|
55
|
-
"@nrwl/rollup": "15.4.
|
|
56
|
-
"@nrwl/storybook": "15.4.
|
|
57
|
-
"@nrwl/tao": "15.4.
|
|
58
|
-
"@nrwl/vite": "15.4.
|
|
59
|
-
"@nrwl/web": "15.4.
|
|
60
|
-
"@nrwl/webpack": "15.4.
|
|
61
|
-
"nx": "15.4.
|
|
52
|
+
"@nrwl/nx-plugin": "15.4.7-beta.1",
|
|
53
|
+
"@nrwl/react-native": "15.4.7-beta.1",
|
|
54
|
+
"@nrwl/react": "15.4.7-beta.1",
|
|
55
|
+
"@nrwl/rollup": "15.4.7-beta.1",
|
|
56
|
+
"@nrwl/storybook": "15.4.7-beta.1",
|
|
57
|
+
"@nrwl/tao": "15.4.7-beta.1",
|
|
58
|
+
"@nrwl/vite": "15.4.7-beta.1",
|
|
59
|
+
"@nrwl/web": "15.4.7-beta.1",
|
|
60
|
+
"@nrwl/webpack": "15.4.7-beta.1",
|
|
61
|
+
"nx": "15.4.7-beta.1"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@nrwl/devkit": "15.4.
|
|
74
|
-
"@nrwl/linter": "15.4.
|
|
73
|
+
"@nrwl/devkit": "15.4.7-beta.1",
|
|
74
|
+
"@nrwl/linter": "15.4.7-beta.1",
|
|
75
75
|
"@parcel/watcher": "2.0.4",
|
|
76
76
|
"chalk": "4.1.0",
|
|
77
77
|
"chokidar": "^3.5.1",
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
"enquirer": "~2.3.6",
|
|
82
82
|
"figures": "3.2.0",
|
|
83
83
|
"flat": "^5.0.2",
|
|
84
|
-
"fs-extra": "^
|
|
84
|
+
"fs-extra": "^11.1.0",
|
|
85
85
|
"glob": "7.1.4",
|
|
86
86
|
"ignore": "^5.0.4",
|
|
87
87
|
"jsonc-parser": "3.2.0",
|
|
88
88
|
"minimatch": "3.0.5",
|
|
89
89
|
"npm-run-path": "^4.0.1",
|
|
90
|
-
"nx": "15.4.
|
|
90
|
+
"nx": "15.4.7-beta.1",
|
|
91
91
|
"open": "^8.4.0",
|
|
92
92
|
"rxjs": "^6.5.4",
|
|
93
93
|
"semver": "7.3.4",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"access": "public"
|
|
101
101
|
},
|
|
102
102
|
"types": "./index.d.ts",
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "ba3fd62b7e4835cf7c53fad13a4b630e3127aa86"
|
|
104
104
|
}
|
|
@@ -4,7 +4,6 @@ exports.generateWorkspaceFiles = exports.DEFAULT_NRWL_PRETTIER_CONFIG = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const versions_1 = require("../../utils/versions");
|
|
7
|
-
const fs_1 = require("fs");
|
|
8
7
|
const path_1 = require("path");
|
|
9
8
|
const presets_1 = require("../utils/presets");
|
|
10
9
|
const default_base_1 = require("../../utilities/default-base");
|
|
@@ -21,9 +20,6 @@ function generateWorkspaceFiles(tree, options) {
|
|
|
21
20
|
createFiles(tree, options);
|
|
22
21
|
createNxJson(tree, options);
|
|
23
22
|
createPrettierrc(tree, options);
|
|
24
|
-
if (options.preset === presets_1.Preset.AngularMonorepo) {
|
|
25
|
-
decorateAngularClI(tree, options);
|
|
26
|
-
}
|
|
27
23
|
const [packageMajor] = (0, devkit_1.getPackageManagerVersion)(options.packageManager).split('.');
|
|
28
24
|
if (options.packageManager === 'pnpm' && +packageMajor >= 7) {
|
|
29
25
|
createNpmrc(tree, options);
|
|
@@ -39,10 +35,6 @@ function generateWorkspaceFiles(tree, options) {
|
|
|
39
35
|
});
|
|
40
36
|
}
|
|
41
37
|
exports.generateWorkspaceFiles = generateWorkspaceFiles;
|
|
42
|
-
function decorateAngularClI(tree, options) {
|
|
43
|
-
const decorateCli = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '..', 'utils', 'decorate-angular-cli.js__tmpl__')).toString();
|
|
44
|
-
tree.write((0, path_1.join)(options.directory, 'decorate-angular-cli.js'), decorateCli);
|
|
45
|
-
}
|
|
46
38
|
function setPresetProperty(tree, options) {
|
|
47
39
|
(0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'nx.json'), (json) => {
|
|
48
40
|
if (options.preset === presets_1.Preset.Core || options.preset === presets_1.Preset.NPM) {
|
|
@@ -140,15 +132,6 @@ function createYarnrcYml(tree, options) {
|
|
|
140
132
|
tree.write((0, path_1.join)(options.directory, '.yarnrc.yml'), 'nodeLinker: node-modules\n');
|
|
141
133
|
}
|
|
142
134
|
function addNpmScripts(tree, options) {
|
|
143
|
-
if (options.preset === presets_1.Preset.AngularMonorepo) {
|
|
144
|
-
(0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'package.json'), (json) => {
|
|
145
|
-
Object.assign(json.scripts, {
|
|
146
|
-
ng: 'nx',
|
|
147
|
-
postinstall: 'node ./decorate-angular-cli.js',
|
|
148
|
-
});
|
|
149
|
-
return json;
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
135
|
if (options.preset === presets_1.Preset.AngularStandalone ||
|
|
153
136
|
options.preset === presets_1.Preset.ReactStandalone) {
|
|
154
137
|
(0, devkit_1.updateJson)(tree, (0, path_1.join)(options.directory, 'package.json'), (json) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-workspace-files.js","sourceRoot":"","sources":["../../../../../../packages/workspace/src/generators/new/generate-workspace-files.ts"],"names":[],"mappings":";;;;AAAA,yCAUsB;AACtB,mDAK8B;AAC9B
|
|
1
|
+
{"version":3,"file":"generate-workspace-files.js","sourceRoot":"","sources":["../../../../../../packages/workspace/src/generators/new/generate-workspace-files.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,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QAC9B,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAyB;IACjD,IAAI,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,IAAA,gCAAiB,GAAE,CAAC;IAC7D,qCACE,QAAQ,EAAE,OAAO,CAAC,IAAI,IACnB,OAAO,KACV,WAAW,IACX;AACJ,CAAC;AAED,SAAS,4BAA4B,CAAC,IAAU,EAAE,OAAyB;IACzE,IAAI,OAAO,CAAC,MAAM,KAAK,gBAAM,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,KAAK,gBAAM,CAAC,IAAI,EAAE;QACnE,IAAI,OAAO,CAAC,cAAc,KAAK,MAAM,EAAE;YACrC,IAAI,CAAC,KAAK,CACR,IAAA,WAAI,EAAC,OAAO,CAAC,SAAS,EAAE,qBAAqB,CAAC,EAC9C;;CAEP,CACM,CAAC;SACH;aAAM;YACL,IAAA,mBAAU,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjE,IAAI,CAAC,UAAU,GAAG,CAAC,YAAY,CAAC,CAAC;gBACjC,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;SACJ;KACF;AACH,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file decorates the Angular CLI with the Nx CLI to enable features such as computation caching
|
|
3
|
-
* and faster execution of tasks.
|
|
4
|
-
*
|
|
5
|
-
* It does this by:
|
|
6
|
-
*
|
|
7
|
-
* - Patching the Angular CLI to warn you in case you accidentally use the undecorated ng command.
|
|
8
|
-
* - Symlinking the ng to nx command, so all commands run through the Nx CLI
|
|
9
|
-
* - Updating the package.json postinstall script to give you control over this script
|
|
10
|
-
*
|
|
11
|
-
* The Nx CLI decorates the Angular CLI, so the Nx CLI is fully compatible with it.
|
|
12
|
-
* Every command you run should work the same when using the Nx CLI, except faster.
|
|
13
|
-
*
|
|
14
|
-
* Because of symlinking you can still type `ng build/test/lint` in the terminal. The ng command, in this case,
|
|
15
|
-
* will point to nx, which will perform optimizations before running your task.
|
|
16
|
-
*
|
|
17
|
-
* To opt out of this patch:
|
|
18
|
-
* - Replace occurrences of nx with ng in your package.json
|
|
19
|
-
* - Remove the script from your postinstall script in your package.json
|
|
20
|
-
* - Delete and reinstall your node_modules
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
const fs = require('fs');
|
|
24
|
-
const os = require('os');
|
|
25
|
-
const cp = require('child_process');
|
|
26
|
-
const isWindows = os.platform() === 'win32';
|
|
27
|
-
let output;
|
|
28
|
-
try {
|
|
29
|
-
output = require('@nrwl/workspace').output;
|
|
30
|
-
} catch (e) {
|
|
31
|
-
console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.');
|
|
32
|
-
process.exit(0);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Symlink of ng to nx, so you can keep using `ng build/test/lint` and still
|
|
37
|
-
* invoke the Nx CLI and get the benefits of computation caching.
|
|
38
|
-
*/
|
|
39
|
-
function symlinkNgCLItoNxCLI() {
|
|
40
|
-
try {
|
|
41
|
-
const ngPath = './node_modules/.bin/ng';
|
|
42
|
-
const nxPath = './node_modules/.bin/nx';
|
|
43
|
-
if (isWindows) {
|
|
44
|
-
/**
|
|
45
|
-
* This is the most reliable way to create symlink-like behavior on Windows.
|
|
46
|
-
* Such that it works in all shells and works with npx.
|
|
47
|
-
*/
|
|
48
|
-
['', '.cmd', '.ps1'].forEach(ext => {
|
|
49
|
-
if (fs.existsSync(nxPath + ext)) fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
|
|
50
|
-
});
|
|
51
|
-
} else {
|
|
52
|
-
// If unix-based, symlink
|
|
53
|
-
cp.execSync(`ln -sf ./nx ${ngPath}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
catch(e) {
|
|
57
|
-
output.error({ title: 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e.message });
|
|
58
|
-
throw e;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
symlinkNgCLItoNxCLI();
|
|
64
|
-
require('nx/src/adapter/decorate-cli').decorateCli();
|
|
65
|
-
output.log({ title: 'Angular CLI has been decorated to enable computation caching.' });
|
|
66
|
-
} catch(e) {
|
|
67
|
-
output.error({ title: 'Decoration of the Angular CLI did not complete successfully' });
|
|
68
|
-
}
|