Skip to content

Support latest svelte versions #897

@jangxyz

Description

@jangxyz

Description

Svelte 5 is out, but I noticed it's been a while since the @egjs/svelte-flicking package kept on support. It's latest compatible svelte version in package.json is "^3.39.0", which is quite old if you consider svelte 4 was released on June, 2023.

It currently shows the following error:

Error
error during build:
[vite-plugin-svelte] [plugin vite-plugin-svelte] node_modules/@egjs/svelte-flicking/lib/flicking.svelte (6:24): node_modules/@egjs/svelte-flicking/lib/flicking.svelte:6:24 `p` has already been declared
file: /home/qo5ip4we0aj4vrkeetv8swp3pbyxe1-fmt4/node_modules/@egjs/svelte-flicking/lib/flicking.svelte:6:24

 4 |          t[p] = s[p];
 5 |      if (s != null && typeof Object.getOwnPropertySymbols === "function")
 6 |          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                               ^
 7 |              if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
 8 |                  t[p[i]] = s[p[i]];

The error itself seems simple -- svelte compiler catching duplicate p variable declarations. I have not looked into it any deeper.

To be clear, it was already not working even before svelte 5 was out. The typical "install and import" scenario didn't work, and I had to "copy all the source code into a separate directory", and use the code as it was my own source code. That did work.

Steps to check or reproduce

Here's a link to sveltelab with the basic code, from the Quick Start docs: https://www.sveltelab.dev/npxbmf2i342958j

Metadata

Metadata

Assignees

Labels

🔖4.xv4.x~ related issue📦Svelte@egjs/svelte-flicking related issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions