Skip to content

Sync eng/common directory with azure-sdk-tools for PR 14343#26114

Merged
chidozieononiwu merged 1 commit intomainfrom
sync-eng/common-AllowNpmJSAccess-14343
Mar 4, 2026
Merged

Sync eng/common directory with azure-sdk-tools for PR 14343#26114
chidozieononiwu merged 1 commit intomainfrom
sync-eng/common-AllowNpmJSAccess-14343

Conversation

@azure-sdk
Copy link
Copy Markdown
Collaborator

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#14343 See eng/common workflow

@azure-sdk azure-sdk requested a review from a team as a code owner March 4, 2026 22:26
@azure-sdk azure-sdk added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Mar 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Syncs eng/common pipeline templates with updates from azure-sdk-tools PR 14343, specifically adjusting the npm publish job behavior when targeting the public npmjs registry.

Changes:

  • Adds a pre-publish step (npmjs-only) to delete a repository .npmrc so publishing uses the default npmjs registry.

Comment on lines +78 to +85
$npmrcPath = "$(System.DefaultWorkingDirectory)/.npmrc"
if (Test-Path $npmrcPath) {
Remove-Item -Path $npmrcPath -Force
Write-Host "Deleted $npmrcPath to use default npmjs registry."
} else {
Write-Host "No repo .npmrc found at $npmrcPath."
}
pwsh: true
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

Remove-Item failures can be non-terminating in PowerShell, so this step may still succeed even if .npmrc couldn't be removed (e.g., permission/locked file), potentially leaving npm configured to publish/query against the wrong registry. Consider making deletion a hard failure when the file exists (e.g., -ErrorAction Stop / $ErrorActionPreference='Stop' with a clear error message).

Copilot uses AI. Check for mistakes.
@azure-sdk azure-sdk force-pushed the sync-eng/common-AllowNpmJSAccess-14343 branch from b556b4f to d9f5c93 Compare March 4, 2026 22:41
@chidozieononiwu chidozieononiwu merged commit 48f1c5d into main Mar 4, 2026
12 checks passed
@chidozieononiwu chidozieononiwu deleted the sync-eng/common-AllowNpmJSAccess-14343 branch March 4, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants