Skip to content

chore(Changesets): Versioning package(s) #113

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 1 commit into from
May 1, 2025
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 7, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Major Changes

@xeho91 xeho91 linked an issue Feb 7, 2025 that may be closed by this pull request
59 tasks
@github-actions github-actions bot force-pushed the changeset-release/main branch 2 times, most recently from 8012ae6 to 56d7091 Compare February 12, 2025 08:43
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.58%. Comparing base (f9f8edb) to head (be1479e).

Additional details and impacted files
Components Coverage Δ
js-ast-analyze ∅ <ø> (∅)
js-ast-build ∅ <ø> (∅)
svelte-ast-analyze ∅ <ø> (∅)
svelte-ast-build ∅ <ø> (∅)
svelte-ast-print 87.58% <ø> (ø)
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
Contributor Author

github-actions bot commented Feb 12, 2025

PR Preview Action v1.6.1

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

Built to branch gh-pages at 2025-04-15 07:59 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

pkg-pr-new bot commented Feb 12, 2025

Open in StackBlitz

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

commit: be1479e

@github-actions github-actions bot force-pushed the changeset-release/main branch 2 times, most recently from d8cab64 to b319d0e Compare February 12, 2025 09:06
@github-actions github-actions bot force-pushed the changeset-release/main branch from b319d0e to 35bb652 Compare February 12, 2025 09:11
@github-actions github-actions bot force-pushed the changeset-release/main branch 3 times, most recently from bc0df6e to 13f9e27 Compare February 14, 2025 13:34
@github-actions github-actions bot force-pushed the changeset-release/main branch 8 times, most recently from 4b7f30d to ad84c95 Compare February 23, 2025 02:56
@manuel3108
Copy link
Collaborator

Is there any reason this has not been released? I'm currently prototyping for the sv cli, and the separate print function would be largely beneficial for this. (My current idea is to drop a bunch of dependencies and do all manipulations based on the svelte compiler and this awesome project.)

Also, i did try to use the preview releases, but I always get this error

Cannot find module 'D:\svelte-cli-svelte-ast-print-mvp\node_modules\.pnpm\svelte-ast-build@https+++pk_57ca5000c720269d3d8eaee4126b0280\node_modules\svelte-ast-build\src\_shared' imported from D:\svelte-cli-svelte-ast-print-mvp\node_modules\.pnpm\svelte-ast-build@https+++pk_57ca5000c720269d3d8eaee4126b0280\node_modules\svelte-ast-build\src\script.js

But maybe i'm doing something wrong on my end.

@xeho91
Copy link
Owner

xeho91 commented Apr 14, 2025

RE @manuel3108

Is there any reason this has not been released? I'm currently prototyping for the sv cli, and the separate print function would be largely beneficial for this. (My current idea is to drop a bunch of dependencies and do all manipulations based on the svelte compiler and this awesome project.)

Also, i did try to use the preview releases, but I always get this error

Cannot find module 'D:\svelte-cli-svelte-ast-print-mvp\node_modules\.pnpm\svelte-ast-build@https+++pk_57ca5000c720269d3d8eaee4126b0280\node_modules\svelte-ast-build\src\_shared' imported from D:\svelte-cli-svelte-ast-print-mvp\node_modules\.pnpm\svelte-ast-build@https+++pk_57ca5000c720269d3d8eaee4126b0280\node_modules\svelte-ast-build\src\script.js

But maybe i'm doing something wrong on my end.

No, you're not doing anything wrong. Pardon my absent-mindedness. 🙏
What happened is that while I was experimenting around to improve the package, I did more than necessary. In the meantime, I started a new job, so my priorities completely shifted.

I did a quick clean-up of the current progress, but I need one or two more days to finish.
As for now, I've managed to bring into a state where svelte-ast-print doesn't depend on any WIP packages from this repo. However, I need a time to ensure it doesn't break anything else. And that's because, despite the tests passing successfully, it doesn't give me confidence enough to do it without manual verification that it doesn't break packages which depend on it - e.g. @storybook/addon-svelte-csf.

@xeho91 xeho91 force-pushed the changeset-release/main branch from b955b1b to d34bfd6 Compare April 14, 2025 06:47
@manuel3108
Copy link
Collaborator

Hey thanks for the heads-up and invitation! This is absolutely non time critical, I'm not even sure if my idea will work out in the end. Take your time and enjoy your private live!

@github-actions github-actions bot force-pushed the changeset-release/main branch 3 times, most recently from 15982f9 to e640f32 Compare April 15, 2025 07:55
@xeho91
Copy link
Owner

xeho91 commented Apr 15, 2025

Thanks!

I think I'm getting closer to wrapping up. The latest release is in this comment.
Tomorrow I'll check if there are any issues with @storybook/addon-svelte-csf.

I'm also considering waiting until 30th April (Node.js v18 EOL), so there's no necessity to release two major versions in a short time.

@manuel3108
Copy link
Collaborator

Thanks for your work!

Looks like the published packages is basically empty. I think the build step is missing in the preview workflow.

In the meantime I tried linking everything together locally, and tried running the following code:

import { expect, test } from 'vitest';
import { parse } from 'svelte/compiler';
import { print } from 'svelte-ast-print';

test('svelte', () => {
    const code = `
    <script>
        console.log('asd');
    </script>

    <div><p>Asd</p></div>

    <style>
        p { color: red }
    </style>
    `;

    const ast = parse(code, { modern: true });

    const newCode = print(ast);

    expect(newCode).toMatchInlineSnapshot();
});

Currently I'm getting the following error:

 FAIL  parse-and-print.test.js > svelte
Error: Not implemented Root
 ❯ handle ../js-ast/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:53:9
 ❯ Module.print ../js-ast/node_modules/.pnpm/[email protected]/node_modules/esrap/src/index.js:44:2
 ❯ print_js ../js-ast/packages/svelte-ast-print/src/_internal/js.ts:15:5
 ❯ print ../js-ast/packages/svelte-ast-print/dist/lib.js:91:24
     89|         st.add(printSvelte(n, opts));
     90|     else
     91|         st.add(print_js(n, st.opts));
       |                        ^
     92|     return st.result;
     93| }
 ❯ parse-and-print.test.js:20:26

Looks like it's trying to pass the Root element down to esrap, which in this case has no idea how it should implement this unknown type. Which makes sense because

export function isSvelteOnlyNode(n: JS.BaseNode | SV.BaseNode): n is SvelteOnlyNode {
	return new Set([""]).has(n.type);
}

is basically false at all times.

LMK if i'm using the package wrong!

@github-actions github-actions bot force-pushed the changeset-release/main branch 2 times, most recently from de16fc0 to 0f28e77 Compare April 21, 2025 04:15
@github-actions github-actions bot force-pushed the changeset-release/main branch from 0f28e77 to 97c09f6 Compare April 28, 2025 03:10
@github-actions github-actions bot force-pushed the changeset-release/main branch from 97c09f6 to 75c4e8c Compare May 1, 2025 03:44
@xeho91 xeho91 merged commit 57e26bd into main May 1, 2025
3 checks passed
@xeho91 xeho91 deleted the changeset-release/main branch May 1, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue tracker for svelte-ast-print@v1
2 participants