✅ ChangeLog:
Dependencies
- Update all dev dependencies to the latest version
- Remove unused/redundant dependencies
- Regenerate yarn.lock
Docs
- Update License copyright year to 2023
- Fix License copyright name
Refactor
- Minor code cleanup
- Remove redundant
isSSR
check inside theuseEffect
hook - Cleanup examples, remove unused imports
- Add missing
prepublishOnly
script
Types
- Add missing TS types
- Fixed some problematic TS types
- Swap
any
withunknown
where possible - Add stricter template requirements for the
useResizeDetector
hook - Add export of
ResizeDetectorProps
anduseResizeDetectorProps
types in the root
Eslint + Prettier
- Add proper Eslint + Prettier setup
- Remove redundant
.vscode
prettier config - Remove redundant formatting rules inside
.eslintrc
- Add formatting and linting related scripts to
package.json
:prettier
- run Prettier formatting on all files,lint
- run Eslint linting on all files,lint-fix
- run Eslint linting on all files and fix all auto-fixable problems,fix
- run both Prettier + Eslint
- Run prettier + eslint fix for all files, fix eslint errors and warnings
Rollup v3
- Update to Rollup v3
- Update plugins config:
rollup-plugin-typescript2
=>@rollup/plugin-typescript
rollup-plugin-node-externals
added
⚠️ Breaking Changes:
- Generated TS types inside the
build
folder moved to thetypes
folder - Remove the deprecated
withPolyfill.d.ts
file ComponentsProps
=>ResizeDetectorProps
patchResizeHandlerType
=>PatchedResizeObserverCallback
- If both
handleWidth
andhandleHeight
are turned off,ResizeObserver
andresizeCallback
won't be created