10 ms·
Very interesting project! The source is inspiring, it seems the author has made an explicit choice to minimize dependencies. Even transpilation from ES modules
by kamilafsar 5y ago
Very interesting project!
The source is inspiring, it seems the author has made an explicit choice to minimize dependencies.
Even transpilation from ES modules into commonjs is done by the author himself:
https://github.com/porsager/postgres/blob/master/transpile.cjs#L32 https://github.com/porsager/postgres/blob/master/transpile.c...
I’m not sure if I’d made the same choice, but it’s fun the see it can work out great :)
- ttty 5y agoTbh I think this is quite risky to mess it up. Using a simple regex to convert… https://github.com/porsager/postgres/blob/master/transpile.cjs#L32 https://github.com/porsager/postgres/blob/master/transpile.c...
- Rygian 5y agoManipulating source code via regex... I wonder what could possibly go wrong.
- porsager 5y agoThe results are run through the same tests ;)
- toastercat 5y agoWith NPM being such a security nightmare everytime you rope in another dependency, and myself being a long-time user of postgres.js (and much of porsagers' other work in the Node community), I do think this was the right decision.