-
Notifications
You must be signed in to change notification settings - Fork 182
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
Fixs for svelte4 #574
base: master
Are you sure you want to change the base?
Fixs for svelte4 #574
Conversation
splimter
commented
Oct 9, 2023
- Fixing Modal
- Fixing the .d.ts files
When I do
Looks like this PR needs a |
Still getting error after the 3 commits above. When I
|
Hi @LoopControl thank you for checking our work. |
Hello @LoopControl please disregard my last message, and try again. |
svelte4fix.js
Outdated
@@ -0,0 +1,49 @@ | |||
const { readdirSync, readFileSync, writeFileSync } = require("fs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't need to check this file in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@splimter just curious if you were aware of svelte-migrate
which should migrate types. Was there something missing from it or a bug or anything like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @benmccann unfortunately no i was not aware of svelte-migrate
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@splimter do we need to consider svelte-migrate or is the necessary work already done?
Thanks!
Thanks for this!! |
@splimter I think the peer dependency version also needs to be updated in package.json? Right now only v3 is added:
Most likely it needs to be updated the same as the dev dependency?
|
Update package.json peer deps Svelte 4.0.5
Thank you @milansimek ! @splimter I have merged the pull request against our main PR. Kindly let me know if there is any known issues left on this front. (e..g upgrading any other dependencies) |
package.json
Outdated
@@ -31,7 +31,7 @@ | |||
"version": "npm run dist && npm run docs && git add -A" | |||
}, | |||
"peerDependencies": { | |||
"svelte": "^3.53.1" | |||
"svelte": "^3.53.1 || ^4.0.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should leave support for Svelte 3 here. The type definitions are now using Svelte 4 types, which I don't think would be compatible. So this would only be compatible with Svelte 3 for users who aren't doing type checking. Also, there's no reason to require Svelte 4.0.5. Using any of the prior 4.x versions would be fine
"svelte": "^3.53.1 || ^4.0.5" | |
"svelte": "^4.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benmccann Good point regarding removing Svelte 3 support 👍
package.json
Outdated
@@ -84,9 +84,9 @@ | |||
"rollup-plugin-terser": "^7.0.2", | |||
"sirv-cli": "^1.0.12", | |||
"standard-version": "^9.3.0", | |||
"svelte": "3.53.1", | |||
"svelte": "^3.53.1 || ^4.0.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can let users install a wider range of dependencies in peerDependencies
, but it probably makes sense for us to test against a more specific version
"svelte": "^3.53.1 || ^4.0.5", | |
"svelte": "^4.0.5", |
Hmm. It looks like this project doesn't run the CI against PRs. Can you update the file in the
I suspect this PR will need some changes to avoid breaking the tests, but I can't tell if they're passing or not until we run them |
Hello @benmccann |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This PR looks good to me now. I'd still recommend making the change I suggested earlier to when the GitHub workflow is triggered
Thanks for the work on this PR! Just my first Svelte project so I have no clue how to debug this further. I just copied the example Modal from the docs :) |
hi @wilmardo thanks for the feedback, please make sure that the toggle prop is on both Modal and ModalHeader, lemme know if that did solve your issue. |
# Conflicts: # dist/sveltestrap.es.js # dist/sveltestrap.es.js.map # dist/sveltestrap.js # dist/sveltestrap.js.map # package-lock.json # package.json
Can confirm this works on my current project. |
I've tested this PR from our Sveltekit (Svelte4) project and there is no issue related to both modal and offcanvas. |
Hi, how long this PR will be merged? The modal is currently not working. I cannot use sveltestrap with Svelte 4 on cloud CI/CD. |
Hello @vdp641 , what is the issue that you are facing with the modal. |
@splimter hi, in the current version of sveltestrap, with Svelte 4, that does not fix the issue with global transition in |