nx 18.0.4 → 18.0.5

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.
Files changed (38) hide show
  1. package/package.json +13 -12
  2. package/src/command-line/add/add.js +3 -1
  3. package/src/command-line/graph/graph.js +1 -1
  4. package/src/command-line/init/init-v2.js +16 -11
  5. package/src/command-line/migrate/command-object.js +17 -2
  6. package/src/command-line/migrate/migrate.js +13 -1
  7. package/src/command-line/release/changelog.d.ts +16 -1
  8. package/src/command-line/release/changelog.js +104 -194
  9. package/src/command-line/release/command-object.d.ts +1 -0
  10. package/src/command-line/release/release.js +56 -3
  11. package/src/command-line/release/utils/git.d.ts +5 -1
  12. package/src/command-line/release/utils/git.js +26 -11
  13. package/src/command-line/release/utils/github.d.ts +4 -8
  14. package/src/command-line/release/utils/github.js +61 -2
  15. package/src/command-line/release/utils/shared.d.ts +1 -0
  16. package/src/command-line/release/utils/shared.js +3 -1
  17. package/src/core/graph/3rdpartylicenses.txt +0 -51
  18. package/src/core/graph/main.js +1 -1
  19. package/src/core/graph/polyfills.js +1 -1
  20. package/src/core/graph/runtime.js +1 -1
  21. package/src/core/graph/styles.js +1 -1
  22. package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +3 -3
  23. package/src/plugins/js/utils/register.js +1 -0
  24. package/src/plugins/target-defaults/target-defaults-plugin.d.ts +2 -3
  25. package/src/plugins/target-defaults/target-defaults-plugin.js +24 -32
  26. package/src/project-graph/utils/project-configuration-utils.js +13 -6
  27. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +20 -23
  28. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +16 -16
  29. package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +1 -1
  30. package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -1
  31. package/src/tasks-runner/task-orchestrator.js +23 -1
  32. package/src/utils/json.js +3 -1
  33. package/src/utils/logger.js +1 -1
  34. package/src/utils/output.d.ts +0 -1
  35. package/src/utils/output.js +6 -7
  36. package/src/utils/package-json.d.ts +1 -1
  37. package/src/utils/package-json.js +12 -11
  38. package/src/utils/plugins/core-plugins.js +4 -0
@@ -5,6 +5,7 @@ const fs_1 = require("fs");
5
5
  const path_1 = require("path");
6
6
  const fileutils_1 = require("./fileutils");
7
7
  const installation_directory_1 = require("./installation-directory");
8
+ const project_configuration_utils_1 = require("../project-graph/utils/project-configuration-utils");
8
9
  function normalizePackageGroup(packageGroup) {
9
10
  return Array.isArray(packageGroup)
10
11
  ? packageGroup.map((x) => typeof x === 'string' ? { package: x, version: '*' } : x)
@@ -37,32 +38,32 @@ function readNxMigrateConfig(json) {
37
38
  };
38
39
  }
39
40
  exports.readNxMigrateConfig = readNxMigrateConfig;
40
- function buildTargetFromScript(script, nx) {
41
- const nxTargetConfiguration = nx?.targets?.[script] || {};
41
+ function buildTargetFromScript(script) {
42
42
  return {
43
- ...nxTargetConfiguration,
44
43
  executor: 'nx:run-script',
45
44
  options: {
46
- ...(nxTargetConfiguration.options || {}),
47
45
  script,
48
46
  },
49
47
  };
50
48
  }
51
49
  exports.buildTargetFromScript = buildTargetFromScript;
52
50
  function readTargetsFromPackageJson(packageJson) {
53
- const { scripts, nx } = packageJson;
51
+ const { scripts, nx, private: isPrivate } = packageJson ?? {};
54
52
  const res = {};
55
- Object.keys(scripts || {}).forEach((script) => {
56
- if (!nx?.includedScripts || nx?.includedScripts.includes(script)) {
57
- res[script] = buildTargetFromScript(script, nx);
58
- }
59
- });
53
+ const includedScripts = nx?.includedScripts || Object.keys(scripts ?? {});
54
+ //
55
+ for (const script of includedScripts) {
56
+ res[script] = buildTargetFromScript(script);
57
+ }
58
+ for (const targetName in nx?.targets) {
59
+ res[targetName] = (0, project_configuration_utils_1.mergeTargetConfigurations)(nx?.targets[targetName], res[targetName]);
60
+ }
60
61
  /**
61
62
  * Add implicit nx-release-publish target for all package.json files that are
62
63
  * not marked as `"private": true` to allow for lightweight configuration for
63
64
  * package based repos.
64
65
  */
65
- if (!packageJson.private && !res['nx-release-publish']) {
66
+ if (!isPrivate && !res['nx-release-publish']) {
66
67
  res['nx-release-publish'] = {
67
68
  dependsOn: ['^nx-release-publish'],
68
69
  executor: '@nx/js:release-publish',
@@ -53,6 +53,10 @@ function fetchCorePlugins() {
53
53
  name: '@nx/node',
54
54
  capabilities: 'executors,generators',
55
55
  },
56
+ {
57
+ name: '@nx/nuxt',
58
+ capabilities: 'generators',
59
+ },
56
60
  {
57
61
  name: 'nx',
58
62
  capabilities: 'executors',