Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 4.0.0 #1753

Closed
ibilux opened this issue Jun 23, 2023 · 6 comments · Fixed by #1773
Closed

Svelte 4.0.0 #1753

ibilux opened this issue Jun 23, 2023 · 6 comments · Fixed by #1773
Assignees

Comments

@ibilux
Copy link
Contributor

ibilux commented Jun 23, 2023

A lot of components showing errors when updated svelte to version 4.0.0.

@mehallhm
Copy link

mehallhm commented Jun 24, 2023

Expanding on this - Svelte depreciated SvelteComponentTyped

The PR: sveltejs/svelte#8512

The types will need to be updated in account for this change.

Edit:
sveld will need to be updated, once that is done then the types here can be updated. Issue here

@theetrain
Copy link
Collaborator

Thanks, everyone. I'm actively working to test carbon-components-svelte with Svelte 4. It requires a bit of work:

  • upgrade dependencies and documentation to use ESM syntax
  • add Svelte ^3.20.0 || ^4.0.0 to peerDependencies
  • Update types (along with sveld)

I'll track this issue once a PR is ready.

@emehrkay
Copy link

emehrkay commented Jul 1, 2023

I know you're working on fixing this, but is it possible to tell the svelte compiler to ignore these errors in the meantime?

@TrungRueta
Copy link

I know you're working on fixing this, but is it possible to tell the svelte compiler to ignore these errors in the meantime?

I think you can temporary fix this issue with 2 things:

  1. in tsconfig.json add skipDefaultLibCheck: true and skipLibCheck: true.
  2. instance version svelte@^3 to package dependencies . npm I svelte@^3.

it can temporary disable incorrect check.

@TrungRueta
Copy link

Hi everyone, do we have any updated version to support this?
When creating a new Sveltekit project, we must re-install Svelte version 3 to bypass the issue.

metonym added a commit that referenced this issue Jul 19, 2023
Closes #1753 

The minimum Svelte version required for TypeScript users is now 3.55.
@metonym
Copy link
Collaborator

metonym commented Jul 19, 2023

This library now supports Svelte 4 for TypeScript users in v0.78.0.

The type definitions are still backward compatible with Svelte version 3; however, the minimum Svelte version is now 3.55 for TypeScript users.

For TypeScript Users using Svelte 4

If you're using Svelte 4 with the icons/pictograms packages, you must upgrade them as well:

  • Upgrade carbon-icons-svelte to version 12.1.0
  • Upgrade carbon-pictograms-svelte to version 12.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants