@teambit/ci 1.0.507 → 1.0.508

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 (36) hide show
  1. package/dist/ci.main.runtime.d.ts +3 -2
  2. package/dist/ci.main.runtime.js +5 -6
  3. package/dist/ci.main.runtime.js.map +1 -1
  4. package/dist/{preview-1787147173446.js → preview-1787160027560.js} +1 -1
  5. package/dist/sync/git-host-provider.d.ts +9 -0
  6. package/dist/sync/git-host-provider.js.map +1 -1
  7. package/dist/sync/github-client.d.ts +28 -0
  8. package/dist/sync/github-client.js +81 -3
  9. package/dist/sync/github-client.js.map +1 -1
  10. package/dist/sync/github-client.spec.js +249 -0
  11. package/dist/sync/github-client.spec.js.map +1 -1
  12. package/dist/sync/lane-sync-executor.d.ts +47 -3
  13. package/dist/sync/lane-sync-executor.js +191 -39
  14. package/dist/sync/lane-sync-executor.js.map +1 -1
  15. package/dist/sync/lane-sync-executor.spec.js +336 -0
  16. package/dist/sync/lane-sync-executor.spec.js.map +1 -1
  17. package/dist/sync/sync-planner.d.ts +12 -2
  18. package/dist/sync/sync-planner.js +17 -8
  19. package/dist/sync/sync-planner.js.map +1 -1
  20. package/dist/sync/sync-planner.spec.js +64 -0
  21. package/dist/sync/sync-planner.spec.js.map +1 -1
  22. package/dist/sync/sync-state.d.ts +34 -3
  23. package/dist/sync/sync-state.js +61 -3
  24. package/dist/sync/sync-state.js.map +1 -1
  25. package/dist/sync/sync-state.spec.js +54 -0
  26. package/dist/sync/sync-state.spec.js.map +1 -1
  27. package/package.json +15 -15
  28. package/sync/git-host-provider.ts +8 -0
  29. package/sync/github-client.spec.ts +160 -0
  30. package/sync/github-client.ts +90 -3
  31. package/sync/lane-sync-executor.spec.ts +291 -0
  32. package/sync/lane-sync-executor.ts +233 -50
  33. package/sync/sync-planner.spec.ts +41 -0
  34. package/sync/sync-planner.ts +31 -10
  35. package/sync/sync-state.spec.ts +48 -0
  36. package/sync/sync-state.ts +104 -4
@@ -173,8 +173,9 @@ export declare class CiMain {
173
173
  reloadWorkspaceFromDisk(): Promise<void>;
174
174
  /**
175
175
  * Whether the workspace has anything the current lane doesn't reflect, per `bit status`. Read-only:
176
- * adoption uses this instead of a probe snap, which writes even under dryRun. Every signal a later
177
- * snap/export would push counts — including soft removals, hidden pending exports, and merge state.
176
+ * the sync probes use this instead of a probe snap, which writes even under dryRun. Every signal a
177
+ * later snap/export would push counts — soft removals, hidden pending exports, merge state, and
178
+ * unloadable components (unknown must not read as converged; see `statusReportsUnsyncedWork`).
178
179
  */
179
180
  hasUnsyncedWorkChanges(): Promise<boolean>;
180
181
  /** `bit ci sync` — reconcile Bit lanes and the main scope with git branches and PRs (see `SyncOrchestrator`). */
@@ -612,15 +612,14 @@ class CiMain {
612
612
 
613
613
  /**
614
614
  * Whether the workspace has anything the current lane doesn't reflect, per `bit status`. Read-only:
615
- * adoption uses this instead of a probe snap, which writes even under dryRun. Every signal a later
616
- * snap/export would push counts — including soft removals, hidden pending exports, and merge state.
615
+ * the sync probes use this instead of a probe snap, which writes even under dryRun. Every signal a
616
+ * later snap/export would push counts — soft removals, hidden pending exports, merge state, and
617
+ * unloadable components (unknown must not read as converged; see `statusReportsUnsyncedWork`).
617
618
  */
618
619
  async hasUnsyncedWorkChanges() {
619
- const status = await this.status.status({
620
+ return (0, _syncState().statusReportsUnsyncedWork)(await this.status.status({
620
621
  lanes: true
621
- });
622
- const divergence = [status.newComponents, status.modifiedComponents, status.stagedComponents, status.locallySoftRemoved, status.pendingUpdateDependents, status.mergePendingComponents, status.componentsDuringMergeState];
623
- return divergence.some(components => components.length > 0);
622
+ }));
624
623
  }
625
624
 
626
625
  /** `bit ci sync` — reconcile Bit lanes and the main scope with git branches and PRs (see `SyncOrchestrator`). */