Use IgnoreStandardErrorWarningFormat more extensively in Npm.Common.targets (#24682)
This is a possible fix for the 'Waiting for the other yarn instance to finish' error that appears during our CI builds This property is configured in [CSharp.Common.props](https://github.com/dotnet/aspnetcore/blob/master/eng/targets/CSharp.Common.props#L57-L61) but not the NPM one. However it is used in exactly one place in the [targets](https://github.com/dotnet/aspnetcore/blob/master/eng/targets/Npm.Common.targets#L45) This change updates the target to use it more consistently and to declare it it in the props file
This commit is contained in:
parent
a196a6a0db
commit
39f18c0f14
|
|
@ -5,4 +5,10 @@
|
|||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<PackOnBuild>false</PackOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Properties to control how we handle warnings when using the tasks provided by the Yarn MSBuild SDK -->
|
||||
<PropertyGroup>
|
||||
<IgnoreYarnWarnings>false</IgnoreYarnWarnings>
|
||||
<IgnoreYarnWarnings Condition="'$(ContinuousIntegrationBuild)' == 'true'">true</IgnoreYarnWarnings>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
DependsOnTargets="GetBuildInputCacheFile"
|
||||
Inputs="@(TSFiles);$(BaseIntermediateOutputPath)tsfiles.cache"
|
||||
Outputs="@(BuildOutputFiles)">
|
||||
<Yarn Command="$(NpmBuildArgs)" StandardOutputImportance="High" StandardErrorImportance="High" />
|
||||
<Yarn Command="$(NpmBuildArgs)" StandardOutputImportance="High" StandardErrorImportance="High" IgnoreStandardErrorWarningFormat="$(IgnoreYarnWarnings)" />
|
||||
<WriteLinesToFile Overwrite="true" File="$(BaseIntermediateOutputPath)build-sentinel" />
|
||||
</Target>
|
||||
|
||||
|
|
@ -102,9 +102,9 @@
|
|||
|
||||
<Copy SourceFiles="$(PackageJson)" DestinationFiles="$(_BackupPackageJson)" />
|
||||
|
||||
<Yarn Command="version --no-git-tag-version --new-version $(PackageVersion)" />
|
||||
<Yarn Command="version --no-git-tag-version --new-version $(PackageVersion)" IgnoreStandardErrorWarningFormat="$(IgnoreYarnWarnings)" />
|
||||
<Exec Command="node "$(MSBuildThisFileDirectory)..\scripts\update-packagejson-links.js" "$(PackageJson)" $(PackageVersion)" />
|
||||
<Yarn Command="pack --filename $(PackageFileName)" />
|
||||
<Yarn Command="pack --filename $(PackageFileName)" IgnoreStandardErrorWarningFormat="$(IgnoreYarnWarnings)" />
|
||||
|
||||
<Move SourceFiles="$(_PackageTargetPath)" DestinationFolder="$(PackageOutputPath)" />
|
||||
<Message Importance="High" Text="$(MSBuildProjectName) -> $(_PackageTargetPath)" />
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
<Target Name="Test" Condition="'$(IsTestProject)' == 'true' AND '$(SkipTests)' != 'true'">
|
||||
<Telemetry EventName="NETCORE_ENGINEERING_TELEMETRY" EventData="Category=Test" />
|
||||
<Message Importance="High" Text="Running npm tests for $(MSBuildProjectName)" />
|
||||
<Yarn Command="$(NpmTestArgs)" StandardOutputImportance="High" StandardErrorImportance="High" />
|
||||
<Yarn Command="$(NpmTestArgs)" StandardOutputImportance="High" StandardErrorImportance="High" IgnoreStandardErrorWarningFormat="$(IgnoreYarnWarnings)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue