Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["example"]
}
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# react-toggle-dark-mode

## 2.0.0

### Major Changes

- Modernize build setup and harden DarkModeSwitch for React 16–19

### Changed
- Migrated project tooling from Yarn to pnpm.
- Updated root scripts and package metadata for pnpm-based workflows.
- Switched CI to modern GitHub Actions (`checkout@v4`, `setup-node@v4`, Node 20) and pnpm caching.
- Added a React compatibility CI matrix for React 16, 17, 18, and 19.
- Replaced `react-spring` import usage with `@react-spring/web`.
- Updated dependencies/devDependencies across root and example app (React 19, newer TypeScript/tooling).
- Modernized example app bootstrapping to `createRoot` and module script loading.
- Updated README install instructions to show pnpm usage.
- Added `.pnpm-store` to `.gitignore`.

### Improved
- Refactored `DarkModeSwitch` animation property merging to avoid mutating defaults.
- Improved prop typing (button-oriented props) and event handling in `DarkModeSwitch`.
- Improved accessibility defaults (`role="switch"`, `aria-checked`, default label behavior).
- Strengthened test suite with coverage for:
- animation-property merge behavior
- non-mutation of defaults
- accessibility attributes
- unique mask IDs across multiple component instances

### Removed
- Removed legacy Yarn lockfiles (`yarn.lock`, `example/yarn.lock`).
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "example",
"version": "1.0.0",
"license": "MIT",
"private": true,
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"packageManager": "pnpm@10.28.2",
"version": "0.3.0",
"version": "2.0.0",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"private": false,
"files": [
"dist",
"src"
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
packages:
- .
- example