Skip to content

Modernize reagent-karma-example; drop devcards - #15

Merged
olecve merged 2 commits into
mainfrom
chore/update-example
Jul 16, 2026
Merged

Modernize reagent-karma-example; drop devcards#15
olecve merged 2 commits into
mainfrom
chore/update-example

Conversation

@olecve

@olecve olecve commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Brings the examples/reagent-karma-example subproject up to the current toolchain and library. It had drifted badly (reagent 0.8.1, react 16, @testing-library/react 12, shadow-cljs 2.25, library 0.0.11-SNAPSHOT).

Version bumps

  • library 0.0.11-SNAPSHOT0.0.20, reagent 0.8.12.0.1, react 1619, @testing-library/react 1216, @testing-library/dom10, shadow-cljs 2.253.4.11, clj-kondo → 2025.10.23.

Fixes required by the bumps

  • app.core: reagent.core/render was removed in Reagent 1.0 → switched to reagent.dom.client create-root/render (React 18+ API).
  • Added an 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/cljsjs.react.dom requires.
  • hello-test: wrapped clicks in render/act (React 18/19 batching) and fixed query-by-role to pass {:name #"…"} instead of a bare regex as the options arg.
  • Dropped create-react-class (only needed by Reagent 0.8).

Dropped devcards (per decision): removed 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.

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, and shadow-cljs compile app all clean. Karma and e2e need a real browser and were not run here.

olecve added 2 commits July 16, 2026 11:13
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).
@olecve
olecve merged commit 40d68ff into main Jul 16, 2026
2 checks passed
@olecve
olecve deleted the chore/update-example branch July 16, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant