Skip to content

New core tags: <do>, <log>, <debug> #2209

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 9 commits into from
Apr 18, 2024
Merged

New core tags: <do>, <log>, <debug> #2209

merged 9 commits into from
Apr 18, 2024

Conversation

LuLaValva
Copy link
Member

  • <do>: Run code in the render phase
  • <log>: Log to the console
  • <debug>: Make a debug statement

@LuLaValva LuLaValva requested a review from DylanPiercey April 15, 2024 23:13
Copy link

changeset-bot bot commented Apr 15, 2024

⚠️ No Changeset found

Latest commit: 5211b87

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

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 78.87931% with 49 lines in your changes are missing coverage. Please review.

Project coverage is 87.28%. Comparing base (ae53dc1) to head (5e1f63c).

❗ Current head 5e1f63c differs from pull request most recent head 5211b87. Consider uploading reports for the commit 5211b87 to get more accurate results

Files Patch % Lines
packages/translator-tags/src/core/do.ts 74.07% 21 Missing ⚠️
packages/translator-tags/src/core/log.ts 78.68% 13 Missing ⚠️
packages/translator-tags/src/core/debug.ts 84.00% 8 Missing ⚠️
packages/translator-tags/src/core/effect.ts 60.00% 4 Missing ⚠️
...ages/translator-tags/src/core/condition/else-if.ts 50.00% 1 Missing ⚠️
packages/translator-tags/src/core/const.ts 88.88% 1 Missing ⚠️
packages/translator-tags/src/core/return.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2209      +/-   ##
==========================================
- Coverage   87.33%   87.28%   -0.06%     
==========================================
  Files         326      329       +3     
  Lines       32151    32349     +198     
  Branches     1619     1642      +23     
==========================================
+ Hits        28080    28236     +156     
- Misses       4056     4098      +42     
  Partials       15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@svallory
Copy link

Quick question: will Marko allow me to override these tags if I want to?

@LuLaValva
Copy link
Member Author

Will Marko allow me to override these tags if I want to?

Probably not.

I don't think we've 100% settled on the order that tags are discovered yet, but iirc this is what we are currently thinking:

Native tag > Core Tag > Local Variable > Custom Tag

@DylanPiercey
Copy link
Contributor

Note @svallory these tags only apply to marko 6 fyi. I think we'll likely maintain a similar behavior where you can override built-in tags but I think the verdicts still out before we hit beta.

@svallory
Copy link

svallory commented Apr 16, 2024

Note @svallory these tags only apply to marko 6 fyi. I think we'll likely maintain a similar behavior where you can override built-in tags but I think the verdicts still out before we hit beta.

Yeah, I knew that was Marko 6 only :) I've been following the PRs to get some inside knowledge.

The reason I asked is because I think those tag names may be going a bit too much into user land. Or at least something belonging to a standard library that is opt-in.

I can definitely see myself wanting to write a , or tag that uses a specific library under the hood

@LuLaValva LuLaValva merged commit c8970e0 into main Apr 18, 2024
7 checks passed
@LuLaValva LuLaValva deleted the do-log-debug branch April 18, 2024 17:28
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