Closed dougwilson closed 6 years ago
Good suggestion. I'll make this configurable soon.
@dougwilson It would help to know whether you are planning to use:
config
parameter would be fine).If you're using vuln-regex-detector v1.2.0 then here is a workaround:
At the moment, the directory the cache uses is defined here:
const PERSISTENT_CACHE_DIR = path.join(os.tmpdir(), 'vuln-regex-detector-client-persistentCache');
Sorry I left that out from the initial post. I am currently trying to just use the eslint plugin, since it's the simple method. It works well for projects if I can get a persistent local cache, as it runs very quickly. Perhaps both choices are best:
Yes, I thought of the symlink approach, though it's a bit more difficult on Windows because you have to be an administrator to make a symlink, and the builds do not run with administrator privileges. Right now I am just doing a directory copy of the contents pre and post build to shuffle them around. Just thought it would be more efficient to skip the file copying.
@dougwilson Resolved in #36 via vuln-regex-detector v1.3.0 and eslint plugin v1.0.4.
See instructions here. You might also get some clues from this test case if you use the vuln-regex-detector module directly.
Let me know how it goes!
Is it possible to choose the cache location when using the Node.js npm module as a client? For example, perhaps I can set the path using an environment variable. The reason is that I would like to run this on CI servers, but the cache isn't super useful unless I can save the cache between runs. If I can choose the location I can point it to a directory that will persist between runs.