This pull requests incorporates some initial functionality for DYNJS-40, including runtime-configurable load paths, and context-isolated module evaluation. I am submitting this primarily for discussion, as it's not complete yet and could change. I would like to get feedback on the initial approach and whether it is consistent, overall, with how you intend for things like a "require()" builtin to function.
First stab at DYNJS-40
Merge remote-tracking branch 'upstream/master' into builtins_support
Move RequireFuction to the right place.
Move test resource
[DYNJS-40] Stub in a CommonJS module loader with require();
Evaluate required modules in a separate context
Stub out context-global exports.
Instead of keeping track of another DynObject.
fixing property assignment regression
Change test to check for exports.message.
Ensure modules can export functions.
Ensure module private variables remain private
Make 'require()' builtin by default.
[DYNJS-42] Add default node load paths.
Look in user.home - not user.dir.
Add support for modules packaged into a directory.