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

added filename argument to source transformer #69

Closed helloIAmPau closed 4 years ago

helloIAmPau commented 4 years ago

Hello @felixge, in this PR I start passing the source filename as the second argument of the sourceTransformer callbacks. It can be helpful for cases in which you have to decide to either parse or not the source code based on the file extension.

Moreover, I added a new makefile rule running the tests into a docker container configured ad-hoc for testing purposes (your test environment is not compatible anymore with the current LTS version of node and with OSX systems).

Hope you enjoy the changes :)

felixge commented 4 years ago

Thanks!

I'm not actively maintaining any of my NPM modules these days anymore, so I merged your PR without reviewing it carefully.

If you're interested in helping with this module going forward, I'm happy to add you on NPM/GitHub as a contributor.

helloIAmPau commented 4 years ago

If you're interested in helping with this module going forward, I'm happy to add you on NPM/GitHub as a contributor.

uh, yes, thank you. I'm actively using sandboxed-module in many projects.

felixge commented 4 years ago

What's you NPM username?

helloIAmPau commented 4 years ago

Ops, sorry. boemianrapsodi

felixge commented 4 years ago

@helloIAmPau thx, done!

$ npm owner add boemianrapsodi sandboxed-module
+ boemianrapsodi (sandboxed-module)
helloIAmPau commented 4 years ago

splendid