-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Background
I’m using assertions in micromark. It’s a complex parser using state machines. It’s also extendable with plugins. So assertions makes it much easier to reason about.
I’m using an export map to differentiate between code that does have assertions, and code that doesn’t: https://github.com/micromark/micromark/blob/a03a08ce677b91a2960be2f4fcaacd64b3b8ec18/packages/micromark/package.json#L55-L58. Most people will get unasserted files. With node --conditions development, code with assertions is loaded. This is very useful when making plugins.
Problem
- However, some browser bundlers (Vite, webpack), don’t load
assertnormally. While users can configure their bundlers, micromark is often used through many other packages, and I’d rather have everything just work by default power-assertcontains tons of code and also doesn’t bundle well in at least webpack.
Solution
- I could either create a new, small, typed
assertlibrary, or perhaps use something likeuvu/assert - Is
unassertinterested in adding support for more libraries, and if so, what are the requirements?
I can do the work on adding one.
/cc @twada
Related-to: micromark/micromark#87, micromark/micromark#95.
twada
Metadata
Metadata
Assignees
Labels
No labels