eta
eta copied to clipboard
v2 Proposal
This is a proposal for a breaking change in Eta. This would pretty much be a restructure of the project, restructured enough that it would be a breaking change. Here is how it would work:
We would basically unify the codebase a little more. We would use ES2015 modules with extensions and URLs for most of our code. We would use a pattern like Yargs, where we have a folder for shims (src/platform-shims/) and we inject those shims into the main code. We would use Rollup to create a Node CJS and ESM which is shimmed with node shims, have an index.mjs which injects browser shims, and a mod.ts which injects Deno shims. We wouldn't need to create a seperate browser.ts and index.ts for server and browser side because instead inside of the browser shim we could just through an Eta error that operations that use fs are unsupported.
This would require some communication with the Deno team about changing the configuration of the project with the output directory and stuff.
In the end this will do two things:
- Allow us to fix bugs and stuff with Deno because currently we can't fix bugs and stuff with that because we just use Denoify
- More easily support browser ES (Skypack, jspm, etc)
I would love to here the thoughts of users on this!
What would exactly be the breaking change for Node.js users? Just the difference between importing browser and index variants?
@GingerAdonis Yeah, basically. This is really more of a breaking change for native browser ES (and Deno which uses that).
This sounds fantastic, and I'm excited to help make Eta even better! @gurgunday has expressed interest in helping maintain Eta as well.
@shadowtime2000 @gurgunday could you both contact me over Discord? https://discord.gg/nPEpu8qk
Eta v3 has been designed with these ideas in mind, so I'll close this now.