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

palcarazm / bs-darkmode-toggle / 24626658570 / 1
97%
v1: 98%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/minor-and-patch-updates-b47236feb0
DEFAULT BRANCH: v1
Ran 19 Apr 2026 10:12AM UTC
Files 34
Run time 1s
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

19 Apr 2026 10:11AM UTC coverage: 98.007% (-1.0%) from 99.045%
24626658570.1

push

github

web-flow
feat: integrate DarkModeToggle with component-lifecycle library (#94)

Refactored DarkModeToggle to extend Component<"darkmode"> from the
component-lifecycle library, delegating lifecycle management (initialization,
attachment, disposal, destruction) to the library's deterministic state
machine. Replaces manual _destroyed flag with library-provided state queries
(isDestroyed(), isAttached(), etc.).

Changes:
- Extended Component<"darkmode"> base class with lifecycle hooks (doInit,
  doAttach, doDispose, doDestroy)
- Added static create() factory method for async initialization pattern
- Renamed private properties (options→toggleOptions, state→toggleState) to
  avoid collisions with base class
- Automatic emission of typed lifecycle events (darkmode:initialized,
  darkmode:attached, darkmode:disposed, darkmode:destroyed)
- Updated both ESM and jQuery plugin adapters to use factory with proper
  async handling via Promise.then()
- Configured Rollup with @rollup/plugin-node-resolve for proper module
  bundling

Backward compatibility maintained:
- Public API surface unchanged (toggle, light, dark, setStorageType, destroy)
- Existing darkmode:change event behavior preserved
- Auto-initialization via [data-plugin="bs-darkmode-toggle"] continues to work
- All 258 unit tests and e2e tests pass without modification

Implements #92

277 of 291 branches covered (95.19%)

Branch coverage included in aggregate %.

608 of 612 relevant lines covered (99.35%)

31.45 hits per line

Source Files on job coverage-report-22.x - 24626658570.1
  • Tree
  • List 34
  • Changed 14
  • Source Changed 1
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24626658570
  • 25a41fd8 on github
  • Prev Job for on develop/1.1.0 (#24213314183.2)
  • Next Job for on develop/1.1.0 (#24925958790.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc