From 102469c0702bc76bc77e173aece6aae4d3cff535 Mon Sep 17 00:00:00 2001 From: oreoluwa Date: Sun, 6 Oct 2019 02:25:34 -0400 Subject: [PATCH 1/3] [feat]: support environment variable in config --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 031bfb5..20a46c9 100644 --- a/index.js +++ b/index.js @@ -81,6 +81,9 @@ let loadConfig = skipEvent => { __filename: filePath, module: { exports: {} + }, + process: { + env: process.env } }; script.runInNewContext(sandbox); From ba2c7dc81bf54344f74f406b55989619a007f441 Mon Sep 17 00:00:00 2001 From: oreoluwa Date: Wed, 9 Oct 2019 17:53:52 -0400 Subject: [PATCH 2/3] [feat]: inject current directory --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 20a46c9..89d1c50 100644 --- a/index.js +++ b/index.js @@ -83,6 +83,7 @@ let loadConfig = skipEvent => { exports: {} }, process: { + cwd: process.cwd, env: process.env } }; From 838af11fcc2b0bef9b4480e14cebdec2156259b1 Mon Sep 17 00:00:00 2001 From: oreoluwa Date: Sat, 12 Oct 2019 04:00:16 -0400 Subject: [PATCH 3/3] [feat]: just allow process --- index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.js b/index.js index 89d1c50..1c7352d 100644 --- a/index.js +++ b/index.js @@ -82,10 +82,7 @@ let loadConfig = skipEvent => { module: { exports: {} }, - process: { - cwd: process.cwd, - env: process.env - } + process }; script.runInNewContext(sandbox); parsed = sandbox.module.exports;