mozilla/narcissus — pull request #52 by dherman (2012-01-28 01:58:30+00:00)
Title: pure CommonJS structure

This pull request gets rid of our wrapper files and implements all of Narcissus as pure CommonJS. It includes a CommonJS shim for the SpiderMonkey shell.

In order to shim CommonJS, it has to read in the source files and wrap them in function bodies before executing them; to retain accurate source location information in stack traces, I had to add a new global function to the SpiderMonkey shell called `evalWithLocation`. So to get good stack traces, you'll want to update to the latest nightly build of the SpiderMonkey shell. Otherwise, it falls back to normal `eval`, which works correctly but gives bogus source location information in stack traces.