debug
debug copied to clipboard
Update ReadMe with info about usage in new environments
From https://github.com/debug-js/debug/issues/786#issuecomment-1059397551 Requested by @jimmywarting and @Qix-
This removes difficult to use ES5 conventions and prepares us for v5. As someone who started using Node after ES6 with ESM as much as possible, the code and the readme was hard to read.
ps your issue template is 5 years old and not particularly relevant today.
there is quite many more chains of require calls in the readme
there is quite many more chains of require calls in the readme
do you have merge access?
there is quite many more chains of require calls in the readme
do you have merge access?
no
ps your issue template is 5 years old and not particularly relevant today.
You're right, I'll remove it. Thanks for the reminder :) The issue template about trash comments is also no longer relevant now that Github removed its "how to Github" courses that referred to this repository for some reason, encouraging people to post nonsense comments and issues.
As for the changes, it's all good, but you're missing the http
import now. If you add it I'll merge this, though fair warning it won't show up on npm's site, just the repository for now, as it requires a release to do so, which is more of a religious ritual than it is a simple process given the fallout whenever a release for debug
is cut.
Sorted. Sorry, I made the original PR in a rush to check for a pulse when destructuring Debug was causing unexpected results. I was intentionally making it as small and easy to merge as possible, just to see if anyone was here.
I came back here after I saw this https://feathersjs.com/guides/migrating.html#debugging
Anyways I added a note or two about ESM. I tested it using esmoduleinterop
on and off.
https://stackblitz.com/edit/pr-debug-pseudo-esm?file=tsconfig.node.json,vite.config.ts&terminal=dev
I could have used the far more minimal vite.new/vanilla-ts but old habits die hard.