maptiler-geocoding-control icon indicating copy to clipboard operation
maptiler-geocoding-control copied to clipboard

Update svelte to v5

Open niderhoff opened this issue 11 months ago • 3 comments

Describe the bug

Using the default vite template to create a svelte app (as shown in the maptiler svelte tutorial) it will use svelte v5. However, this package still depends on svelte v4.

This also means that if the user tries to do the maptiler svelte tutorial and the maptiler geocoding tutorial they will run into this conflict:

npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @maptiler/[email protected]
npm warn Found: [email protected]
npm warn node_modules/svelte
npm warn   dev svelte@"^5.19.6" from the root project
npm warn   3 more (@sveltejs/vite-plugin-svelte, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional svelte@"^4.2" from @maptiler/[email protected]
npm warn node_modules/@maptiler/geocoding-control
npm warn   @maptiler/geocoding-control@"^2.1.6" from the root project
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/svelte
npm warn   peerOptional svelte@"^4.2" from @maptiler/[email protected]
npm warn   node_modules/@maptiler/geocoding-control
npm warn     @maptiler/geocoding-control@"^2.1.6" from the root project

and requires the user to do a dependency override in package.json or use --force.

To Reproduce

npm create vite my-svelte-map -- --template svelte
npm install
npm install @maptiler/sdk
npm install @maptiler/geocoding-control

Expected behavior

@maptiler/sdk and @maptiler/geocoding-control both are compatible with the same svelte version.

Screenshots

Additional context Add any other context about the problem here.

niderhoff avatar Feb 16 '25 07:02 niderhoff

Hello, sorry, for the long time to reply, we will update this soon, thanks for reporting.

petr-hajek avatar Apr 07 '25 19:04 petr-hajek

Hi @niderhoff,

At present upgrading the module from Svelte v4 to Svelte v5 involves a lot more work than planned, even with the sv codemod.

In the meantime I'd recommend sticking to Svelte v4 or simply installing with --legacy-peer-deps and using the pre-compiled vanilla module instead of the Svelte component.

The work regarding this module has been added to our backlog and will be executed when we have sufficient bandwidth.

Thankyou for flagging this! 🙏

cc @petr-hajek

lesbaa avatar May 02 '25 15:05 lesbaa

See for further info https://github.com/maptiler/maptiler-geocoding-control/pull/88

lesbaa avatar May 02 '25 15:05 lesbaa