diff --git a/.chronus/changes/versioning-FixVersioningBugs-2024-4-22-20-42-27.md b/.chronus/changes/versioning-FixVersioningBugs-2024-4-22-20-42-27.md new file mode 100644 index 00000000000..bad367a8f93 --- /dev/null +++ b/.chronus/changes/versioning-FixVersioningBugs-2024-4-22-20-42-27.md @@ -0,0 +1,8 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: fix +packages: + - "@typespec/versioning" +--- + +If a property were marked with @added on a later version, the logic that said it was originally added on the first version was erroneously removed, resulting in incorrect projections. diff --git a/packages/versioning/src/versioning.ts b/packages/versioning/src/versioning.ts index 6a19635e4ec..49b609e629d 100644 --- a/packages/versioning/src/versioning.ts +++ b/packages/versioning/src/versioning.ts @@ -815,8 +815,6 @@ function getParentAddedVersionInTimeline( if (parentMap === undefined) return undefined; for (const [moment, availability] of parentMap.entries()) { if (availability === Availability.Added) { - // FIXME: is this actually correct? - // We essentially want to return the first (earliest) time this is added. return moment.versions().next().value; } }