nx 19.6.0-beta.0 → 19.6.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/bin/post-install.js +8 -0
  2. package/package.json +12 -12
  3. package/release/changelog-renderer/index.js +16 -1
  4. package/schemas/nx-schema.json +25 -0
  5. package/schemas/project-schema.json +7 -0
  6. package/src/adapter/compat.d.ts +1 -1
  7. package/src/adapter/compat.js +1 -0
  8. package/src/command-line/init/init-v2.js +1 -1
  9. package/src/command-line/nx-commands.js +3 -0
  10. package/src/command-line/release/changelog.js +80 -42
  11. package/src/command-line/release/config/version-plans.d.ts +5 -0
  12. package/src/command-line/release/config/version-plans.js +9 -5
  13. package/src/command-line/release/plan.js +25 -45
  14. package/src/command-line/release/utils/generate-version-plan-content.js +2 -3
  15. package/src/command-line/release/version.d.ts +5 -0
  16. package/src/command-line/sync/command-object.d.ts +6 -0
  17. package/src/command-line/sync/command-object.js +25 -0
  18. package/src/command-line/sync/sync.d.ts +6 -0
  19. package/src/command-line/sync/sync.js +30 -0
  20. package/src/config/nx-json.d.ts +23 -0
  21. package/src/config/workspace-json-project-json.d.ts +5 -0
  22. package/src/core/graph/main.js +1 -1
  23. package/src/core/graph/styles.css +1 -1
  24. package/src/daemon/cache.d.ts +1 -0
  25. package/src/daemon/cache.js +25 -18
  26. package/src/daemon/client/client.d.ts +5 -0
  27. package/src/daemon/client/client.js +42 -1
  28. package/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +6 -0
  29. package/src/daemon/message-types/flush-sync-generator-changes-to-disk.js +11 -0
  30. package/src/daemon/message-types/force-shutdown.d.ts +5 -0
  31. package/src/daemon/message-types/force-shutdown.js +11 -0
  32. package/src/daemon/message-types/get-registered-sync-generators.d.ts +5 -0
  33. package/src/daemon/message-types/get-registered-sync-generators.js +11 -0
  34. package/src/daemon/message-types/get-sync-generator-changes.d.ts +6 -0
  35. package/src/daemon/message-types/get-sync-generator-changes.js +11 -0
  36. package/src/daemon/message-types/update-workspace-context.d.ts +8 -0
  37. package/src/daemon/message-types/update-workspace-context.js +11 -0
  38. package/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +2 -0
  39. package/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +11 -0
  40. package/src/daemon/server/handle-force-shutdown.d.ts +5 -0
  41. package/src/daemon/server/handle-force-shutdown.js +18 -0
  42. package/src/daemon/server/handle-get-registered-sync-generators.d.ts +2 -0
  43. package/src/daemon/server/handle-get-registered-sync-generators.js +11 -0
  44. package/src/daemon/server/handle-get-sync-generator-changes.d.ts +2 -0
  45. package/src/daemon/server/handle-get-sync-generator-changes.js +17 -0
  46. package/src/daemon/server/handle-request-shutdown.js +2 -0
  47. package/src/daemon/server/handle-update-workspace-context.d.ts +2 -0
  48. package/src/daemon/server/handle-update-workspace-context.js +11 -0
  49. package/src/daemon/server/project-graph-incremental-recomputation.d.ts +1 -0
  50. package/src/daemon/server/project-graph-incremental-recomputation.js +19 -2
  51. package/src/daemon/server/server.d.ts +1 -0
  52. package/src/daemon/server/server.js +39 -0
  53. package/src/daemon/server/shutdown-utils.d.ts +2 -1
  54. package/src/daemon/server/shutdown-utils.js +11 -4
  55. package/src/daemon/server/sync-generators.d.ts +6 -0
  56. package/src/daemon/server/sync-generators.js +202 -0
  57. package/src/daemon/server/watcher.js +3 -0
  58. package/src/daemon/socket-utils.js +18 -5
  59. package/src/daemon/tmp-dir.js +2 -1
  60. package/src/native/nx.wasm32-wasi.wasm +0 -0
  61. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -1
  62. package/src/nx-cloud/models/onboarding-status.d.ts +1 -0
  63. package/src/nx-cloud/models/onboarding-status.js +2 -0
  64. package/src/nx-cloud/utilities/is-workspace-claimed.d.ts +1 -0
  65. package/src/nx-cloud/utilities/is-workspace-claimed.js +24 -0
  66. package/src/nx-cloud/utilities/onboarding.d.ts +5 -0
  67. package/src/nx-cloud/utilities/onboarding.js +28 -0
  68. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +7 -2
  69. package/src/project-graph/plugins/internal-api.js +16 -5
  70. package/src/project-graph/plugins/isolation/messaging.d.ts +5 -1
  71. package/src/project-graph/plugins/isolation/messaging.js +1 -0
  72. package/src/project-graph/plugins/isolation/plugin-pool.js +4 -6
  73. package/src/project-graph/plugins/isolation/plugin-worker.js +15 -0
  74. package/src/project-graph/utils/project-configuration-utils.js +5 -2
  75. package/src/tasks-runner/run-command.d.ts +1 -1
  76. package/src/tasks-runner/run-command.js +120 -2
  77. package/src/utils/package-manager.js +12 -3
  78. package/src/utils/plugins/output.js +1 -1
  79. package/src/utils/sync-generators.d.ts +22 -0
  80. package/src/utils/sync-generators.js +161 -0
  81. package/src/utils/workspace-context.d.ts +1 -0
  82. package/src/utils/workspace-context.js +16 -0
  83. package/src/daemon/message-types/update-context-files.d.ts +0 -7
  84. package/src/daemon/message-types/update-context-files.js +0 -11
@@ -266,6 +266,25 @@ export interface NxReleaseConfiguration {
266
266
  */
267
267
  versionPlans?: boolean;
268
268
  }
269
+ export interface NxSyncConfiguration {
270
+ /**
271
+ * List of workspace-wide sync generators to be run (not attached to targets).
272
+ */
273
+ globalGenerators?: string[];
274
+ /**
275
+ * Options for the sync generators.
276
+ */
277
+ generatorOptions?: {
278
+ [generatorName: string]: Record<string, unknown>;
279
+ };
280
+ /**
281
+ * Whether to automatically apply sync generator changes when running tasks.
282
+ * If not set, the user will be prompted.
283
+ * If set to `true`, the user will not be prompted and the changes will be applied.
284
+ * If set to `false`, the user will not be prompted and the changes will not be applied.
285
+ */
286
+ applyChanges?: boolean;
287
+ }
269
288
  /**
270
289
  * Nx.json configuration
271
290
  *
@@ -413,6 +432,10 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
413
432
  * Set this to false to disable connection to Nx Cloud
414
433
  */
415
434
  neverConnectToCloud?: boolean;
435
+ /**
436
+ * Configuration for the `nx sync` command.
437
+ */
438
+ sync?: NxSyncConfiguration;
416
439
  }
417
440
  export type PluginConfiguration = string | ExpandedPluginConfiguration;
418
441
  export type ExpandedPluginConfiguration<T = unknown> = {
@@ -217,4 +217,9 @@ export interface TargetConfiguration<T = any> {
217
217
  * Default is true
218
218
  */
219
219
  parallelism?: boolean;
220
+ /**
221
+ * List of generators to run before the target to ensure the workspace
222
+ * is up to date.
223
+ */
224
+ syncGenerators?: string[];
220
225
  }