Skip to content

Use configured npm registry for publish checks - #11519

Closed
chidozieononiwu wants to merge 1 commit into
mainfrom
use-devops-feed-for-publish-check-clean
Closed

Use configured npm registry for publish checks#11519
chidozieononiwu wants to merge 1 commit into
mainfrom
use-devops-feed-for-publish-check-clean

Conversation

@chidozieononiwu

Copy link
Copy Markdown
Member

This pull request updates the way the script checks if a package version is published to npm. Instead of directly querying the npm registry via HTTP, it now uses the npm view CLI command, which respects the user's npm configuration and registry settings.

Improvements to package publication check:

  • The isPackagePublished function in filter-unpublished-packages.ts now uses npm view via execAsync to check for published versions, ensuring compatibility with custom or private registries and aligning with user npm configuration.
  • The old implementation using a direct HTTP request to https://registry.npmjs.org/ was removed, reducing manual error handling and potential mismatches with npm settings.
  • Error handling was improved to only warn on non-404 errors, making the output less noisy and more accurate.

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@azure-sdk-automation

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension


// Check if the specific version exists in the versions object
return data.versions && version in data.versions;
await execAsync(`npm view "${name}@${version}" version --json`, { encoding: "utf8" });

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.

Hhm I think this is not a solution, with the quarantine it might think some are not published even though they are. The whole purpose of this is to workaround the garbage of esrp not giving any info on what was published so we can figure out how other things are published

@chidozieononiwu
chidozieononiwu force-pushed the use-devops-feed-for-publish-check-clean branch from 390c239 to abbdba0 Compare August 1, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants