Skip to content

chore: leverage expressionFromString more in drizzle adder #556

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

Merged
merged 12 commits into from
May 7, 2025

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented May 3, 2025

A bit of the code here was unused. See #555

I haven't gotten a chance to test this yet, but thought I'd share my progress before I have to run for the day. Manuel thought that we might need to tweak expressionFromString to delete the Literal.raw property so that it can pick the proper quote type. I've not checked that yet and assume we'll need to update it

Copy link

changeset-bot bot commented May 3, 2025

⚠️ No Changeset found

Latest commit: ed0672b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot
Copy link

Copy link

pkg-pr-new bot commented May 3, 2025

Open in StackBlitz

npx https://pkg.pr.new/sveltejs/cli/sv@556
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@556

commit: ed0672b

@manuel3108
Copy link
Member

manuel3108 commented May 3, 2025

Made the following changes:

  • fixed the drizzle output so that the tests can run
  • for some reason, we format all test results with prettier (valid for js / html / css). This is probably a leftover from when the js block often was poorly formatted.
  • now that prettier is not run anymore, i added a failing test that Ben already mentioned in the PR description. We might be able to fix this by calling stripAst from within expressionFromString but that might be too aggressive as this will be done on all child nodes, instead as only on Literals

@benmccann benmccann force-pushed the expressionFromString branch from 8e4fc69 to 9514e24 Compare May 4, 2025 14:55
@manuel3108
Copy link
Member

No changeset, but should not be necessary here.

@manuel3108 manuel3108 merged commit e0e8b0a into main May 7, 2025
11 of 12 checks passed
@manuel3108 manuel3108 deleted the expressionFromString branch May 7, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants