Release v1.0.0 🎉
We are thrilled to announce the first major release of mapbox-gl-compare-enhanced, a refined and powerful version of the original library! 🚀 This release introduces significant updates, including a fully refactored codebase, enhanced testing, improved build processes, and updated documentation.
Highlights of v1.0.0
🚀 Refactored codebase
- The
Compareclass has been rewritten with modern JavaScript, leveraging ES modules and Vite for streamlined bundling. - Enhanced maintainability and performance with refined internal methods.
- Event handling is now powered by
eventemitter3, ensuring robust and reliable custom event management. - Dependency management has been simplified for easier integration.
🧪 Testing overhaul
- Introduced
puppeteerfor comprehensive end-to-end testing of map interactions. - New tests ensure accurate clipping, zoom, pitch, bearing synchronization, and slider behavior.
- Verified and validated the new
removemethod to ensure proper cleanup of resources.
📦 Improved build process
- Migrated to Vite for faster builds and modern tooling.
- The library is now built in multiple formats (UMD, ESModule) for broad compatibility.
mapbox-glhas been excluded from the bundle, reducing package size and making it a peer dependency.
⚠️ Breaking changes
- Requires Node.js 22.11.0 as the minimum supported version.
mapbox-glmust be installed separately as a peer dependency.- A container element is now mandatory for initialization and interaction.
🔧 Continuous integration updates
- Deprecated
circle.ymlhas been removed. - Added
.circleci/config.ymlwith updated workflows for compatibility with modern CircleCI pipelines.
📚 Documentation and examples
- Refreshed and expanded
README.mdwith detailed usage instructions and modern examples. - Updated
API.mdto reflect all methods and options for theCompareclass. - Examples in the
example/folder have been updated to showcase the latest functionality. - All changes and updates are documented in the changelog for full transparency.
🚀 How to upgrade
- Update your Node.js version to at least 22.11.0.
- Install
mapbox-glseparately:npm install mapbox-gl
- Install the library:
npm install mapbox-gl-compare-enhanced
- Update your imports:
import Compare from 'mapbox-gl-compare-enhanced';
🙌 Thank you!
This release wouldn't have been possible without the amazing feedback from the developer community and the original contributors. We hope this enhanced version helps you build more intuitive and powerful map-based applications.
For a full list of changes, check the [CHANGELOG.md](https://github.com/TahicheMena/mapbox-gl-compare-enhanced/blob/main/CHANGELOG.md).