10000 fix: formatting for text nodes by manuel3108 · Pull Request #128 · xeho91/js-ast · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: formatting for text nodes #128

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

manuel3108
Copy link
Collaborator

I currently have no clue at the codebase, thus decided to add some failing tests in the meantime. Happy to work on it if you give me a few hints.
Noticed while trying to include svelte-ast-print into sv for a POC

@github-actions github-actions bot added tests Add or improve existing tests pkg:svelte-ast-print labels May 18, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Manuel <30698007+manuel3108@users.noreply.github.com>
Copy link
changeset-bot bot commented May 18, 2025

🦋 Changeset detected

Latest commit: e5fb9ef

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

This PR includes changesets to release 1 package
Name Type
svelte-ast-print 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

@github-actions github-actions bot added the internals Changes only affect the internal API label Jun 1, 2025
Copy link
codecov bot commented Jun 1, 2025

Codecov Report

Attention: Patch coverage is 93.02326% with 6 lines in your changes missing coverage. Please review.

Project coverage is 96.91%. Comparing base (1a904f4) to head (e5fb9ef).

Files with missing lines Patch % Lines
packages/svelte-ast-print/src/template/root.ts 84.21% 6 Missing ⚠️
Additional details and impacted files
Components Coverage Δ
js-ast-analyze ∅ <ø> (∅)
js-ast-build ∅ <ø> (∅)
svelte-ast-analyze ∅ <ø> (∅)
svelte-ast-build ∅ <ø> (∅)
svelte-ast-print 96.91% <93.02%> (-0.48%) ⬇️
ts-ast-analyze ∅ <ø> (∅)
ts-ast-build ∅ <ø> (∅)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
pkg-pr-new bot commented Jun 1, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/xeho91/js-ast/svelte-ast-print@128

commit: e5fb9ef

Copy link
Contributor
github-actions bot commented Jun 1, 2025
PR Preview Action v1.6.1

🚀 View preview at
https://xeho91.github.io/js-ast/docs/pr-preview/pr-128/

Built to branch gh-pages at 2025-06-01 10:25 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@xeho91 xeho91 marked this pull request as ready for review June 1, 2025 10:22
`;
const node = parse_and_extract<AST.Fragment>(code, "Fragment");
expect(printFragment(node).code).toMatchInlineSnapshot(`
"{#snippet template({ children, ...args }: Args<typeof Story>, context: StoryContext<typeof Story>)}
"
Copy link
Owner

Choose a reason for hiding this comment

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

Intentional. I'm not touching whitespace characters if we're to use printFragment() directly.

It's only being removed from the printRoot() and above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Changes only affect the internal API pkg:svelte-ast-print tests Add or improve existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0