nx 19.0.0-beta.4 → 19.0.0-beta.6
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/.eslintrc.json +1 -1
- package/package.json +12 -12
- package/src/config/nx-json.d.ts +2 -2
- package/src/core/graph/index.html +1 -2
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/devkit-internals.d.ts +1 -0
- package/src/devkit-internals.js +4 -2
- package/src/project-graph/plugins/isolation/plugin-worker.js +3 -0
- package/src/project-graph/plugins/public-api.d.ts +1 -1
- package/src/project-graph/plugins/utils.d.ts +2 -2
- package/src/project-graph/plugins/utils.js +15 -16
- package/src/utils/perf-logging.js +3 -1
- package/src/core/graph/3rdpartylicenses.txt +0 -785
@@ -1 +1 @@
|
|
1
|
-
(()=>{"use strict";var e,r={},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var l=1/0;for(f=0;f<e.length;f++){for(var[t,n,i]=e[f],a=!0,u=0;u<t.length;u++)(!1&i||l>=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(a=!1,i<l&&(l=i));if(a){e.splice(f--,1);var d=n();void 0!==d&&(r=d)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={
|
1
|
+
(()=>{"use strict";var e,r={},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var l=1/0;for(f=0;f<e.length;f++){for(var[t,n,i]=e[f],a=!0,u=0;u<t.length;u++)(!1&i||l>=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(a=!1,i<l&&(l=i));if(a){e.splice(f--,1);var d=n();void 0!==d&&(r=d)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={666:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[l,a,u]=t,d=0;if(l.some((r=>0!==e[r]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(u)var f=u(o)}for(r&&r(t);d<l.length;d++)i=l[d],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(f)},t=self.webpackChunk=self.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
|
package/src/core/graph/styles.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[
|
1
|
+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[532],{96467:()=>{}},s=>{var e;e=96467,s(s.s=e)}]);
|
@@ -8,6 +8,7 @@ export { getExecutorInformation } from './command-line/run/executor-utils';
|
|
8
8
|
export { readNxJson as readNxJsonFromDisk } from './config/nx-json';
|
9
9
|
export { calculateDefaultProjectName } from './config/calculate-default-project-name';
|
10
10
|
export { retrieveProjectConfigurationsWithAngularProjects } from './project-graph/utils/retrieve-workspace-files';
|
11
|
+
export { mergeTargetConfigurations } from './project-graph/utils/project-configuration-utils';
|
11
12
|
export { readProjectConfigurationsFromRootMap } from './project-graph/utils/project-configuration-utils';
|
12
13
|
export { splitTarget } from './utils/split-target';
|
13
14
|
export { combineOptionsForExecutor } from './utils/params';
|
package/src/devkit-internals.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.readProjectConfigurationsFromRootMap = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
|
3
|
+
exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.readProjectConfigurationsFromRootMap = exports.mergeTargetConfigurations = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
/**
|
6
6
|
* Note to developers: STOP! These exports are available via requireNx in @nx/devkit.
|
@@ -18,7 +18,9 @@ Object.defineProperty(exports, "calculateDefaultProjectName", { enumerable: true
|
|
18
18
|
var retrieve_workspace_files_1 = require("./project-graph/utils/retrieve-workspace-files");
|
19
19
|
Object.defineProperty(exports, "retrieveProjectConfigurationsWithAngularProjects", { enumerable: true, get: function () { return retrieve_workspace_files_1.retrieveProjectConfigurationsWithAngularProjects; } });
|
20
20
|
var project_configuration_utils_1 = require("./project-graph/utils/project-configuration-utils");
|
21
|
-
Object.defineProperty(exports, "
|
21
|
+
Object.defineProperty(exports, "mergeTargetConfigurations", { enumerable: true, get: function () { return project_configuration_utils_1.mergeTargetConfigurations; } });
|
22
|
+
var project_configuration_utils_2 = require("./project-graph/utils/project-configuration-utils");
|
23
|
+
Object.defineProperty(exports, "readProjectConfigurationsFromRootMap", { enumerable: true, get: function () { return project_configuration_utils_2.readProjectConfigurationsFromRootMap; } });
|
22
24
|
var split_target_1 = require("./utils/split-target");
|
23
25
|
Object.defineProperty(exports, "splitTarget", { enumerable: true, get: function () { return split_target_1.splitTarget; } });
|
24
26
|
var params_1 = require("./utils/params");
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const messaging_1 = require("./messaging");
|
4
4
|
const loader_1 = require("../loader");
|
5
5
|
const serializable_error_1 = require("../../../utils/serializable-error");
|
6
|
+
if (process.env.NX_PERF_LOGGING === 'true') {
|
7
|
+
require('../../../utils/perf-logging');
|
8
|
+
}
|
6
9
|
global.NX_GRAPH_CREATION = true;
|
7
10
|
let plugin;
|
8
11
|
process.on('message', async (message) => {
|
@@ -12,7 +12,7 @@ export interface CreateNodesContext {
|
|
12
12
|
/**
|
13
13
|
* The subset of configuration files which match the createNodes pattern
|
14
14
|
*/
|
15
|
-
readonly configFiles: string[];
|
15
|
+
readonly configFiles: readonly string[];
|
16
16
|
}
|
17
17
|
/**
|
18
18
|
* A function which parses a configuration file into a set of nodes.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { NxPluginV1 } from '../../utils/nx-plugin.deprecated';
|
2
2
|
import type { CreateNodesResultWithContext, LoadedNxPlugin, NormalizedPlugin } from './internal-api';
|
3
|
-
import type
|
3
|
+
import { type CreateNodesContext, type NxPlugin, type NxPluginV2 } from './public-api';
|
4
4
|
export declare function isNxPluginV2(plugin: NxPlugin): plugin is NxPluginV2;
|
5
5
|
export declare function isNxPluginV1(plugin: NxPlugin | LoadedNxPlugin): plugin is NxPluginV1;
|
6
6
|
export declare function normalizeNxPlugin(plugin: NxPlugin): NormalizedPlugin;
|
7
|
-
export declare function runCreateNodesInParallel(configFiles: string[], plugin: NormalizedPlugin, options: unknown, context: CreateNodesContext): Promise<CreateNodesResultWithContext[]>;
|
7
|
+
export declare function runCreateNodesInParallel(configFiles: readonly string[], plugin: NormalizedPlugin, options: unknown, context: CreateNodesContext): Promise<CreateNodesResultWithContext[]>;
|
@@ -43,30 +43,29 @@ async function runCreateNodesInParallel(configFiles, plugin, options, context) {
|
|
43
43
|
performance.mark(`${plugin.name}:createNodes - start`);
|
44
44
|
const errors = [];
|
45
45
|
const results = [];
|
46
|
-
const promises = configFiles.map((file) => {
|
46
|
+
const promises = configFiles.map(async (file) => {
|
47
47
|
performance.mark(`${plugin.name}:createNodes:${file} - start`);
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
try {
|
49
|
+
const value = await plugin.createNodes[1](file, options, context);
|
50
|
+
if (value) {
|
51
|
+
results.push({
|
52
|
+
...value,
|
53
|
+
file,
|
54
|
+
pluginName: plugin.name,
|
55
|
+
});
|
56
|
+
}
|
57
|
+
}
|
58
|
+
catch (e) {
|
54
59
|
errors.push(new error_types_1.CreateNodesError({
|
55
60
|
error: e,
|
56
61
|
pluginName: plugin.name,
|
57
62
|
file,
|
58
63
|
}));
|
59
|
-
|
60
|
-
|
61
|
-
.then((r) => {
|
64
|
+
}
|
65
|
+
finally {
|
62
66
|
performance.mark(`${plugin.name}:createNodes:${file} - end`);
|
63
67
|
performance.measure(`${plugin.name}:createNodes:${file}`, `${plugin.name}:createNodes:${file} - start`, `${plugin.name}:createNodes:${file} - end`);
|
64
|
-
|
65
|
-
// createNodes function.
|
66
|
-
if (r) {
|
67
|
-
results.push({ ...r, file, pluginName: plugin.name });
|
68
|
-
}
|
69
|
-
});
|
68
|
+
}
|
70
69
|
});
|
71
70
|
await Promise.all(promises).then(() => {
|
72
71
|
performance.mark(`${plugin.name}:createNodes - end`);
|
@@ -1,7 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const perf_hooks_1 = require("perf_hooks");
|
4
|
-
|
4
|
+
let initialized = false;
|
5
|
+
if (process.env.NX_PERF_LOGGING === 'true' && !initialized) {
|
6
|
+
initialized = true;
|
5
7
|
const obs = new perf_hooks_1.PerformanceObserver((list) => {
|
6
8
|
for (const entry of list.getEntries()) {
|
7
9
|
console.log(`Time for '${entry.name}'`, entry.duration);
|