@nrwl/workspace 13.4.5-beta.7 → 13.5.0-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/README.md +20 -88
- package/package.json +5 -5
- package/src/command-line/daemon.js +7 -3
- package/src/command-line/daemon.js.map +1 -1
- package/src/core/dep-graph/main.esm.js +1 -1
- package/src/core/file-map-utils.js +0 -1
- package/src/core/file-map-utils.js.map +1 -1
- package/src/core/file-utils.d.ts +1 -1
- package/src/core/file-utils.js +2 -2
- package/src/core/file-utils.js.map +1 -1
- package/src/core/hasher/git-based-file-hasher.js +2 -2
- package/src/core/hasher/git-based-file-hasher.js.map +1 -1
- package/src/core/hasher/node-based-file-hasher.d.ts +1 -1
- package/src/core/hasher/node-based-file-hasher.js +2 -2
- package/src/core/hasher/node-based-file-hasher.js.map +1 -1
- package/src/core/project-graph/build-dependencies/build-explicit-typescript-and-package-json-dependencies.d.ts +2 -2
- package/src/core/project-graph/build-dependencies/build-explicit-typescript-and-package-json-dependencies.js.map +1 -1
- package/src/core/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +2 -2
- package/src/core/project-graph/build-dependencies/explicit-package-json-dependencies.js +2 -0
- package/src/core/project-graph/build-dependencies/explicit-package-json-dependencies.js.map +1 -1
- package/src/core/project-graph/build-dependencies/explicit-project-dependencies.d.ts +2 -2
- package/src/core/project-graph/build-dependencies/explicit-project-dependencies.js +1 -0
- package/src/core/project-graph/build-dependencies/explicit-project-dependencies.js.map +1 -1
- package/src/core/project-graph/build-dependencies/typescript-import-locator.d.ts +2 -1
- package/src/core/project-graph/build-dependencies/typescript-import-locator.js +5 -1
- package/src/core/project-graph/build-dependencies/typescript-import-locator.js.map +1 -1
- package/src/core/project-graph/build-project-graph.js +2 -2
- package/src/core/project-graph/build-project-graph.js.map +1 -1
- package/src/core/project-graph/daemon/client/client.js +5 -3
- package/src/core/project-graph/daemon/client/client.js.map +1 -1
- package/src/core/project-graph/daemon/server/server.js.map +1 -1
- package/src/core/project-graph/daemon/server/start.js +5 -2
- package/src/core/project-graph/daemon/server/start.js.map +1 -1
- package/src/core/project-graph/daemon/server/stop.js +5 -2
- package/src/core/project-graph/daemon/server/stop.js.map +1 -1
- package/src/generators/init/files/prettier/__dot__prettierignore +1 -0
- package/src/generators/init/init.js +5 -1
- package/src/generators/init/init.js.map +1 -1
- package/src/tasks-runner/default-tasks-runner.d.ts +1 -1
- package/src/tasks-runner/forked-process-task-runner.js +6 -6
- package/src/tasks-runner/forked-process-task-runner.js.map +1 -1
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +22 -0
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +334 -0
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js.map +1 -0
- package/src/tasks-runner/{empty-terminal-output-life-cycle.d.ts → life-cycles/empty-terminal-output-life-cycle.d.ts} +2 -2
- package/src/tasks-runner/{empty-terminal-output-life-cycle.js → life-cycles/empty-terminal-output-life-cycle.js} +3 -3
- package/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js.map +1 -0
- package/src/tasks-runner/{life-cycle.d.ts → life-cycles/life-cycle.d.ts} +2 -2
- package/src/tasks-runner/{life-cycle.js → life-cycles/life-cycle.js} +0 -0
- package/src/tasks-runner/life-cycles/life-cycle.js.map +1 -0
- package/src/tasks-runner/{neo-output → life-cycles}/pretty-time.d.ts +0 -0
- package/src/tasks-runner/{neo-output → life-cycles}/pretty-time.js +0 -0
- package/src/tasks-runner/life-cycles/pretty-time.js.map +1 -0
- package/src/tasks-runner/{run-many-terminal-output-life-cycle.d.ts → life-cycles/static-run-many-terminal-output-life-cycle.d.ts} +12 -4
- package/src/tasks-runner/{run-many-terminal-output-life-cycle.js → life-cycles/static-run-many-terminal-output-life-cycle.js} +24 -14
- package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js.map +1 -0
- package/src/tasks-runner/{run-one-terminal-output-life-cycle.d.ts → life-cycles/static-run-one-terminal-output-life-cycle.d.ts} +12 -4
- package/src/tasks-runner/{run-one-terminal-output-life-cycle.js → life-cycles/static-run-one-terminal-output-life-cycle.js} +22 -13
- package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js.map +1 -0
- package/src/tasks-runner/{task-profiling-life-cycle.d.ts → life-cycles/task-profiling-life-cycle.d.ts} +1 -1
- package/src/tasks-runner/{task-profiling-life-cycle.js → life-cycles/task-profiling-life-cycle.js} +0 -0
- package/src/tasks-runner/life-cycles/task-profiling-life-cycle.js.map +1 -0
- package/src/tasks-runner/{task-timings-life-cycle.d.ts → life-cycles/task-timings-life-cycle.d.ts} +1 -1
- package/src/tasks-runner/{task-timings-life-cycle.js → life-cycles/task-timings-life-cycle.js} +0 -0
- package/src/tasks-runner/life-cycles/task-timings-life-cycle.js.map +1 -0
- package/src/tasks-runner/run-command.js +15 -14
- package/src/tasks-runner/run-command.js.map +1 -1
- package/src/utilities/output.d.ts +13 -5
- package/src/utilities/output.js +55 -34
- package/src/utilities/output.js.map +1 -1
- package/src/utilities/perf-logging.js +3 -2
- package/src/utilities/perf-logging.js.map +1 -1
- package/src/utils/graph-utils.js +2 -1
- package/src/utils/graph-utils.js.map +1 -1
- package/src/utils/rules/visit-not-ignored-files.js.map +1 -1
- package/src/utils/runtime-lint-utils.js.map +1 -1
- package/src/utils/versions.js +1 -1
- package/src/tasks-runner/empty-terminal-output-life-cycle.js.map +0 -1
- package/src/tasks-runner/life-cycle.js.map +0 -1
- package/src/tasks-runner/neo-output/pretty-time.js.map +0 -1
- package/src/tasks-runner/neo-output/render.d.ts +0 -13
- package/src/tasks-runner/neo-output/render.js +0 -244
- package/src/tasks-runner/neo-output/render.js.map +0 -1
- package/src/tasks-runner/run-many-terminal-output-life-cycle.js.map +0 -1
- package/src/tasks-runner/run-one-terminal-output-life-cycle.js.map +0 -1
- package/src/tasks-runner/task-profiling-life-cycle.js.map +0 -1
- package/src/tasks-runner/task-timings-life-cycle.js.map +0 -1
package/README.md
CHANGED
|
@@ -17,38 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
# Workspace Nx Package
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# Smart, Fast and Extensible Build System
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Nx is a smart, fast and extensible build system. It comes with first class monorepo support and powerful integrations.
|
|
25
|
-
|
|
26
|
-
### Best-in-Class Support for Monorepos
|
|
27
|
-
|
|
28
|
-
<strong>Nx</strong> provides distributed graph-based task execution and computation caching.
|
|
29
|
-
|
|
30
|
-
<strong>Nx</strong> is smart. It analyzes your workspace and figures out what can be affected by every code change.
|
|
31
|
-
That's why Nx doesn't rebuild and retest everything on every commit--<strong>it only rebuilds what is necessary</strong>
|
|
32
|
-
.
|
|
33
|
-
|
|
34
|
-
<strong>Nx</strong> partitions commands into a graph of smaller tasks. Nx then runs those tasks in parallel,
|
|
35
|
-
and <strong>it can even distribute them across multiple machines without any configuration</strong>.
|
|
36
|
-
|
|
37
|
-
<strong>Nx also uses a distributed computation cache.</strong> If someone has already built or tested similar code, Nx
|
|
38
|
-
will use their results to speed up the command for everyone else.
|
|
39
|
-
|
|
40
|
-
### Holistic Dev Experience Powered by an Advanced CLI and Editor Plugins
|
|
41
|
-
|
|
42
|
-
<strong>Nx</strong> helps scale your development from one team building one application to many teams building multiple
|
|
43
|
-
frontend and backend applications all in the same workspace. <strong >When using Nx, developers have a holistic dev
|
|
44
|
-
experience powered by an advanced CLI</strong > (with editor plugins), capabilities for controlled code sharing and
|
|
45
|
-
consistent code generation.
|
|
46
|
-
|
|
47
|
-
### Rich Plugin Ecosystem
|
|
48
|
-
|
|
49
|
-
<strong>Nx</strong> is an open platform with plugins for many modern tools and frameworks. It has support for
|
|
50
|
-
TypeScript, React, Angular, Cypress, Jest, Prettier, Nest.js, Next.js, Storybook, Ionic among others. With Nx, you get a
|
|
51
|
-
consistent dev experience regardless of the tools used.
|
|
22
|
+
Nx is a next generation build system with first class monorepo support and powerful integrations.
|
|
52
23
|
|
|
53
24
|
|
|
54
25
|
## Getting Started
|
|
@@ -77,8 +48,9 @@ The `create-nx-workspace` command will ask you to select a preset, which will co
|
|
|
77
48
|
|
|
78
49
|
```
|
|
79
50
|
? What to create in the new workspace (Use arrow keys)
|
|
80
|
-
❯
|
|
81
|
-
|
|
51
|
+
❯ apps [an empty workspace with no plugins with a layout that works best for building apps]
|
|
52
|
+
core [an empty workspace with no plugins set up to publish npm packages (similar to yarn workspaces)]
|
|
53
|
+
ts [an empty workspace with the JS/TS plugin preinstalled]
|
|
82
54
|
react [a workspace with a single React application]
|
|
83
55
|
angular [a workspace with a single Angular application]
|
|
84
56
|
next.js [a workspace with a single Next.js application]
|
|
@@ -86,12 +58,20 @@ The `create-nx-workspace` command will ask you to select a preset, which will co
|
|
|
86
58
|
nest [a workspace with a single Nest application]
|
|
87
59
|
express [a workspace with a single Express application]
|
|
88
60
|
web components [a workspace with a single app built using web components]
|
|
61
|
+
react-native [a workspace with a single React Native application]
|
|
89
62
|
react-express [a workspace with a full stack application (React + Express)]
|
|
90
|
-
angular-nest [a workspace with a full stack application (Angular + Nest)]
|
|
91
63
|
```
|
|
92
64
|
|
|
93
65
|
Select the preset that works best for you.
|
|
94
66
|
|
|
67
|
+
### Adding Nx to an Existing Monorepo
|
|
68
|
+
|
|
69
|
+
Run:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx add-nx-to-monorepo@latest
|
|
73
|
+
```
|
|
74
|
+
|
|
95
75
|
|
|
96
76
|
If it's your first Nx project, the command will recommend you to install the `nx` package globally, so you can invoke `nx` directly without going through yarn or npm.
|
|
97
77
|
|
|
@@ -103,61 +83,13 @@ If it's your first Nx project, the command will recommend you to install the `nx
|
|
|
103
83
|
|
|
104
84
|
## Documentation & Resources
|
|
105
85
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- [Nx Documentation and Guides](https://nx.dev)
|
|
109
|
-
- [Intro into Nx](https://nx.dev/getting-started/intro)
|
|
110
|
-
- [Interactive Tutorial with Videos](https://nx.dev/tutorial/01-create-application)
|
|
111
|
-
|
|
112
|
-
### Quick Start Videos
|
|
113
|
-
|
|
114
|
-
- [Scale Your React Development with Nx](https://www.youtube.com/watch?v=sNz-4PUM0k8)
|
|
115
|
-
- [Scale your Node Development with Nx](https://www.youtube.com/watch?v=iIh5h_G52kI)
|
|
116
|
-
- [Modern Angular with Nx Dev Tools](https://www.youtube.com/watch?v=cXOkmOy-8dk)
|
|
117
|
-
|
|
118
|
-
### Courses
|
|
119
|
-
|
|
120
|
-
<table>
|
|
121
|
-
<tr>
|
|
122
|
-
<td><strong>Scale React Development with Nx</strong></td>
|
|
123
|
-
<td><strong>Nx Workspaces</strong></td>
|
|
124
|
-
<td><strong>Advanced Nx Workspaces</strong></td>
|
|
125
|
-
</tr>
|
|
126
|
-
<tr>
|
|
127
|
-
<td>
|
|
128
|
-
<a href="https://egghead.io/playlists/scale-react-development-with-nx-4038" target="_blank">
|
|
129
|
-
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/EGH_ScalingReactNx.png" height="150px" alt="Nx - Scale React Development with Nx video course"></p>
|
|
130
|
-
</a>
|
|
131
|
-
</td>
|
|
132
|
-
<td>
|
|
133
|
-
<a href="https://www.youtube.com/watch?v=2mYLe9Kp9VM&list=PLakNactNC1dH38AfqmwabvOszDmKriGco" target="_blank">
|
|
134
|
-
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-workspace-course.png" width="350" alt="Nx Workspaces video course"></p>
|
|
135
|
-
</a>
|
|
136
|
-
</td>
|
|
137
|
-
<td>
|
|
138
|
-
<a href="https://nxplaybook.com/p/advanced-nx-workspaces" target="_blank">
|
|
139
|
-
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/advanced-nx-workspace-course.png" width="350" alt="Nx Advanced Workspaces video course"></p>
|
|
140
|
-
</a>
|
|
141
|
-
</td>
|
|
142
|
-
</tr>
|
|
143
|
-
</table>
|
|
144
|
-
|
|
145
|
-
### Videos, Blogs, Books, Examples
|
|
146
|
-
|
|
147
|
-
- [Nx Dev Tools for Monorepos, In-Depth Explainer (React)](https://www.youtube.com/watch?v=jCf92IyR-GE)
|
|
148
|
-
|
|
149
|
-
- [Nx Dev Tools for Monorepos, In-Depth Explainer (Angular)](https://youtu.be/h5FIGDn5YM0)
|
|
150
|
-
|
|
151
|
-
- [Youtube Channel with Nx-Related Videos](https://www.youtube.com/playlist?list=PLakNactNC1dHHWx4JIORwfnEajRv6FG5m)
|
|
86
|
+
A few links to help you get started:
|
|
152
87
|
|
|
88
|
+
- [Nx.Dev: Documentation, Guides, Interactive Tutorials](https://nx.dev)
|
|
89
|
+
- [Tutorial: Adding Nx to an Existing Monorepo](https://nx.dev/migration/adding-to-monorepo)
|
|
90
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
153
91
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
154
92
|
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
- [Nx Examples Repo](https://github.com/nrwl/nx-examples)
|
|
158
|
-
|
|
159
|
-
# Engage with the Core Team and the Community
|
|
160
|
-
|
|
161
|
-
- [The Nx Show Playlist on YouTube](https://www.youtube.com/playlist?list=PLakNactNC1dE8KLQ5zd3fQwu_yQHjTmR5). It's a regular YouTube stream where we talk all things Nx. Join the stream, ask questions, etc.
|
|
162
|
-
- [Follow Nx on Twitter](https://twitter.com/NxDevTools)
|
|
93
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank"><img src="./images/nx-courses-and-videos.svg"
|
|
94
|
+
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
163
95
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/workspace",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.5.0-beta.1",
|
|
4
4
|
"description": "Smart, Fast and Extensible Build System",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"minimatch": "3.0.4",
|
|
82
82
|
"enquirer": "~2.3.6",
|
|
83
83
|
"tslib": "^2.3.0",
|
|
84
|
-
"@nrwl/cli": "13.
|
|
85
|
-
"@nrwl/devkit": "13.
|
|
86
|
-
"@nrwl/jest": "13.
|
|
87
|
-
"@nrwl/linter": "13.
|
|
84
|
+
"@nrwl/cli": "13.5.0-beta.1",
|
|
85
|
+
"@nrwl/devkit": "13.5.0-beta.1",
|
|
86
|
+
"@nrwl/jest": "13.5.0-beta.1",
|
|
87
|
+
"@nrwl/linter": "13.5.0-beta.1"
|
|
88
88
|
},
|
|
89
89
|
"nx-migrations": {
|
|
90
90
|
"migrations": "./migrations.json"
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.daemonHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
5
|
const tmp_dir_1 = require("../core/project-graph/daemon/tmp-dir");
|
|
6
|
+
const output_1 = require("../utilities/output");
|
|
7
7
|
function daemonHandler(args) {
|
|
8
8
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
9
9
|
const { startInBackground, startInCurrentProcess } = yield Promise.resolve().then(() => require('../core/project-graph/daemon/client/client'));
|
|
10
10
|
if (!args.background) {
|
|
11
11
|
return startInCurrentProcess();
|
|
12
12
|
}
|
|
13
|
-
devkit_1.logger.info(`NX Daemon Server - Starting in a background process...`);
|
|
14
13
|
const pid = yield startInBackground();
|
|
15
|
-
|
|
14
|
+
output_1.output.log({
|
|
15
|
+
title: `Daemon Server - Started in a background process...`,
|
|
16
|
+
bodyLines: [
|
|
17
|
+
`${output_1.output.dim('Logs from the Daemon process (')}ID: ${pid}${output_1.output.dim(') can be found here:')} ${tmp_dir_1.DAEMON_OUTPUT_LOG_FILE}\n`,
|
|
18
|
+
],
|
|
19
|
+
});
|
|
16
20
|
});
|
|
17
21
|
}
|
|
18
22
|
exports.daemonHandler = daemonHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.js","sourceRoot":"","sources":["../../../../../packages/workspace/src/command-line/daemon.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"daemon.js","sourceRoot":"","sources":["../../../../../packages/workspace/src/command-line/daemon.ts"],"names":[],"mappings":";;;;AACA,kEAA8E;AAC9E,gDAA6C;AAE7C,SAAsB,aAAa,CAAC,IAAe;;QACjD,MAAM,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,GAAG,2CACnD,4CAA4C,EAC7C,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,OAAO,qBAAqB,EAAE,CAAC;SAChC;QACD,MAAM,GAAG,GAAG,MAAM,iBAAiB,EAAE,CAAC;QACtC,eAAM,CAAC,GAAG,CAAC;YACT,KAAK,EAAE,oDAAoD;YAC3D,SAAS,EAAE;gBACT,GAAG,eAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,OAAO,GAAG,GAAG,eAAM,CAAC,GAAG,CACpE,sBAAsB,CACvB,IAAI,gCAAsB,IAAI;aAChC;SACF,CAAC,CAAC;IACL,CAAC;CAAA;AAhBD,sCAgBC"}
|