Skip to content

Commit 6ac8b47

Browse files
Copilotjaviercn
andcommitted
Add package-lock.json restoration to fix remaining build pollution
Co-authored-by: javiercn <[email protected]>
1 parent 89cb5e2 commit 6ac8b47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

eng/Npm.Workspace.nodeproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,17 @@
7373
</Target>
7474

7575
<Target Name="RestorePackageJsonFiles" AfterTargets="Build;Pack">
76-
<Message Text="Restoring package.json files from backups..." Importance="high" />
76+
<Message Text="Restoring package.json files and package-lock.json from backups..." Importance="high" />
7777
<ItemGroup>
7878
<PackageJsonBackupFiles Include="$(RepoRoot)**/*.json.bak" />
7979
</ItemGroup>
8080
<Move SourceFiles="@(PackageJsonBackupFiles)"
8181
DestinationFiles="@(PackageJsonBackupFiles -> Replace('.bak', ''))"
8282
Condition="@(PackageJsonBackupFiles) != ''" />
83+
<!-- Restore package-lock.json from git if it was modified -->
84+
<Exec Command="git checkout -- package-lock.json"
85+
WorkingDirectory="$(RepoRoot)"
86+
ContinueOnError="true" />
8387
</Target>
8488

8589
<!-- Import Directory.Build.targets -->

0 commit comments

Comments
 (0)