felixge / node-sandboxed-module

A sandboxed node.js module loader that lets you inject dependencies into your modules.
MIT License
342 stars 42 forks source link

Fix loading sources with a shebang (#!) #38

Closed maarten-t closed 9 years ago

maarten-t commented 9 years ago

Fixes loading modules of which the source starts with a shebang (#!). In line with Node's native module loader, they don't cause a syntax error anymore upon compilation. See https://github.com/joyent/node/blob/7c0419730b237dbfa0ec4e6fb33a99ff01825a8f/lib/module.js#L380 .

domenic commented 9 years ago

Can you add a test?

maarten-t commented 9 years ago

Done

domenic commented 9 years ago

Merged as fc70699c54d45928c8fcf8dcb4d7dbcec5f42fe2 and will release as 1.0.3 shortly. Thanks!