From 5d2dedc452447205301ea3149452463e559e443d Mon Sep 17 00:00:00 2001 From: MarkStega Date: Wed, 24 Jan 2024 16:19:08 -0500 Subject: [PATCH 1/2] Add new GHA yml files to 5.0.2 in attempt to compute accurate 5.0.2 SHA (#1223) * Add new GHA yml files to 5.0.2 * SHA512 -> SHA256 * Really change GHA scripts * Compute base64 hash * Remove extraneous quotes * Change Get-Content parameters * AsByteStream Raw --- .github/workflows/GithubActionsRelease.yml | 6 ++++++ .github/workflows/GithubActionsWIP.yml | 5 +++++ ComputeSHA.ps1 | 10 ++++++++++ Material.Blazor.MD3/package-lock.json | 8 ++++---- Material.Blazor.MD3/package.json | 2 +- .../Material.Blazor.Website.Server.MD3.csproj | 16 ++++++++++++++++ Material.Blazor.sln | 1 + 7 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 ComputeSHA.ps1 diff --git a/.github/workflows/GithubActionsRelease.yml b/.github/workflows/GithubActionsRelease.yml index dfa11d6e3..15c7ca70e 100644 --- a/.github/workflows/GithubActionsRelease.yml +++ b/.github/workflows/GithubActionsRelease.yml @@ -23,6 +23,7 @@ env: projectTest: 'Material.Blazor.Test/Material.Blazor.Test.csproj' projectWeb: 'Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj' + materialBlazorMD3LibModule: 'Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js' outputDocFxMD3: ${{github.workspace}}\siteDocFxMD3 outputMBMD3: ${{github.workspace}}\siteMBMD3 outputWebMD3: ${{github.workspace}}\siteWebMD3 @@ -404,3 +405,8 @@ jobs: -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json + - name: Compute the SHA256 hash of material.blazor.md3.lib.module.js + shell: pwsh + run: | + .\computesha.ps1 ${{env.materialBlazorMD3LibModule}} + diff --git a/.github/workflows/GithubActionsWIP.yml b/.github/workflows/GithubActionsWIP.yml index e1dc2ce0f..0677a0418 100644 --- a/.github/workflows/GithubActionsWIP.yml +++ b/.github/workflows/GithubActionsWIP.yml @@ -17,6 +17,7 @@ env: projectTest: 'Material.Blazor.Test/Material.Blazor.Test.csproj' projectWeb: 'Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj' + materialBlazorMD3LibModule: 'Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js' outputDocFxMD3: ${{github.workspace}}\siteDocFxMD3 outputMBMD3: ${{github.workspace}}/siteMBMD3 outputWebMD3: ${{github.workspace}}/siteWebMD3 @@ -546,6 +547,10 @@ jobs: - name: Display MaterialBlazor package output Ꙫ run: dir ${{env.outputMBMD3}} + - name: Compute the SHA256 hash of material.blazor.md3.lib.module.js + shell: pwsh + run: | + .\computesha.ps1 ${{env.materialBlazorMD3LibModule}} ############################################################################################################ # deployghpages-mbcurrent diff --git a/ComputeSHA.ps1 b/ComputeSHA.ps1 new file mode 100644 index 000000000..71a13a3d0 --- /dev/null +++ b/ComputeSHA.ps1 @@ -0,0 +1,10 @@ +param( + [Parameter(Mandatory=$True, + ValueFromPipeline=$True)] + $filePath +) + +$hasher = [System.Security.Cryptography.SHA256]::Create() +$content = Get-Content -Path $filePath -AsByteStream -Raw +$hash = [System.Convert]::ToBase64String($hasher.ComputeHash($content)) +Write-Output ($filePath.ToString() + ": " + $hash) \ No newline at end of file diff --git a/Material.Blazor.MD3/package-lock.json b/Material.Blazor.MD3/package-lock.json index 611657425..cd9e09705 100644 --- a/Material.Blazor.MD3/package-lock.json +++ b/Material.Blazor.MD3/package-lock.json @@ -16,7 +16,7 @@ "@babel/plugin-transform-runtime": "^7.23.7", "@babel/preset-env": "^7.23.8", "@babel/preset-typescript": "^7.23.3", - "@material/web": "^1.1.2-nightly.6efc904.0", + "@material/web": "^1.1.2-nightly.a3b2be8.0", "babel-loader": "^9.1.3", "fork-ts-checker-webpack-plugin": "^9.0.2", "material-components-web": "14.0.0", @@ -2679,9 +2679,9 @@ } }, "node_modules/@material/web": { - "version": "1.1.2-nightly.cef1b74.0", - "resolved": "https://registry.npmjs.org/@material/web/-/web-1.1.2-nightly.cef1b74.0.tgz", - "integrity": "sha512-pTprwiP/YHm0s/kmcL1FcXqeUjNt94KzCNFjZNuN3IDTQWpmIqSYae7RxZKPhMi9PXjlqASYXguv6Q/aR26XKA==", + "version": "1.1.2-nightly.a3b2be8.0", + "resolved": "https://registry.npmjs.org/@material/web/-/web-1.1.2-nightly.a3b2be8.0.tgz", + "integrity": "sha512-9bkVNsERX3UiJSX3V/NDGs9djK4g8kN/XiZalR+MkLLKLzL7PhtcCI3orHRnIB2DQeraw8euHDdMUdLz3JU+rg==", "dev": true, "dependencies": { "lit": "^2.7.4 || ^3.0.0", diff --git a/Material.Blazor.MD3/package.json b/Material.Blazor.MD3/package.json index c6bf163e9..e26673087 100644 --- a/Material.Blazor.MD3/package.json +++ b/Material.Blazor.MD3/package.json @@ -26,7 +26,7 @@ "@babel/plugin-transform-runtime": "^7.23.7", "@babel/preset-env": "^7.23.8", "@babel/preset-typescript": "^7.23.3", - "@material/web": "^1.1.2-nightly.6efc904.0", + "@material/web": "^1.1.2-nightly.a3b2be8.0", "babel-loader": "^9.1.3", "fork-ts-checker-webpack-plugin": "^9.0.2", "material-components-web": "14.0.0", diff --git a/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj b/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj index baada977a..0e8a66634 100644 --- a/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj +++ b/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj @@ -21,4 +21,20 @@ + + + diff --git a/Material.Blazor.sln b/Material.Blazor.sln index 68464442e..4937829b5 100644 --- a/Material.Blazor.sln +++ b/Material.Blazor.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio .gitignore = .gitignore CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md ctag.cmd = ctag.cmd + ComputeSHA.ps1 = ComputeSHA.ps1 .github\dependabot.yml = .github\dependabot.yml Directory.Build.props = Directory.Build.props filterConfig.yml = filterConfig.yml From 2d0f5d70c896bdadef726fed4e430b04b29e0de0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:36:44 +0000 Subject: [PATCH 2/2] Bump @babel/plugin-transform-runtime in /Material.Blazor Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.7 to 7.23.9. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.9/packages/babel-plugin-transform-runtime) --- updated-dependencies: - dependency-name: "@babel/plugin-transform-runtime" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Material.Blazor/package-lock.json | 91 ++++++++++++++++++++++++++----- Material.Blazor/package.json | 2 +- 2 files changed, 77 insertions(+), 16 deletions(-) diff --git a/Material.Blazor/package-lock.json b/Material.Blazor/package-lock.json index 5040a9c46..9d1038edc 100644 --- a/Material.Blazor/package-lock.json +++ b/Material.Blazor/package-lock.json @@ -13,7 +13,7 @@ "@babel/core": "^7.23.7", "@babel/plugin-transform-class-properties": "^7.23.3", "@babel/plugin-transform-object-rest-spread": "^7.23.4", - "@babel/plugin-transform-runtime": "^7.23.7", + "@babel/plugin-transform-runtime": "^7.23.9", "@babel/preset-env": "^7.23.8", "@babel/preset-typescript": "^7.23.3", "babel-loader": "^9.1.3", @@ -1441,16 +1441,16 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.7.tgz", - "integrity": "sha512-fa0hnfmiXc9fq/weK34MUV0drz2pOL/vfKWvN7Qw127hiUPabFCUMgAbYWcchRzMJit4o5ARsK/s+5h0249pLw==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.9.tgz", + "integrity": "sha512-A7clW3a0aSjm3ONU9o2HAILSegJCYlEZmOhmBRReVtIpY/Z/p7yIZ+wR41Z+UipwdGuqwtID/V/dOdZXjwi9gQ==", "dev": true, "dependencies": { "@babel/helper-module-imports": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.7", - "babel-plugin-polyfill-corejs3": "^0.8.7", - "babel-plugin-polyfill-regenerator": "^0.5.4", + "babel-plugin-polyfill-corejs2": "^0.4.8", + "babel-plugin-polyfill-corejs3": "^0.9.0", + "babel-plugin-polyfill-regenerator": "^0.5.5", "semver": "^6.3.1" }, "engines": { @@ -1460,6 +1460,35 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-runtime/node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/plugin-transform-runtime/node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz", + "integrity": "sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.5.0", + "core-js-compat": "^3.34.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.23.3", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz", @@ -3027,19 +3056,35 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.7.tgz", - "integrity": "sha512-LidDk/tEGDfuHW2DWh/Hgo4rmnw3cduK6ZkOI1NPFceSK3n/yAGeOsNT7FLnSGHkXj3RHGSEVkN3FsCTY6w2CQ==", + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.8.tgz", + "integrity": "sha512-OtIuQfafSzpo/LhnJaykc0R/MMnuLSSVjVYy9mHArIZ9qTCSZ6TpWCuEKZYVoN//t8HqBNScHrOtCrIK5IaGLg==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.4.4", + "@babel/helper-define-polyfill-provider": "^0.5.0", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, "node_modules/babel-plugin-polyfill-corejs3": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz", @@ -3054,12 +3099,28 @@ } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.4.tgz", - "integrity": "sha512-S/x2iOCvDaCASLYsOOgWOq4bCfKYVqvO/uxjkaYyZ3rVsVE3CeAI/c84NpyuBBymEgNvHgjEot3a9/Z/kXvqsg==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz", + "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.4" + "@babel/helper-define-polyfill-provider": "^0.5.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator/node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" diff --git a/Material.Blazor/package.json b/Material.Blazor/package.json index 6923661c3..8ef45b3d3 100644 --- a/Material.Blazor/package.json +++ b/Material.Blazor/package.json @@ -25,7 +25,7 @@ "@babel/core": "^7.23.7", "@babel/plugin-transform-class-properties": "^7.23.3", "@babel/plugin-transform-object-rest-spread": "^7.23.4", - "@babel/plugin-transform-runtime": "^7.23.7", + "@babel/plugin-transform-runtime": "^7.23.9", "@babel/preset-env": "^7.23.8", "@babel/preset-typescript": "^7.23.3", "babel-loader": "^9.1.3",