3 ms·
The problem is that Bun currently treats every file as an ESM module, which means everything uses strict mode but Node-RED relies on sloppy mode features like i
by Jarred 4y ago
The problem is that Bun currently treats every file as an ESM module, which means everything uses strict mode but Node-RED relies on sloppy mode features like implicit global variables (if you omit "var", "let", or "const" in sloppy mode, variables are assigned to globalThis). Many of the other things with sloppy mode are handled by Bun's builtin transpiler (such as legacy octal literals), but this one is harder to do
- rcarmo 4y agoYes, I figured it would be something like that. I don’t have the bandwidth to even attempt to clean that up and submit a PR to Node-RED (I have no clue as to how many files I’d need to wade through, only hacked red.js a little to figure out what was going on), but it is something I rely on and where moving away from NodeJS would be beneficial - besides being a great showcase for performance improvements.
- fennecfoxy 4y agoEslint the hecky out of it