Skip to content

Commit

Permalink
Create versioning-FixVersioningBugs-2024-4-22-20-42-27.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tjprescott committed Jun 4, 2024
1 parent 0abf167 commit 40a77ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 0 additions & 2 deletions packages/versioning/src/versioning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,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;
}
}
Expand Down

0 comments on commit 40a77ef

Please sign in to comment.