Skip to content

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

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#6984
chidozieononiwu merged 1 commit intomainfrom
sync-eng/common-AllowNpmJSAccess-14343

Conversation

@azure-sdk
Copy link
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
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 the shared eng/common Azure Pipelines npm publishing job with the corresponding change from azure-sdk-tools PR 14343, aiming to ensure npm publishing/verification uses the intended public npm registry behavior.

Changes:

  • Adds a step (when publishing to https://registry.npmjs.org/) to delete a repo-level .npmrc before running ESRP publishing.

Comment on lines +73 to +86
- task: PowerShell@2
displayName: 'Delete repo .npmrc'
inputs:
targetType: inline
script: |
$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.

Deleting the repo-level .npmrc mutates the checked-out sources and can also remove unrelated npm settings (e.g., proxy/strict-ssl) that might be required for network access on some agents. A more deterministic approach is to leave the file alone and force npm view (in the tag verification step) to use ${{ parameters.Registry }} via --registry or NPM_CONFIG_REGISTRY, so the job always queries npmjs regardless of any .npmrc in the repo/workspace.

Suggested change
- task: PowerShell@2
displayName: 'Delete repo .npmrc'
inputs:
targetType: inline
script: |
$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

Copilot uses AI. Check for mistakes.
@azure-sdk azure-sdk force-pushed the sync-eng/common-AllowNpmJSAccess-14343 branch from 2c1d047 to ac75fd4 Compare March 4, 2026 22:41
@chidozieononiwu chidozieononiwu merged commit 1158d44 into main Mar 4, 2026
21 of 44 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