Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 4 commits into from

Conversation

maarten-t
Copy link
Contributor

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 .

themaarten added 3 commits October 7, 2014 15:50
Sources ending with an end-of-line comment (not followed by a newline character) aren't wrapped properly. The second part of the wrapper is treated as part of the comment in such a case. Adding a newline character in fixes this issue.
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
Copy link
Collaborator

domenic commented Oct 13, 2014

Can you add a test?

@maarten-t
Copy link
Contributor Author

Done

@domenic
Copy link
Collaborator

domenic commented Nov 18, 2014

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

@domenic domenic closed this Nov 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants