fix(docs-infra): only read a deprecation version from the start of the tag by erkamyaman · Pull Request #70580 · angular/angular · GitHub
Skip to content

fix(docs-infra): only read a deprecation version from the start of the tag - #70580

Open
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:fix-deprecation-version-extraction
Open

fix(docs-infra): only read a deprecation version from the start of the tag#70580
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:fix-deprecation-version-extraction

Conversation

@erkamyaman

Copy link
Copy Markdown
Contributor
Screenshot 2026-09-05 at 18 21 23

Good news: angular.dev now ships a roadmap spoiler. getLocaleCurrencyCode is documented as "deprecated since v4217", which at our current pace of one major a year puts that release in the year 6221. I appreciate the long term commitment, but I suspect the docs got ahead of the RFC.

The joke aside explanation is that the version is scraped with \d+(\.\d+)? from anywhere in the @deprecated comment, and that comment says "create a map of locale to ISO 4217 currency codes."

https://angular.dev/api/common/getLocaleCurrencyCode

After:

image

…e tag

`getTagSinceVersion` matched `\d+(\.\d+)?` anywhere in the tag comment. That
works for `@developerPreview`, `@experimental` and `@stable`, whose comment is
only a version, but `@deprecated` also carries a message, so any number in the
prose won. https://angular.dev/api/common/getLocaleCurrencyCode reads
"deprecated since v4217", taken from "a map of locale to ISO 4217 currency
codes", and eighteen sibling pages take v18 from the "i18n" in "relying on the
`Intl` API for i18n".

Anchoring the match, and allowing the `since`/`from`/`as of` prefixes the
comments use, leaves all seventy-nine correctly versioned comments untouched.
`generate_manifest` carries its own copy of the regex, so the API list badges
had the same values.

Those `@angular/common` comments never stated a version, so they now say `18.0`
explicitly, the release `d34c033902` (angular#54483) first shipped in, matching the
`@deprecated 18.0` already on `FormatWidth` in the same file. Nine tags in that
file had no version at all and were showing no badge; they are from the same
commit and now say `18.0` too.
@pullapprove
pullapprove Bot requested a review from kirjs September 5, 2026 15:22
@angular-robot angular-robot Bot added the area: docs-infra Angular.dev application and infrastructure label Sep 5, 2026
@ngbot ngbot Bot added this to the Backlog milestone Sep 5, 2026

@JeanMeche JeanMeche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow to bad there isn't a v4217 😄😄

@JeanMeche
JeanMeche removed the request for review from kirjs September 5, 2026 21:54
@JeanMeche JeanMeche added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Sep 5, 2026
@JeanMeche

Copy link
Copy Markdown
Member

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 5, 2026
@erkamyaman

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: docs-infra Angular.dev application and infrastructure merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants