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

Remove @shopify/web-worker Dependency in @wordpress/upload-media #69254

Open
SmushyTaco opened this issue Feb 19, 2025 · 4 comments
Open

Remove @shopify/web-worker Dependency in @wordpress/upload-media #69254

SmushyTaco opened this issue Feb 19, 2025 · 4 comments
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Enhancement A suggestion for improvement.

Comments

@SmushyTaco
Copy link

What problem does this address?

If you go to the NPM page for @shopify/web-worker, you'll see that it's no longer being supported. Removing this package would be a good measure to future proof.

What is your proposed solution?

Replace @shopify/web-worker with comlink or with native web workers.

@SmushyTaco SmushyTaco added the [Type] Enhancement A suggestion for improvement. label Feb 19, 2025
@Mamaduka Mamaduka added the [Feature] Media Anything that impacts the experience of managing media label Feb 20, 2025
@Mamaduka
Copy link
Member

cc @swissspidy

@swissspidy
Copy link
Member

It‘s fine to remove for now since the actual web worker implementation is missing anyway, so this can be revisited later.

That said, neither comlink nor plain workers wre necessarily a good alternative. Trust me, I did a lot of research on this :-)

Another option might be to fork the package in the future.

Anyway, we can remove & revisit.

@SmushyTaco
Copy link
Author

@swissspidy could you elaborate on why comlink isn't a good alternative?

@swissspidy
Copy link
Member

Too much to rehash here, I did all the research in my media-experiments repo. For one, it is effectively unmaintained. Not to mention poorer DX and fewer features compared to the Shopify library.

FWIW, the upload-media package is still work in progress, I wouldn‘t spend time worrying about its dependencies right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants