You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a group of folks from https://e18e.dev that are going around the ecosystem and swapping out heavy libraries for lighter ones. It seems like it'd be great to switch some libraries to use nanotar to reduce their dependencies. However, the two APIs are fairly different making it somewhat difficult to do it in a bunch of places and get people to quickly adopt nanotar.
E.g. the first instance I went to look at was tar.extract({ file: tarball, cwd: to, strip: 1, onentry: filter_func }) and it's not super obvious how to swap it for nanotar.parseTar(data).
A few things that might help here to accelerate that:
node condition in the exports map of package.json that provides some node-specific functionality to do things like reading the contents given a filename
If you have suggestions to make API of nanotar more DX friendly (without adding to it's complexity, bundle size hugely and runtime dependency) please feel free to open discussions i am certainly willing to hear them 👍🏼
Depending on runtime-specific APIs and mimicking the bigger alternatives is not a goal of this project. (otherwise we will eventually be them). What I would suggest, is that you might find it useful to make a wrapper library that adds functionalities such as file-system support by export conditions to make it a more obvious replacement for tar/tar-fs.
(i have some future plans re fs support but it can take time)
Describe the feature
There are a group of folks from https://e18e.dev that are going around the ecosystem and swapping out heavy libraries for lighter ones. It seems like it'd be great to switch some libraries to use
nanotar
to reduce their dependencies. However, the two APIs are fairly different making it somewhat difficult to do it in a bunch of places and get people to quickly adoptnanotar
.E.g. the first instance I went to look at was
tar.extract({ file: tarball, cwd: to, strip: 1, onentry: filter_func })
and it's not super obvious how to swap it fornanotar.parseTar(data)
.A few things that might help here to accelerate that:
node
condition in theexports
map ofpackage.json
that provides some node-specific functionality to do things like reading the contents given a filenametar
. If you think it doesn't make sense to add here, a page could be added in https://github.com/es-tooling/module-replacements/tree/main/docs/modules with some detailsAdditional information
The text was updated successfully, but these errors were encountered: