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

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

Build:
Build:
LAST BUILD BRANCH: develop/1.1.0
DEFAULT BRANCH: v1
Ran 19 Apr 2026 10:12AM UTC
Jobs 2
Files 17
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

19 Apr 2026 10:11AM UTC coverage: 97.418% (-1.4%) from 98.859%
24626658570

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

262 of 275 branches covered (95.27%)

Branch coverage included in aggregate %.

40 of 40 new or added lines in 1 file covered. (100.0%)

304 of 306 relevant lines covered (99.35%)

125.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 coverage-report-22.x - 24626658570.1 19 Apr 2026 10:12AM UTC 34
98.01
GitHub Action Run
2 coverage-report-24.x - 24626658570.2 19 Apr 2026 10:12AM UTC 34
98.01
GitHub Action Run
Source Files on build 24626658570
  • Tree
  • List 17
  • Changed 14
  • Source Changed 1
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #24626658570
  • 25a41fd8 on github
  • Prev Build on develop/1.1.0 (#24213314183)
  • Next Build on develop/1.1.0 (#24925958790)
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