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

v4.0 rc - import plugin utils, e.g xast.js #2030

Open
vltansky opened this issue Jun 10, 2024 · 4 comments
Open

v4.0 rc - import plugin utils, e.g xast.js #2030

vltansky opened this issue Jun 10, 2024 · 4 comments
Labels

Comments

@vltansky
Copy link
Contributor

Hi, i tried to update to v4.0rc version, i have some custom plugins - i'm importing
import { querySelector, querySelectorAll } from 'svgo/lib/xast.js';
couldn't find the way in 4.0rc to import it

@vltansky vltansky added the bug label Jun 10, 2024
@SethFalco
Copy link
Member

SethFalco commented Jun 10, 2024

Thanks for trying the release candidate! Helps a lot to get feedback like this before the official release. 🙏🏽

This makes sense. I actually didn't export utilities on purpose to treat them as internal API only, but we can make a few exceptions for instances like these, I overlooked custom plugins.

I'll look into it this week!

By any chance, is your project/plugin open-source or source-accessible? I'm writing draft PRs to help projects migrate to SVGO v4 which gives me more exposure to how it's used and what problems people may encounter. No problem if not, but it could be nice to have the context to help me decide if anything else needs to be adjusted. Otherwise, once v4.0.0-rc.1 is out, just let me know if you have any other issues. 👍🏽

@vltansky
Copy link
Contributor Author

My project isn't open source, but I can share plugins with you privately for context if you are interested.
my mail [email protected]
We also importing types like XastElement, XastRoot, XastChild from svgo/lib/types
and import _collections from 'svgo/plugins/_collections';

i actually just migrated our plugins from svgo 2 to 3, so i'll be available during the 4 release candidates iterations so it will be easier for us to migrate :)

@SethFalco
Copy link
Member

My project isn't open source, but I can share plugins with you privately for context if you are interested

Normally I'm very open for users to share files with me, (SVGs, SVGO configs, or how they're using SVGO), but in this case we'll set it aside as I don't want me seeing the plugins to impact what I feel I can personally contribute to this repository, or the potential disputes if I ever implement similar ideas.

Thanks for offering, though! <3

i'll be available during the 4 release candidates iterations so it will be easier for us to migrate :)

If you happen to notice any other objects/types from SVGO that you import, feel free to update me. Meanwhile, once v4.0.0-rc.1 is out (this weekend hopefully), you can also just say if you encounter any other problems.

@vltansky
Copy link
Contributor Author

We actually would be happy to open source plugins, just most of them are very specific for our use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants