Bladeren bron

[Infrastructure] Updated npm package cache 2024-07-15 (#56802)

* Clear npm cache on each update

* Set Node-Externals to main to avoid merge conflicts

* Add a warning about merging Node-Externals PR before the main PR can get merged

* Updated npm package cache 2024-07-15
Javier Calvarro Nelson 1 jaar geleden
bovenliggende
commit
44ab8a64ec
3 gewijzigde bestanden met toevoegingen van 186 en 74 verwijderingen
  1. 9 2
      eng/scripts/update-npm-dependencies.ps1
  2. 176 71
      package-lock.json
  3. 1 1
      src/submodules/Node-Externals

+ 9 - 2
eng/scripts/update-npm-dependencies.ps1

@@ -3,7 +3,8 @@
 
 param (
     [switch]$WhatIf,
-    [switch]$SkipPullRequestCreation
+    [switch]$SkipPullRequestCreation,
+    [switch]$SkipClearCache
 )
 
 $ErrorActionPreference = "Stop"
@@ -20,6 +21,12 @@ if (-not $WhatIf) {
     Remove-Item .\package-lock.json
 }
 
+if (-not $SkipClearCache -and -not $WhatIf) {
+    Write-Host "Clearing the npm cache"
+    Remove-Item -Recurse -Force "$PWD/src/submodules/Node-Externals/cache"
+    New-Item -ItemType Directory -Path "$PWD/src/submodules/Node-Externals/cache"
+}
+
 try {
     Get-Command vsts-npm-auth -CommandType ExternalScript
     Write-Host "vsts-npm-auth is already installed"
@@ -97,7 +104,7 @@ else {
     git branch --set-upstream-to=origin/main
     git push origin $branchName`:$branchName --force;
     gh repo set-default dotnet/Node-Externals
-    gh pr create --base main --head "infrastructure/update-npm-package-cache-$(Get-Date -Format 'yyyy-MM-dd')" --title "[Infrastructure] Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" --body ""
+    gh pr create --base main --head "infrastructure/update-npm-package-cache-$(Get-Date -Format 'yyyy-MM-dd')" --title "[Infrastructure] Updated npm package cache $(Get-Date -Format 'yyyy-MM-dd')" --body "Do not merge this PR until the one in aspnetcore passes all checks."
 }
 
 ## Navigate to the root of the repository

File diff suppressed because it is too large
+ 176 - 71
package-lock.json


+ 1 - 1
src/submodules/Node-Externals

@@ -1 +1 @@
-Subproject commit a1b1b1bb01630a6109adf5767d9a2770c6dc5639
+Subproject commit eb33ea21fa1013d5e97951725e9d5c52c5a6a026

Some files were not shown because too many files changed in this diff