nx 21.3.9 → 21.3.11
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 +11 -11
- package/src/adapter/compat.d.ts +2 -2
- package/src/adapter/compat.js +3 -0
- package/src/command-line/release/config/config.js +22 -13
- package/src/command-line/release/utils/resolve-nx-json-error-message.js +1 -1
- package/src/native/nx.wasi-browser.js +39 -42
- package/src/plugins/js/lock-file/project-graph-pruning.js +3 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "21.3.
|
3
|
+
"version": "21.3.11",
|
4
4
|
"private": false,
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
6
6
|
"repository": {
|
@@ -83,16 +83,16 @@
|
|
83
83
|
}
|
84
84
|
},
|
85
85
|
"optionalDependencies": {
|
86
|
-
"@nx/nx-darwin-arm64": "21.3.
|
87
|
-
"@nx/nx-darwin-x64": "21.3.
|
88
|
-
"@nx/nx-freebsd-x64": "21.3.
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "21.3.
|
90
|
-
"@nx/nx-linux-arm64-gnu": "21.3.
|
91
|
-
"@nx/nx-linux-arm64-musl": "21.3.
|
92
|
-
"@nx/nx-linux-x64-gnu": "21.3.
|
93
|
-
"@nx/nx-linux-x64-musl": "21.3.
|
94
|
-
"@nx/nx-win32-arm64-msvc": "21.3.
|
95
|
-
"@nx/nx-win32-x64-msvc": "21.3.
|
86
|
+
"@nx/nx-darwin-arm64": "21.3.11",
|
87
|
+
"@nx/nx-darwin-x64": "21.3.11",
|
88
|
+
"@nx/nx-freebsd-x64": "21.3.11",
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "21.3.11",
|
90
|
+
"@nx/nx-linux-arm64-gnu": "21.3.11",
|
91
|
+
"@nx/nx-linux-arm64-musl": "21.3.11",
|
92
|
+
"@nx/nx-linux-x64-gnu": "21.3.11",
|
93
|
+
"@nx/nx-linux-x64-musl": "21.3.11",
|
94
|
+
"@nx/nx-win32-arm64-msvc": "21.3.11",
|
95
|
+
"@nx/nx-win32-x64-msvc": "21.3.11"
|
96
96
|
},
|
97
97
|
"nx-migrations": {
|
98
98
|
"migrations": "./migrations.json",
|
package/src/adapter/compat.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts", "metadata"];
|
2
|
-
export declare const allowedWorkspaceExtensions: readonly ["$schema", "implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudId", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins", "neverConnectToCloud", "sync", "useLegacyCache", "maxCacheSize", "tui"];
|
1
|
+
export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts", "metadata", "owners", "nxCloudImplicitDependencies"];
|
2
|
+
export declare const allowedWorkspaceExtensions: readonly ["$schema", "implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudId", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins", "neverConnectToCloud", "sync", "useLegacyCache", "maxCacheSize", "tui", "owners"];
|
package/src/adapter/compat.js
CHANGED
@@ -29,6 +29,8 @@ exports.allowedProjectExtensions = [
|
|
29
29
|
'release',
|
30
30
|
'includedScripts',
|
31
31
|
'metadata',
|
32
|
+
'owners',
|
33
|
+
'nxCloudImplicitDependencies',
|
32
34
|
];
|
33
35
|
// If we pass props on the workspace that angular doesn't know about,
|
34
36
|
// it throws a warning that users see. We want to pass them still,
|
@@ -67,6 +69,7 @@ exports.allowedWorkspaceExtensions = [
|
|
67
69
|
'useLegacyCache',
|
68
70
|
'maxCacheSize',
|
69
71
|
'tui',
|
72
|
+
'owners',
|
70
73
|
];
|
71
74
|
if (!patched) {
|
72
75
|
Module.prototype.require = function () {
|
@@ -248,7 +248,11 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
248
248
|
releaseTagPattern:
|
249
249
|
// The appropriate group default releaseTagPattern is dependent upon the projectRelationships
|
250
250
|
groupProjectsRelationship === 'independent'
|
251
|
-
?
|
251
|
+
? // If the default pattern contains {projectName} then it will create unique release tags for each project.
|
252
|
+
// Otherwise, use the default value to guarantee unique tags
|
253
|
+
WORKSPACE_DEFAULTS.releaseTagPattern?.includes('{projectName}')
|
254
|
+
? WORKSPACE_DEFAULTS.releaseTagPattern
|
255
|
+
: defaultIndependentReleaseTagPattern
|
252
256
|
: WORKSPACE_DEFAULTS.releaseTagPattern,
|
253
257
|
releaseTagPatternCheckAllBranchesWhen: userConfig.releaseTagPatternCheckAllBranchesWhen ?? undefined,
|
254
258
|
releaseTagPatternRequireSemver: groupReleaseTagPatternRequireSemver,
|
@@ -430,7 +434,11 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
430
434
|
releaseTagPattern: releaseGroup.releaseTagPattern ||
|
431
435
|
// The appropriate group default releaseTagPattern is dependent upon the projectRelationships
|
432
436
|
(projectsRelationship === 'independent'
|
433
|
-
?
|
437
|
+
? // If the default pattern contains {projectName} then it will create unique release tags for each project.
|
438
|
+
// Otherwise, use the default value to guarantee unique tags
|
439
|
+
userConfig.releaseTagPattern?.includes('{projectName}')
|
440
|
+
? userConfig.releaseTagPattern
|
441
|
+
: defaultIndependentReleaseTagPattern
|
434
442
|
: userConfig.releaseTagPattern || defaultFixedReleaseTagPattern),
|
435
443
|
releaseTagPatternCheckAllBranchesWhen: releaseGroup.releaseTagPatternCheckAllBranchesWhen ??
|
436
444
|
userConfig.releaseTagPatternCheckAllBranchesWhen ??
|
@@ -615,6 +623,7 @@ function fillUnspecifiedConventionalCommitsProperties(config) {
|
|
615
623
|
};
|
616
624
|
}
|
617
625
|
async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
626
|
+
const linkMessage = `\nRead more about Nx Release at https://nx.dev/features/manage-releases.`;
|
618
627
|
switch (error.code) {
|
619
628
|
case 'PROJECTS_AND_GROUPS_DEFINED':
|
620
629
|
{
|
@@ -624,7 +633,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
624
633
|
]);
|
625
634
|
output_1.output.error({
|
626
635
|
title: `"projects" is not valid when explicitly defining release groups, and everything should be expressed within "groups" in that case. If you are using "groups" then you should remove the "projects" property`,
|
627
|
-
bodyLines: [nxJsonMessage],
|
636
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
628
637
|
});
|
629
638
|
}
|
630
639
|
break;
|
@@ -636,7 +645,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
636
645
|
]);
|
637
646
|
output_1.output.error({
|
638
647
|
title: `Release group "${error.data.releaseGroupName}" matches no projects. Please ensure all release groups match at least one project:`,
|
639
|
-
bodyLines: [nxJsonMessage],
|
648
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
640
649
|
});
|
641
650
|
}
|
642
651
|
break;
|
@@ -648,7 +657,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
648
657
|
]);
|
649
658
|
output_1.output.error({
|
650
659
|
title: `Project "${error.data.project}" matches multiple release groups. Please ensure all projects are part of only one release group:`,
|
651
|
-
bodyLines: [nxJsonMessage],
|
660
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
652
661
|
});
|
653
662
|
}
|
654
663
|
break;
|
@@ -662,7 +671,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
662
671
|
]);
|
663
672
|
output_1.output.error({
|
664
673
|
title: `Release group "${error.data.releaseGroupName}" has an invalid releaseTagPattern. Please ensure the pattern contains exactly one instance of the "{version}" placeholder`,
|
665
|
-
bodyLines: [nxJsonMessage],
|
674
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
666
675
|
});
|
667
676
|
}
|
668
677
|
break;
|
@@ -676,7 +685,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
676
685
|
: 'configuration options';
|
677
686
|
output_1.output.error({
|
678
687
|
title: `You have configured both the shorthand "version.conventionalCommits" and one or more of the related ${text} that it sets for you. Please use one or the other:`,
|
679
|
-
bodyLines: [nxJsonMessage],
|
688
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
680
689
|
});
|
681
690
|
}
|
682
691
|
break;
|
@@ -688,7 +697,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
688
697
|
]);
|
689
698
|
output_1.output.error({
|
690
699
|
title: `You have duplicate conflicting git configurations. If you are using the top level 'nx release' command, then remove the 'release.version.git' and 'release.changelog.git' properties in favor of 'release.git'. If you are using the subcommands or the programmatic API, then remove the 'release.git' property in favor of 'release.version.git' and 'release.changelog.git':`,
|
691
|
-
bodyLines: [nxJsonMessage],
|
700
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
692
701
|
});
|
693
702
|
}
|
694
703
|
break;
|
@@ -696,7 +705,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
696
705
|
const nxJsonMessage = await (0, resolve_nx_json_error_message_1.resolveNxJsonConfigErrorMessage)(['release']);
|
697
706
|
output_1.output.error({
|
698
707
|
title: `There was an error when resolving the configured changelog renderer at path: ${error.data.workspaceRelativePath}`,
|
699
|
-
bodyLines: [nxJsonMessage],
|
708
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
700
709
|
});
|
701
710
|
break;
|
702
711
|
}
|
@@ -709,7 +718,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
709
718
|
title: `Your "changelog.createRelease" config specifies an unsupported provider "${error.data.provider}". The supported providers are ${error.data.supportedProviders
|
710
719
|
.map((p) => `"${p}"`)
|
711
720
|
.join(', ')}`,
|
712
|
-
bodyLines: [nxJsonMessage],
|
721
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
713
722
|
});
|
714
723
|
}
|
715
724
|
break;
|
@@ -720,7 +729,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
720
729
|
]);
|
721
730
|
output_1.output.error({
|
722
731
|
title: `Your "changelog.createRelease" config specifies an invalid hostname "${error.data.hostname}". Please ensure you provide a valid hostname value, such as "example.com"`,
|
723
|
-
bodyLines: [nxJsonMessage],
|
732
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
724
733
|
});
|
725
734
|
}
|
726
735
|
break;
|
@@ -731,7 +740,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
731
740
|
]);
|
732
741
|
output_1.output.error({
|
733
742
|
title: `Your "changelog.createRelease" config specifies an invalid apiBaseUrl "${error.data.apiBaseUrl}". Please ensure you provide a valid URL value, such as "https://example.com"`,
|
734
|
-
bodyLines: [nxJsonMessage],
|
743
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
735
744
|
});
|
736
745
|
}
|
737
746
|
break;
|
@@ -742,7 +751,7 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
742
751
|
]);
|
743
752
|
output_1.output.error({
|
744
753
|
title: `The createRelease option for changelogs cannot be enabled when git push is explicitly disabled because the commit needs to be pushed to the remote in order to tie the release to it`,
|
745
|
-
bodyLines: [nxJsonMessage],
|
754
|
+
bodyLines: [nxJsonMessage, linkMessage],
|
746
755
|
});
|
747
756
|
}
|
748
757
|
break;
|
@@ -14,7 +14,7 @@ async function resolveNxJsonConfigErrorMessage(propPath) {
|
|
14
14
|
? `, line ${errorLines.startLine}`
|
15
15
|
: `, lines ${errorLines.startLine}-${errorLines.endLine}`;
|
16
16
|
}
|
17
|
-
return nxJsonMessage;
|
17
|
+
return nxJsonMessage + '.';
|
18
18
|
}
|
19
19
|
async function getJsonConfigLinesForErrorMessage(rawConfig, jsonPath) {
|
20
20
|
try {
|
@@ -64,49 +64,46 @@ function __napi_rs_initialize_modules(__napiInstance) {
|
|
64
64
|
__napiInstance.exports['__napi_register__NxConsolePreferences_struct_10']?.()
|
65
65
|
__napiInstance.exports['__napi_register__NxConsolePreferences_impl_14']?.()
|
66
66
|
__napiInstance.exports['__napi_register__log_debug_15']?.()
|
67
|
-
__napiInstance.exports['
|
68
|
-
__napiInstance.exports['
|
69
|
-
__napiInstance.exports['
|
70
|
-
__napiInstance.exports['
|
71
|
-
__napiInstance.exports['
|
72
|
-
__napiInstance.exports['
|
73
|
-
__napiInstance.exports['
|
74
|
-
__napiInstance.exports['
|
75
|
-
__napiInstance.exports['
|
76
|
-
__napiInstance.exports['
|
77
|
-
__napiInstance.exports['
|
78
|
-
__napiInstance.exports['
|
79
|
-
__napiInstance.exports['
|
80
|
-
__napiInstance.exports['
|
81
|
-
__napiInstance.exports['
|
82
|
-
__napiInstance.exports['
|
83
|
-
__napiInstance.exports['
|
84
|
-
__napiInstance.exports['
|
85
|
-
__napiInstance.exports['
|
86
|
-
__napiInstance.exports['
|
87
|
-
__napiInstance.exports['
|
88
|
-
__napiInstance.exports['
|
89
|
-
__napiInstance.exports['
|
90
|
-
__napiInstance.exports['
|
91
|
-
__napiInstance.exports['
|
92
|
-
__napiInstance.exports['
|
93
|
-
__napiInstance.exports['
|
94
|
-
__napiInstance.exports['
|
95
|
-
__napiInstance.exports['
|
96
|
-
__napiInstance.exports['
|
97
|
-
__napiInstance.exports['
|
98
|
-
__napiInstance.exports['
|
99
|
-
__napiInstance.exports['
|
100
|
-
__napiInstance.exports['
|
101
|
-
__napiInstance.exports['
|
102
|
-
__napiInstance.exports['
|
103
|
-
__napiInstance.exports['
|
104
|
-
__napiInstance.exports['
|
105
|
-
__napiInstance.exports['__napi_register__FileMap_struct_72']?.()
|
106
|
-
__napiInstance.exports['__napi_register____test_only_transfer_file_map_73']?.()
|
67
|
+
__napiInstance.exports['__napi_register__log_error_16']?.()
|
68
|
+
__napiInstance.exports['__napi_register__IS_WASM_17']?.()
|
69
|
+
__napiInstance.exports['__napi_register__get_binary_target_18']?.()
|
70
|
+
__napiInstance.exports['__napi_register__ImportResult_struct_19']?.()
|
71
|
+
__napiInstance.exports['__napi_register__find_imports_20']?.()
|
72
|
+
__napiInstance.exports['__napi_register__transfer_project_graph_21']?.()
|
73
|
+
__napiInstance.exports['__napi_register__ExternalNode_struct_22']?.()
|
74
|
+
__napiInstance.exports['__napi_register__Target_struct_23']?.()
|
75
|
+
__napiInstance.exports['__napi_register__Project_struct_24']?.()
|
76
|
+
__napiInstance.exports['__napi_register__ProjectGraph_struct_25']?.()
|
77
|
+
__napiInstance.exports['__napi_register__HashPlanner_struct_26']?.()
|
78
|
+
__napiInstance.exports['__napi_register__HashPlanner_impl_30']?.()
|
79
|
+
__napiInstance.exports['__napi_register__HashDetails_struct_31']?.()
|
80
|
+
__napiInstance.exports['__napi_register__HasherOptions_struct_32']?.()
|
81
|
+
__napiInstance.exports['__napi_register__TaskHasher_struct_33']?.()
|
82
|
+
__napiInstance.exports['__napi_register__TaskHasher_impl_36']?.()
|
83
|
+
__napiInstance.exports['__napi_register__Task_struct_37']?.()
|
84
|
+
__napiInstance.exports['__napi_register__TaskTarget_struct_38']?.()
|
85
|
+
__napiInstance.exports['__napi_register__TaskResult_struct_39']?.()
|
86
|
+
__napiInstance.exports['__napi_register__TaskGraph_struct_40']?.()
|
87
|
+
__napiInstance.exports['__napi_register__FileData_struct_41']?.()
|
88
|
+
__napiInstance.exports['__napi_register__InputsInput_struct_42']?.()
|
89
|
+
__napiInstance.exports['__napi_register__FileSetInput_struct_43']?.()
|
90
|
+
__napiInstance.exports['__napi_register__RuntimeInput_struct_44']?.()
|
91
|
+
__napiInstance.exports['__napi_register__EnvironmentInput_struct_45']?.()
|
92
|
+
__napiInstance.exports['__napi_register__ExternalDependenciesInput_struct_46']?.()
|
93
|
+
__napiInstance.exports['__napi_register__DepsOutputsInput_struct_47']?.()
|
94
|
+
__napiInstance.exports['__napi_register__NxJson_struct_48']?.()
|
95
|
+
__napiInstance.exports['__napi_register__FileLock_struct_49']?.()
|
96
|
+
__napiInstance.exports['__napi_register__FileLock_impl_51']?.()
|
97
|
+
__napiInstance.exports['__napi_register__WorkspaceContext_struct_52']?.()
|
98
|
+
__napiInstance.exports['__napi_register__WorkspaceContext_impl_63']?.()
|
99
|
+
__napiInstance.exports['__napi_register__WorkspaceErrors_64']?.()
|
100
|
+
__napiInstance.exports['__napi_register__NxWorkspaceFiles_struct_65']?.()
|
101
|
+
__napiInstance.exports['__napi_register__NxWorkspaceFilesExternals_struct_66']?.()
|
102
|
+
__napiInstance.exports['__napi_register__UpdatedWorkspaceFiles_struct_67']?.()
|
103
|
+
__napiInstance.exports['__napi_register__FileMap_struct_68']?.()
|
104
|
+
__napiInstance.exports['__napi_register____test_only_transfer_file_map_69']?.()
|
107
105
|
}
|
108
106
|
export const FileLock = __napiModule.exports.FileLock
|
109
|
-
export const HashPlanInspector = __napiModule.exports.HashPlanInspector
|
110
107
|
export const HashPlanner = __napiModule.exports.HashPlanner
|
111
108
|
export const ImportResult = __napiModule.exports.ImportResult
|
112
109
|
export const NxConsolePreferences = __napiModule.exports.NxConsolePreferences
|
@@ -123,8 +120,8 @@ export const hashArray = __napiModule.exports.hashArray
|
|
123
120
|
export const hashFile = __napiModule.exports.hashFile
|
124
121
|
export const installNxConsole = __napiModule.exports.installNxConsole
|
125
122
|
export const IS_WASM = __napiModule.exports.IS_WASM
|
126
|
-
export const isAiAgent = __napiModule.exports.isAiAgent
|
127
123
|
export const logDebug = __napiModule.exports.logDebug
|
124
|
+
export const logError = __napiModule.exports.logError
|
128
125
|
export const remove = __napiModule.exports.remove
|
129
126
|
export const testOnlyTransferFileMap = __napiModule.exports.testOnlyTransferFileMap
|
130
127
|
export const transferProjectGraph = __napiModule.exports.transferProjectGraph
|
@@ -85,7 +85,9 @@ function addNodesAndDependencies(graph, packageJsonDeps, workspacePackages, buil
|
|
85
85
|
else if (workspacePackages.has(name)) {
|
86
86
|
// Workspace Node
|
87
87
|
const node = graph.nodes[name];
|
88
|
-
|
88
|
+
if (node) {
|
89
|
+
traverseWorkspaceNode(graph, builder, node);
|
90
|
+
}
|
89
91
|
}
|
90
92
|
});
|
91
93
|
}
|