Skip to content

Commit 7c9ed1f

Browse files
Add npmrc to generate artifact for doc.ms
1 parent 1111039 commit 7c9ed1f

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

eng/common/scripts/tests/Verify-Links.Tests.ps1

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ BeforeAll {
77
# We source the script file and then override Invoke-RestMethod / Invoke-WebRequest
88
# inside each test via Mock so no real network calls are made.
99

10-
# Stub out logging functions that the script depends on but are defined in logging.ps1
11-
function LogWarning($msg) { Write-Warning $msg }
12-
function LogError($msg) { Write-Error $msg }
13-
function LogGroupStart($msg) {}
14-
function LogGroupEnd {}
10+
# Load shared logging functions used by Verify-Links.ps1
11+
. (Resolve-Path "$PSScriptRoot/../logging.ps1").Path
1512

1613
# Source only the function definitions (stop before the script-body runs)
1714
# by dot-sourcing within a script block that replaces the parameter-driven
@@ -140,7 +137,7 @@ Describe "ProcessNpmLink" {
140137
}
141138

142139
It "Returns false when the specific version does not exist in upstream" {
143-
$result = ProcessNpmLink ([System.Uri]"https://www.npmjs.com/package/@azure/ai-agents/v/9.9.9")
140+
$result = ProcessNpmLink ([System.Uri]"https://www.npmjs.com/package/@azure/ai-agents/v/9999.9.9")
144141
$result | Should -Be $false
145142
}
146143
}
@@ -162,7 +159,7 @@ Describe "ProcessNpmLink" {
162159
}
163160

164161
It "Returns false when unscoped versioned package version is missing" {
165-
$result = ProcessNpmLink ([System.Uri]"https://www.npmjs.com/package/typescript/v/99.0.0")
162+
$result = ProcessNpmLink ([System.Uri]"https://www.npmjs.com/package/typescript/v/9999.0.0")
166163
$result | Should -Be $false
167164
}
168165
}

eng/pipelines/templates/jobs/archetype-sdk-client.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ jobs:
282282
ignoreLASTEXITCODE: true
283283
pwsh: true
284284
displayName: Generate ${{ artifact.Name }} artifacts for docs.ms
285+
env:
286+
npm_config_userconfig: "$(Agent.TempDirectory)/generate-release/.npmrc"
285287

286288
- task: Powershell@2
287289
inputs:

0 commit comments

Comments
 (0)