Modernize reagent-karma-example; drop devcards - #15
Merged
Conversation
Bring the example up to the current toolchain and library:
- Library 0.0.11-SNAPSHOT -> 0.0.20; reagent 0.8.1 -> 2.0.1; react
16 -> 19; @testing-library/react 12 -> 16; shadow-cljs 2.25 -> 3.4.11;
clj-kondo -> 2025.10.23.
- app.core: reagent.core/render was removed in Reagent 1.0; switch to
reagent.dom.client create-root/render (React 18+ API).
- Add app.test-setup preload (global-jsdom + IS_REACT_ACT_ENVIRONMENT)
so the :node-test build has a DOM; replaces the old jsdom-global and
the dead cljsjs.react requires.
- hello-test: wrap clicks in render/act (React 18/19 batching) and pass
the accessible name as {:name #"..."} instead of a bare regex.
- Drop devcards: remove the :cards build, cards.cljs / hello-cards.cljs,
the devcards/highlight.js/marked deps, the cards script, and the dead
clj-kondo :lint-as entries.
- Drop create-react-class (only needed by Reagent 0.8).
Verified locally: npm test (node), npm run lint, npm run fmt:check, and
shadow-cljs compile app all pass. Karma and e2e need a real browser and
were not run here.
New example job runs the subproject's fmt:check, lint, app compile, and node :test target so the example stops silently rotting. Karma and e2e are left out (they need a real browser).
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.
Brings the
examples/reagent-karma-examplesubproject up to the current toolchain and library. It had drifted badly (reagent 0.8.1, react 16,@testing-library/react12, shadow-cljs 2.25, library0.0.11-SNAPSHOT).Version bumps
0.0.11-SNAPSHOT→0.0.20, reagent0.8.1→2.0.1, react16→19,@testing-library/react12→16,@testing-library/dom→10, shadow-cljs2.25→3.4.11, clj-kondo →2025.10.23.Fixes required by the bumps
app.core:reagent.core/renderwas removed in Reagent 1.0 → switched toreagent.dom.clientcreate-root/render(React 18+ API).app.test-setuppreload (global-jsdom+IS_REACT_ACT_ENVIRONMENT) so the:node-testbuild has a DOM — replaces the oldjsdom-globaland the deadcljsjs.react/cljsjs.react.domrequires.hello-test: wrapped clicks inrender/act(React 18/19 batching) and fixedquery-by-roleto pass{:name #"…"}instead of a bare regex as the options arg.create-react-class(only needed by Reagent 0.8).Dropped devcards (per decision): removed the
:cardsbuild,cards.cljs/hello-cards.cljs, thedevcards/highlight.js/markeddeps, thecardsscript, and the dead clj-kondo:lint-asentries.Verification (local — the example is not part of the root CI):
npm test(node) → 3 tests / 7 assertions pass;npm run lint,npm run fmt:check, andshadow-cljs compile appall clean. Karma and e2e need a real browser and were not run here.