-
Notifications
You must be signed in to change notification settings - Fork 228
Fix link checks to npm for packages #13281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes link verification for npm packages by working around Cloudflare 403 errors from npmjs.com. Instead of checking the package page directly, the script now uses the npmjs.org registry API for existence checks.
Key Changes:
- Added special handling for npm package links via a new
ProcessNpmLinkfunction - Redirects npm package page URLs to the corresponding registry API URLs
|
The following pipelines have been queued for testing: |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
The following pipelines have been queued for testing: |
|
The following pipelines have been queued for testing: |
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#13281 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#13281 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| function ProcessNpmLink([System.Uri]$linkUri) { | ||
| # npmjs.com started using Cloudflare which returns 403 and we need to instead check the registry api for existence checks | ||
| # https://github.com/orgs/community/discussions/174098#discussioncomment-14461226 | ||
| $apiUrl = $linkUri.ToString() -replace '^https?://(?:www\.)?npmjs\.com/package/(.*)/v', 'https://registry.npmjs.org/$1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you create a new PR that will update this replacement to support both version https://www.npmjs.com/package/@azure/ai-agents/v/1.1.0 and non-version npmjs urls https://www.npmjs.com/package/@azure/ai-agents?
No description provided.