geostyler / geostyler-legend

Small library to render map legends with OpenLayers and d3
BSD 2-Clause "Simplified" License
12 stars 9 forks source link

Support OpenLayers 7 #401

Closed raitisbe closed 1 year ago

raitisbe commented 1 year ago

Bug

Describe the bug Could we please have a geostyler-legend version which supports OL 7 too (same as geostyler-openlayers-parser)? Otherwise we have to run npm ci with --force option

To Reproduce Steps to reproduce the behavior:

  1. Have geostyler-openlayers-parser ^4.0.0 in project dependencies which supports ol7
  2. Have geostyler-legend (latest is 2.2.0) in deps
  3. npm ci
  4. See error
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE could not resolve
    npm ERR! 
    npm ERR! While resolving: geostyler-legend@2.2.0
    npm ERR! Found: ol@7.1.0
    npm ERR! node_modules/ol
    npm ERR!   ol@"^6.15.1, ^7.1.0" from the root project
    npm ERR!   peer ol@"^7.1.0" from geostyler-openlayers-parser@4.0.0
    npm ERR!   node_modules/geostyler-openlayers-parser
    npm ERR!     geostyler-openlayers-parser@"^3.2.0, ^4.0.0" from the root project
    npm ERR!   2 more (ol-ext, ol-popup)
    npm ERR! 
    npm ERR! Could not resolve dependency:
    npm ERR! peer ol@"^6.5.0" from geostyler-legend@2.2.0
    npm ERR! node_modules/geostyler-legend
    npm ERR!   geostyler-legend@"^2.2.0" from the root project
    npm ERR! 
    npm ERR! Conflicting peer dependency: ol@6.15.1
    npm ERR! node_modules/ol
    npm ERR!   peer ol@"^6.5.0" from geostyler-legend@2.2.0
    npm ERR!   node_modules/geostyler-legend
    npm ERR!     geostyler-legend@"^2.2.0" from the root project
    npm ERR! 
    npm ERR! Fix the upstream dependency conflict, or retry

Expected behavior npm i should install without --force

Desktop (please complete the following information): Not relevant

Additional context