Build and verify the History client's assets in CI - #1093
Merged
Merged
Conversation
uSync.History has no MSBuild target that builds its npm client automatically, unlike uSync.Backoffice.Management.Client - wwwroot is gitignored, so packaging silently used whatever (if anything) was already on disk. Add explicit npm ci/build steps before every restore/pack that touches uSync.History, and a Windows job that packs it standalone and verifies each generated asset made it into the nupkg unmodified (catches missing, empty, truncated or stale chunks). Ports the intent of v17's #1091, adapted to v18's current workflow shape (global.json/lts-node conventions, no SHA pins). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uSync.Historyhas no MSBuild target that builds its npm client automatically, unlikeuSync.Backoffice.Management.Client—wwwrootis gitignored, so packaging (and the PR build job) silently used whatever (if anything) already happened to be on disk instead of a fresh build.npm ci/npm run buildsteps foruSync.History/history-clientbefore every restore/pack step that touches it (dotnet-build.yml,prerelease.yml,release.yml).history-packagejob todotnet-build.ymlthat packsuSync.Historystandalone and verifies every generated asset made it into the.nupkgunmodified (catches missing, empty, truncated, or stale chunks) via a SHA-256 comparison.Ports the intent of v17's #1091 ("fix(history): build client assets before packaging" + the Windows packaged-asset smoke check), adapted to v18's current workflow shape (
global.json/lts/*node conventions, tag-pinned actions matching the rest of the file rather than v17's SHA pins for that job).Part 1 of bringing v18's and v17's CI workflows back in step — v18 has independently modernized other parts of these files (action pins,
global.jsondotnet pinning, MSBuild-integrated client build, restore config fix, docs paths-ignore, nightly versioning scheme) that haven't been ported back to v17 yet; that's tracked separately as a v17-side PR.Test plan
npm ci && npm run buildinuSync.History/history-client— produceswwwroot/App_Plugins/uSync.History/history.jsand chunksdotnet pack ./uSync.History/uSync.History.csproj -c Release ...— nupkg containsstaticwebassets/App_Plugins/uSync.History/*matching the built assetsdotnet restore ./uSync.slnx --locked-mode -p:Configuration=Release— succeedsdotnet build ./uSync.slnx -c Release --no-restore -p:ContinuousIntegrationBuild=true— succeeds, 0 errors🤖 Generated with Claude Code