Skip to content

Comments

Copy sandbox options when recursing#42

Open
OliverJAsh wants to merge 1 commit intofelixge:masterfrom
OliverJAsh:patch-1
Open

Copy sandbox options when recursing#42
OliverJAsh wants to merge 1 commit intofelixge:masterfrom
OliverJAsh:patch-1

Conversation

@OliverJAsh
Copy link

See #41.

Given:

var SandboxedModule = require('sandboxed-module');

SandboxedModule.require('./foo', { sourceTransformers: {
    test: function (source) {
        console.log('test source transformer:', this.filename);
        return source;
    }
}});

I would expect that any calls to require inside of the sandboxed module would carry the same options (e.g. sourceTransformers) as the initial sandboxed module.

@domenic
Copy link
Collaborator

domenic commented Nov 18, 2014

Can you add a test?

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