[smoke-tests] skip overriding version for dependency not managed in this repo (#22532)

* [smoke-tests] skip overriding version for dependency not managed in this repo

`@azure/msal-node` is not managed in this repo, so we should keep the version
specified in package.json.

* Update common/smoke-test/Initialize-SmokeTests.ps1

Co-authored-by: Albert Cheng <38804567+ckairen@users.noreply.github.com>

Co-authored-by: Albert Cheng <38804567+ckairen@users.noreply.github.com>
This commit is contained in:
Jeremy Meng 2022-07-11 11:38:00 -10:00 коммит произвёл GitHub
Родитель 01c458493a
Коммит b03348a145
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -145,8 +145,10 @@ function Update-SampleDependencies {
$packageSpec = (Get-Content -Path "$($sample.SamplesDirectory)/package.json"
| ConvertFrom-Json -AsHashtable)
# some @azure/ packages are not managed in our repo thus should not be overriden
$packagesToSkip = @("@azure/msal-node")
foreach ($dep in $packageSpec.dependencies.Keys) {
if ($dep.StartsWith('@azure/')) {
if ($dep.StartsWith('@azure/') -and ($dep -notin $packagesToSkip)) {
if ($Daily) {
$dependencies[$dep] = "dev"
} elseif ($dep -in $TagOverridePackages) {