Skip to content

Commit

Permalink
[release/9.0-preview7] Go back to checked-in minified .js files (#56995)
Browse files Browse the repository at this point in the history
* Go back to checked-in minified .js files

* Remove update-npm-deps script

* Remove CompareMinifiedJsFiles script

* Undo signalr changes

* Fix again

* Undo more stuff

* Try installing node

* Add update-npm-deps back

---------

Co-authored-by: wtgodbe <wigodbe@microsoft.com>
  • Loading branch information
github-actions[bot] and wtgodbe authored Jul 25, 2024
1 parent fba8bd5 commit 53be1ca
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 82 deletions.
1 change: 0 additions & 1 deletion .azure/pipelines/ci-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ stages:
$(_BuildArgs)
$(_PublishArgs)
$(_InternalRuntimeDownloadArgs)
installNodeJs: false
disableComponentGovernance: true
artifacts:
- name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt)
Expand Down
1 change: 0 additions & 1 deletion .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ extends:
$(_BuildArgs)
$(_PublishArgs)
$(_InternalRuntimeDownloadArgs)
installNodeJs: false
disableComponentGovernance: true
artifacts:
- name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt)
Expand Down
4 changes: 1 addition & 3 deletions .azure/pipelines/components-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ variables:
value: true
- name: _TeamName
value: AspNetCore
- name: npm_config_cache
value: src/submodules/Node-Externals/cache
- name: PUPPETEER_SKIP_DOWNLOAD
value: 1
- template: /eng/common/templates/variables/pool-providers.yml
Expand All @@ -45,7 +43,7 @@ jobs:
displayName: Update submodules
- script: ./restore.sh
displayName: Run restore.sh
- script: npm ci --offline
- script: npm ci
displayName: NPM install
- script: npm run build
displayName: Build JS
Expand Down
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ updates:
commit-message:
prefix: "[main] "
include: scope
ignore:
# Don't auto-update the Node-Externals submodule
- dependency-name: "src/submodules/Node-Externals"
labels:
- area-infrastructure

Expand Down
11 changes: 1 addition & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,4 @@
[submodule "src/submodules/MessagePack-CSharp"]
path = src/submodules/MessagePack-CSharp
url = https://github.com/aspnet/MessagePack-CSharp.git
branch = master
[submodule "Node-Externals"]
path = src/submodules/Node-Externals
url = https://github.com/dotnet/Node-Externals
branch = main
depth = 1
[submodule "src/submodules/BlazorMinifiedJs"]
path = src/submodules/BlazorMinifiedJs
url = https://github.com/dotnet/BlazorMinifiedJs
branch = main
branch = master
4 changes: 2 additions & 2 deletions eng/DotNetBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@

<PropertyGroup>
<!-- Disable installing puppeteer browsers when running in source build -->
<_AdditionalEnvironmentVariable Condition="$(ArcadeBuildFromSource) == 'true'">PUPPETEER_SKIP_DOWNLOAD=1;npm_config_cache=$(RepoRoot)src/submodules/Node-Externals/cache</_AdditionalEnvironmentVariable>
<_AdditionalEnvironmentVariable Condition="$(ArcadeBuildFromSource) == 'true'">PUPPETEER_SKIP_DOWNLOAD=1</_AdditionalEnvironmentVariable>
</PropertyGroup>

<Exec
Command="npm ci --offline"
Command="npm ci"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
EnvironmentVariables="$(_AdditionalEnvironmentVariable)" />

Expand Down
14 changes: 3 additions & 11 deletions eng/Npm.Workspace.nodeproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,13 @@
<ContainsFunctionalTestAssets>false</ContainsFunctionalTestAssets>
<BuildHelixPayload>false</BuildHelixPayload>
<!-- Skip puppeteer tests until https://github.com/dotnet/aspnetcore/issues/54176 is resolved -->
<_NpmAdditionalEnvironmentVariables>PUPPETEER_SKIP_DOWNLOAD=1;npm_config_cache=$(RepoRoot)src/submodules/Node-Externals/cache</_NpmAdditionalEnvironmentVariables>
<_NpmAdditionalEnvironmentVariables>PUPPETEER_SKIP_DOWNLOAD=1</_NpmAdditionalEnvironmentVariables>
</PropertyGroup>

<Target Name="_VerifyNPMCache" Condition="$(ContinuousIntegrationBuild) == 'true'" >
<Message Text="Verifying NPM cache..." Importance="high" />
<Exec
Command="npm cache verify"
WorkingDirectory="$(MSBuildThisFileDirectory).."
EnvironmentVariables="$(_NpmAdditionalEnvironmentVariables)" />
</Target>

<Target Name="Restore" DependsOnTargets="_VerifyNPMCache">
<Target Name="Restore">
<Message Text="Restoring NPM packages..." Importance="high" />
<Exec
Command="npm ci --offline"
Command="npm ci"
WorkingDirectory="$(MSBuildThisFileDirectory).."
EnvironmentVariables="$(_NpmAdditionalEnvironmentVariables)" />
</Target>
Expand Down
26 changes: 0 additions & 26 deletions eng/scripts/CompareMinifiedJsFiles.ps1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,22 @@
<Reference Include="Microsoft.Extensions.FileProviders.Embedded" />
</ItemGroup>

<Target Name="_AddEmbeddedBlazorWebJS" BeforeTargets="_CalculateEmbeddedFilesManifestInputs">
<PropertyGroup>
<BlazorWebJSFilename>blazor.web.js</BlazorWebJSFilename>
<!-- Microsoft.AspNetCore.Components.Web.JS.npmproj always capitalizes the directory name. -->
<BlazorWebJSFile Condition=" '$(Configuration)' == 'Debug' ">..\..\Web.JS\dist\Debug\$(BlazorWebJSFilename)</BlazorWebJSFile>
<BlazorWebJSFile Condition=" '$(Configuration)' != 'Debug' ">..\..\Web.JS\dist\Release\$(BlazorWebJSFilename)</BlazorWebJSFile>
</PropertyGroup>

<!-- blazor.web.js should exist after eng/Npm.Workspace.nodeproj builds. Fall back if not. -->
<Target Name="_CheckBlazorWebJSPath" AfterTargets="ResolveProjectReferences" Condition=" !EXISTS('$(BlazorWebJSFile)') ">
<Warning Text="'$(BlazorWebJSFile)' does not exist. Falling back to checked-in copy." />
<PropertyGroup>
<BlazorWebJSFilename>blazor.web.js</BlazorWebJSFilename>
<BlazorWebJSFile Condition=" '$(Configuration)' == 'Debug' ">$(MSBuildThisFileDirectory)..\..\Web.JS\dist\Debug\$(BlazorWebJSFilename)</BlazorWebJSFile>
<BlazorWebJSFile Condition=" '$(Configuration)' != 'Debug' ">$(MSBuildThisFileDirectory)..\..\Web.JS\dist\Release\$(BlazorWebJSFilename)</BlazorWebJSFile>
<BlazorWebJSFile Condition="!Exists('$(BlazorWebJSFile)') and '$(BuildNodeJS)' != 'true' ">$(RepoRoot)src\submodules\BlazorMinifiedJs\src\$(BlazorWebJSFilename)</BlazorWebJSFile>
<BlazorWebJSFile>..\..\Web.JS\dist\Release\$(BlazorWebJSFilename)</BlazorWebJSFile>
</PropertyGroup>
</Target>

<Warning Condition="!Exists('$(BlazorWebJSFile)')" Text="'$(BlazorWebJSFile)' does not exist. Ensure the JS assets have been build by running 'npm run build' from the repository root." />

<Target Name="_AddEmbeddedBlazorWebJS" AfterTargets="_CheckBlazorWebJSPath">
<ItemGroup>
<EmbeddedResource Include="$(BlazorWebJSFile)" LogicalName="_framework/$(BlazorWebJSFilename)" />
<EmbeddedResource Include="$(BlazorWebJSFile).map" LogicalName="_framework/$(BlazorWebJSFilename).map" Condition="Exists('$(BlazorWebJSFile).map')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,22 @@
<Compile Include="$(RepoRoot)src\Shared\Components\ProtectedPrerenderComponentApplicationStore.cs" />
</ItemGroup>

<Target Name="_AddEmbeddedBlazor" BeforeTargets="_CalculateEmbeddedFilesManifestInputs">
<PropertyGroup>
<BlazorServerJSFilename>blazor.server.js</BlazorServerJSFilename>
<!-- Microsoft.AspNetCore.Components.Web.JS.npmproj always capitalizes the directory name. -->
<BlazorServerJSFile Condition=" '$(Configuration)' == 'Debug' ">..\..\Web.JS\dist\Debug\$(BlazorServerJSFilename)</BlazorServerJSFile>
<BlazorServerJSFile Condition=" '$(Configuration)' != 'Debug' ">..\..\Web.JS\dist\Release\$(BlazorServerJSFilename)</BlazorServerJSFile>
</PropertyGroup>

<!-- blazor.server.js should exist after eng/Npm.Workspace.nodeproj builds. Fall back if not. -->
<Target Name="_CheckBlazorServerJSPath" AfterTargets="ResolveProjectReferences" Condition=" !EXISTS('$(BlazorServerJSFile)') ">
<Warning Text="'$(BlazorServerJSFile)' does not exist. Falling back to checked-in copy." />
<PropertyGroup>
<BlazorServerJSFilename>blazor.server.js</BlazorServerJSFilename>
<BlazorServerJSFile Condition=" '$(Configuration)' == 'Debug' ">$(MSBuildThisFileDirectory)..\..\Web.JS\dist\Debug\$(BlazorServerJSFilename)</BlazorServerJSFile>
<BlazorServerJSFile Condition=" '$(Configuration)' != 'Debug' ">$(MSBuildThisFileDirectory)..\..\Web.JS\dist\Release\$(BlazorServerJSFilename)</BlazorServerJSFile>
<BlazorServerJSFile Condition="!Exists('$(BlazorServerJSFile)') and '$(BuildNodeJS)' != 'true' ">$(RepoRoot)src\submodules\BlazorMinifiedJs\src\$(BlazorServerJSFilename)</BlazorServerJSFile>
<BlazorServerJSFile>..\..\Web.JS\dist\Release\$(BlazorServerJSFilename)</BlazorServerJSFile>
</PropertyGroup>
</Target>

<Warning Condition="!Exists('$(BlazorServerJSFile)')" Text="'$(BlazorServerJSFile)' does not exist. Ensure the JS assets have been build by running 'npm run build' from the repository root." />

<Target Name="_AddEmbeddedBlazor" AfterTargets="_CheckBlazorServerJSPath">
<ItemGroup>
<EmbeddedResource Include="$(BlazorServerJSFile)" LogicalName="_framework/$(BlazorServerJSFilename)" />
<EmbeddedResource Include="$(BlazorServerJSFile).map" LogicalName="_framework/$(BlazorServerJSFilename).map" Condition="Exists('$(BlazorServerJSFile).map')" />
Expand Down
5 changes: 3 additions & 2 deletions src/Components/Web.JS/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/
dist/
dist/Debug/
dist/Release/blazor.webassembly.js
dist/Release/blazor.webview.js
1 change: 1 addition & 0 deletions src/Components/Web.JS/dist/Release/blazor.server.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Components/Web.JS/dist/Release/blazor.web.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Components/Web.JS/dist/Release/blazor.webassembly.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Components/Web.JS/dist/Release/blazor.webview.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,22 @@

<UsingTask AssemblyFile="$(_FileProviderTaskAssembly)" TaskName="Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.GenerateEmbeddedResourcesManifest" />

<Target Name="_AddEmbeddedBlazorWebView" BeforeTargets="_CalculateEmbeddedFilesManifestInputs">
<PropertyGroup>
<BlazorWebViewJSFilename>blazor.webview.js</BlazorWebViewJSFilename>
<!-- Microsoft.AspNetCore.Components.Web.JS.npmproj always capitalizes the directory name. -->
<BlazorWebViewJSFile Condition=" '$(Configuration)' == 'Debug' ">..\..\..\Web.JS\dist\Debug\$(BlazorWebViewJSFilename)</BlazorWebViewJSFile>
<BlazorWebViewJSFile Condition=" '$(Configuration)' != 'Debug' ">..\..\..\Web.JS\dist\Release\$(BlazorWebViewJSFilename)</BlazorWebViewJSFile>
</PropertyGroup>

<!-- blazor.webview.js should exist after eng/Npm.Workspace.nodeproj builds. Fall back if not. -->
<Target Name="_CheckBlazorWebViewJSPath" AfterTargets="ResolveProjectReferences" Condition=" !EXISTS('$(BlazorWebViewJSFile)') ">
<Warning Text="'$(BlazorWebViewJSFile)' does not exist. Falling back to checked-in copy." />
<PropertyGroup>
<BlazorWebViewJSFilename>blazor.webview.js</BlazorWebViewJSFilename>
<BlazorWebViewJSFile Condition=" '$(Configuration)' == 'Debug' ">$(MSBuildThisFileDirectory)..\..\..\Web.JS\dist\Debug\$(BlazorWebViewJSFilename)</BlazorWebViewJSFile>
<BlazorWebViewJSFile Condition=" '$(Configuration)' != 'Debug' ">$(MSBuildThisFileDirectory)..\..\..\Web.JS\dist\Release\$(BlazorWebViewJSFilename)</BlazorWebViewJSFile>
<BlazorWebViewJSFile Condition="!Exists('$(BlazorWebViewJSFile)') and '$(BuildNodeJS)' != 'true' ">$(RepoRoot)src\submodules\BlazorMinifiedJs\src\$(BlazorWebViewJSFilename)</BlazorWebViewJSFile>
<BlazorWebViewJSFile>..\..\..\Web.JS\dist\Release\$(BlazorWebViewJSFilename)</BlazorWebViewJSFile>
</PropertyGroup>
</Target>

<Warning Condition="!Exists('$(BlazorWebViewJSFile)')" Text="'$(BlazorWebViewJSFile)' does not exist. Ensure the JS assets have been build by running 'npm run build' from the repository root." />

<Target Name="_AddEmbeddedBlazorWebView" BeforeTargets="_CalculateEmbeddedFilesManifestInputs" DependsOnTargets="_CheckBlazorWebViewJSPath">
<ItemGroup>
<EmbeddedResource Include="blazor.modules.json" LogicalName="_framework/blazor.modules.json" />
<EmbeddedResource Include="$(BlazorWebViewJSFile)" LogicalName="_framework/$(BlazorWebViewJSFilename)" />
Expand Down
1 change: 0 additions & 1 deletion src/submodules/BlazorMinifiedJs
Submodule BlazorMinifiedJs deleted from 4cc83c
1 change: 0 additions & 1 deletion src/submodules/Node-Externals
Submodule Node-Externals deleted from eb33ea

0 comments on commit 53be1ca

Please sign in to comment.