Repository navigation
feat(ci): Fail frontend checks when vendored JS changes without its README - #8120
Open
geographybuff wants to merge 3 commits into
Open
geographybuff wants to merge 3 commits into
geographybuff wants to merge 3 commits into
Conversation
…EADME Adds check_vendored_js_readme to .github/scripts/frontend_checks.py. When upstream files in js/third_party/ or js/alpine/ change and that directory's README.md doesn't, the job fails with FAIL severity. Our own code in js/alpine/components/ and js/alpine/composables/ is ignored. main() now also records the old side of a rename, so moving a file into or out of a vendored directory counts, and runs this check even when no template or CSS file changed. frontend-lint.yml now triggers on the two vendored directories. Refs freelawproject#8062 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Renames flatpickr@4.6.13(.min).js and plugins/confirmDate@4.6.13(.min).js to flatpickr(.min).js and plugins/confirmDate(.min).js, matching the other third-party files, and updates the three require_script call sites so a future upgrade doesn't have to touch them. js/third_party/README.md is not updated in this commit, so the new vendored-JS check should fail here. Refs freelawproject#8062 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rty README Adds a flatpickr section to js/third_party/README.md, following the htmx one, with the version and the CDN URL of each vendored file. This makes the vendored-JS check pass again. Fixes freelawproject#8062 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
geographybuff
marked this pull request as ready for review
October 8, 2026 12:34
Contributor
Author
|
Pushed the second commit ( |
Contributor
Author
|
The second commit failed Frontend Checks as expected (run 37778321331): |
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.
Fixes
Fixes: #8062
Summary
This PR adds the check the issue describes, then renames flatpickr's files and records it in the README. The commits follow the order the issue suggests, so CI shows the check working:
f1c2b00).check_vendored_js_readmein.github/scripts/frontend_checks.pyfails the job (FAIL) when upstream files injs/third_party/orjs/alpine/change but that directory'sREADME.mddoesn't.js/alpine/components/andjs/alpine/composables/are ignored. Each directory needs its own README change.main()now also records the old side of anRline in--name-status, so moving a file into or out of a vendored directory counts. It also runs this check when no template or CSS file changed; until now it returned early in that case. Copies (C) leave their source untouched, so only their new path counts.frontend-lint.ymlnow also triggers onjs/third_party/**andjs/alpine/**.test_frontend_checks.py, three of them throughmain()with real--name-statusinput.pytest .github/scriptspasses 27 tests. Ruff (v0.14.11) check and format are clean. Pyrefly reports the same two existing errors in these files before and after.flatpickr@4.6.13(.min).jsandplugins/confirmDate@4.6.13(.min).jsdrop the version from their names, and the threerequire_scriptcall sites are updated (corpus_search/date_selector×2,docket_filter×1). This commit should make the frontend checks fail.js/third_party/README.md, following the htmx one, makes the check pass again.On the README's sources: I compared the vendored files with jsDelivr's
flatpickr@4.6.13copies.flatpickr.min.jsis byte-identical.cl/.prettierrc.js(apart from whitespace on two blank lines), so they were reformatted, not modified. The README says so.confirmDate.min.jsdiffers only in jsDelivr's "Minified by jsDelivr using Terser v5.x" comment.The flatpickr stylesheet in
css/third_party/is out of scope, so it isn't touched.Documentation
Once merged, the following documentation needs to be updated:
Deployment
This PR should:
skip-deploy(skips everything below)skip-web-deployskip-celery-deployskip-cronjob-deployskip-daemon-deployThe renamed static files and the two templates are served by the web tier, so only web needs to deploy.
AI Disclosure
AI model used: Claude Opus 5.5 (via Claude Code). It wrote the check, the tests and the README section, and ran the tests.
🤖 Generated with Claude Code