@teambit/objects 0.0.0-f0875555ff196593ba7e076961bcdc24e1caa58c → 0.0.0-f1a0ea5d6a2098d0671308c28b39cd778841ffdf
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/dist/models/lane.d.ts +2 -2
- package/dist/models/model-component.js +20 -0
- package/dist/models/model-component.js.map +1 -1
- package/dist/models/version.d.ts +2 -2
- package/dist/models/version.js +1 -10
- package/dist/models/version.js.map +1 -1
- package/dist/models/version.spec.js +4 -12
- package/dist/models/version.spec.js.map +1 -1
- package/models/model-component.ts +21 -0
- package/models/version.spec.ts +4 -12
- package/models/version.ts +1 -9
- package/package.json +28 -28
- /package/dist/{preview-1757513159048.js → preview-1762388609386.js} +0 -0
package/dist/models/lane.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export default class Lane extends BitObject {
|
|
|
56
56
|
changeScope(scope: string): void;
|
|
57
57
|
refs(): Ref[];
|
|
58
58
|
validateBeforePersisting(str: string): void;
|
|
59
|
-
toObject(): import("lodash").Dictionary<string | boolean | string[] | {
|
|
59
|
+
toObject(): import("lodash").Dictionary<string | boolean | string[] | Log | {
|
|
60
60
|
scope: string;
|
|
61
61
|
name: string;
|
|
62
62
|
} | {
|
|
@@ -66,7 +66,7 @@ export default class Lane extends BitObject {
|
|
|
66
66
|
name: string;
|
|
67
67
|
};
|
|
68
68
|
head: string;
|
|
69
|
-
}[] |
|
|
69
|
+
}[] | {
|
|
70
70
|
id: {
|
|
71
71
|
scope: string;
|
|
72
72
|
name: string;
|
|
@@ -1199,6 +1199,26 @@ consider using --ignore-missing-artifacts flag if you're sure the artifacts are
|
|
|
1199
1199
|
await this.setDivergeData(repo, undefined, undefined, workspaceId);
|
|
1200
1200
|
const divergeData = this.getDivergeData();
|
|
1201
1201
|
const localHashes = divergeData.snapsOnSourceOnly;
|
|
1202
|
+
|
|
1203
|
+
// When there's a detached head, divergeData only includes the detached head lineage.
|
|
1204
|
+
// We also need to include unexported versions from the main head lineage.
|
|
1205
|
+
const hasDetachedHead = this.detachedHeads && this.detachedHeads.getAllHeads().length > 0;
|
|
1206
|
+
if (hasDetachedHead && this.head) {
|
|
1207
|
+
// Calculate divergence from the main head as well
|
|
1208
|
+
const mainHeadDivergeData = await (0, _component2().getDivergeData)({
|
|
1209
|
+
repo,
|
|
1210
|
+
modelComponent: this,
|
|
1211
|
+
targetHead: (this.laneId ? this.calculatedRemoteHeadWhenOnLane : this.remoteHead) || null,
|
|
1212
|
+
sourceHead: this.head,
|
|
1213
|
+
throws: false
|
|
1214
|
+
});
|
|
1215
|
+
// Add main head local versions that aren't already in localHashes
|
|
1216
|
+
for (const hash of mainHeadDivergeData.snapsOnSourceOnly) {
|
|
1217
|
+
if (!localHashes.find(h => h.isEqual(hash))) {
|
|
1218
|
+
localHashes.push(hash);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1202
1222
|
if (!localHashes.length) return [];
|
|
1203
1223
|
return localHashes.reverse(); // reverse to get the older first
|
|
1204
1224
|
}
|