From 0f655448f611c8480f775ca96450ad24213e069a Mon Sep 17 00:00:00 2001 From: Jose Felix Date: Fri, 20 Feb 2026 17:29:40 -0400 Subject: [PATCH] chore: update version to 2.0.0, set access to public, and mark example package as private --- .changeset/config.json | 4 ++-- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ example/package.json | 1 + package.json | 3 ++- pnpm-lock.yaml | 6 +++--- pnpm-workspace.yaml | 1 + 6 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.changeset/config.json b/.changeset/config.json index ad6f18a..2d6176a 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,8 +4,8 @@ "commit": false, "fixed": [], "linked": [], - "access": "restricted", + "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": ["example"] } diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8bc848f --- /dev/null +++ b/CHANGELOG.md @@ -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`). diff --git a/example/package.json b/example/package.json index 9d02668..f08fe80 100644 --- a/example/package.json +++ b/example/package.json @@ -2,6 +2,7 @@ "name": "example", "version": "1.0.0", "license": "MIT", + "private": true, "scripts": { "start": "parcel index.html", "build": "parcel build index.html" diff --git a/package.json b/package.json index d17feee..c72d1e6 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e832ea..406b082 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,13 +8,13 @@ importers: .: dependencies: - '@changesets/cli': - specifier: ^2.29.8 - version: 2.29.8 '@react-spring/web': specifier: ^10.0.3 version: 10.0.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) devDependencies: + '@changesets/cli': + specifier: ^2.29.8 + version: 2.29.8 '@types/jest': specifier: ^24.9.1 version: 24.9.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0ba2243..79f9817 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: + - . - example