• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

palcarazm / bootstrap5-toggle / 39146254923
95%
v5: 95%

Build:
Build:
LAST BUILD BRANCH: develop/5.6.0
DEFAULT BRANCH: v5
Ran 18 Oct 2026 04:43PM UTC
Jobs 2
Files 7
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Oct 2026 04:42PM UTC coverage: 95.202% (-0.02%) from 95.217%
39146254923

push

github

web-flow
feat: integrate component-lifecycle library into Toggle component (#371)

* feat: integrate component-lifecycle library into Toggle component

Refactor Toggle to extend Component<"toggle"> from component-lifecycle,
replacing the manual eventsBound flag and destroy() method with the
library's deterministic state machine (idle → initialized → attached ↔
disposed → destroyed). This adds automatic lifecycle event emission
(toggle:initialized, toggle:attached, toggle:disposed,
toggle:destroyed), state introspection (isAttached, isDisposed,
isDestroyed, isInitialized), and typed domain events via
ExtendableEventMap.

Lifecycle hooks (doInit, doAttach, doDispose, doDestroy) replace the
inline constructor setup. The lifecycle is kicked off by the ECMAS and
jQuery entry points with init().then(attach) to preserve the
auto-initialization path via [data-toggle="toggle"]. rerender() now
routes through dispose() then attach(), preserving instance identity
while emitting lifecycle events.

component-lifecycle is bundled into the UMD builds and externalized as
a runtime dependency for the ESM/CJS dist builds.

Implements #317

BREAKING CHANGE: on() and off() instance methods renamed to toggleOn()
and toggleOff() to avoid collision with Component's event subscription
API. The public element.bootstrapToggle("on") / ("off") wrapper API is
unchanged.

BREAKING CHANGE: destroy() and rerender() now return Promise<void>.
Callers must await the result to ensure teardown or rebuild completion
before reinitializing.

BREAKING CHANGE: constructing a Toggle no longer starts the lifecycle.
Consumers using the class directly must call await toggle.init() then
await toggle.attach(). Auto-initialization via element.bootstrapToggle()
or [data-toggle="toggle"] continues to work via the fire-and-forget
chain in the entry points.

BREAKING CHANGE: interceptInputProperties() runs asynchronously during
attach(). External input property changes (checked, disabled, readOnly,
indeterminate)... (continued)

391 of 428 branches covered (91.36%)

Branch coverage included in aggregate %.

24 of 25 new or added lines in 1 file covered. (96.0%)

482 of 489 relevant lines covered (98.57%)

110.4 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.04
-0.05% src/main/ts/BootstrapToggle.ts
Jobs
ID Job ID Ran Files Coverage
1 coverage-report-24.x - 39146254923.1 18 Oct 2026 04:43PM UTC 14
96.34
GitHub Action Run
2 coverage-report-22.x - 39146254923.2 18 Oct 2026 04:43PM UTC 14
96.34
GitHub Action Run
Source Files on build 39146254923
  • Tree
  • List 7
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #39146254923
  • af7c8500 on github
  • Prev Build on develop/5.5.0 (#34584339788)
  • Next Build on develop/5.5.0 (#39949851226)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc