Skip to content

Conversation

@STRd6
Copy link
Contributor

@STRd6 STRd6 commented Apr 4, 2022

This check has always been true since Node 0.3.0. It was added here: c4a3e17 and seems to rely on the behavior of Module#_compile from before require.extensions. If require.extensions is ever removed (it is deprecated after all) then CoffeeScript.run will no longer work. It will pass CoffeeScript source code to Module#_compile which is doomed to fail.

Browser code doesn't touch this path at all and is unaffected.

This check has always been true since Node 0.3.0. It was added here: jashkenas@c4a3e17 and seems to rely on the behavior of `Module#_compile` from before `require.extensions`. If `require.extensions` is ever removed (it is deprecated after all) then `CoffeeScript.run` will no longer work. It will pass CoffeeScript source code to `Module#_compile` which is doomed to fail. Browser code doesn't touch this path at all and is unaffected.
@STRd6
Copy link
Contributor Author

STRd6 commented Apr 4, 2022

In digging through the source mapping nitty gritty I found this small oddity. I'd prefer to split off small self contained cleanup PRs when possible so that the eventual source mapping PR isn't totally massive and coupled with indirectly related cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants