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

fix: don't wrap template literals with a function call inside in a si… #7390

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

Varixo
Copy link
Member

@Varixo Varixo commented Mar 2, 2025

No description provided.

@Varixo Varixo self-assigned this Mar 2, 2025
@Varixo Varixo requested a review from a team as a code owner March 2, 2025 20:18
Copy link

changeset-bot bot commented Mar 2, 2025

🦋 Changeset detected

Latest commit: abc7732

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@qwik.dev/core Patch
eslint-plugin-qwik Patch
@qwik.dev/react Patch
@qwik.dev/router Patch
create-qwik Patch

Not sure what this means? Click here to learn what changesets are.

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

@Varixo Varixo requested a review from Copilot March 2, 2025 20:18
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR fixes an issue where template literals inside signals are incorrectly wrapped with a function call. Key changes include:

  • Adding a new test case (should_not_wrap_var_template_string) to ensure template literals are not wrapped.
  • Updating the transform logic to bypass wrapping for both function call and template literal expressions.
  • Updating the changeset file to document the bug fix.

Reviewed Changes

File Description
packages/qwik/src/optimizer/core/src/test.rs Adds a test to verify that template literals are not wrapped.
packages/qwik/src/optimizer/core/src/transform.rs Updates logic to bypass wrapping for template literals.
.changeset/chilly-fans-shave.md Documents the patch release with updated messaging.

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

@Varixo Varixo force-pushed the v2-var-template-strings branch from f7ff000 to dd9730b Compare March 2, 2025 20:20
@Varixo Varixo force-pushed the v2-var-template-strings branch from dd9730b to abc7732 Compare March 2, 2025 20:21
Copy link

pkg-pr-new bot commented Mar 2, 2025

Open in Stackblitz

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@7390
npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@7390
npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@7390
npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@7390

commit: 2b4eac0

Copy link
Contributor

github-actions bot commented Mar 2, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview abc7732

@wmertens
Copy link
Member

wmertens commented Mar 3, 2025

I think this breaks #6585 again

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wmertens wmertens enabled auto-merge March 3, 2025 19:01
@wmertens wmertens merged commit 9a27bb7 into build/v2 Mar 3, 2025
17 checks passed
@wmertens wmertens deleted the v2-var-template-strings branch March 3, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants