polestar
polestar copied to clipboard
Add a default fetcher
Polestar should include a default Fetcher, implemented using babel, babel-plugin-detective, and which fetches packages from unpkg.
This is a lot of code, so it should probably live in a separate package. It also makes sense to keep it separate so that you can decide on your own caching strategy.
I'm finally adding this because I just ran into an issue in my own fetcher where nested package.json files like https://unpkg.com/browse/[email protected]/removeClass/package.json don't work, and while I can fix this myself, I think it may make sense to share this code between everyone using Polestar.
cc @nickjanssen
@jamesknelson I have an open source one written in ReasonML, I can make it a separate repo if you're interested
Sure, something is better than nothing! I've got a closed source one too which I should open source, but there's a lot of code.
For something official, I think it would be nice to keep it in vanilla JS or TypeScript so that it's easier for people to contribute to.
I think it could be served as a reference implementation. Will try to separate it from my project