unjs / unenv

๐Ÿ•Š๏ธ Convert javaScript code to be runtime agnostic
MIT License
342 stars 18 forks source link

feat(node:process): add additional polyfill coverage for process #185

Closed jculvey closed 1 month ago

jculvey commented 1 month ago

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

Adds additional polyfill coverage for process.

๐Ÿ“ Checklist

jculvey commented 1 month ago

@pi0 please let me know if there's a better way to go about stubbing these or if there's anything here you like to see polyfilled differently.

pi0 commented 1 month ago

Thanks dear @jculvey for nice work on it.

One generic suggestion, if possible, can you try to refactor process assignments into one object assignment? v8 engine does not likes object reshaping (adding props) also it might help to prevent typos like https://github.com/unjs/unenv/pull/185#discussion_r1602241525