v8-compile-cache
Advanced tools
Comparing version 1.1.1 to 1.1.2
# `v8-module-cache` Changelog | ||
## 2018-01-23, Version 1.1.2 | ||
* Instead of checking for `process.versions.v8`, check that `script.cachedDataProduced` is `true` (rather than `null`/`undefined`) for support to be considered existent. | ||
## 2018-01-23, Version 1.1.1 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "v8-compile-cache", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Require hook for automatic V8 compile cache persistence", | ||
@@ -5,0 +5,0 @@ "main": "v8-compile-cache.js", |
@@ -292,7 +292,5 @@ 'use strict'; | ||
function supportsCachedData() { | ||
if (!process.versions.v8) { | ||
return false; | ||
} | ||
var script = new vm.Script('""', {produceCachedData: true}); | ||
return script.cachedDataProduced != null; | ||
const script = new vm.Script('""', {produceCachedData: true}); | ||
// chakracore, as of v1.7.1.0, returns `false`. | ||
return script.cachedDataProduced === true; | ||
} | ||
@@ -305,3 +303,8 @@ | ||
: 'v8-compile-cache'; | ||
const cacheDir = path.join(os.tmpdir(), dirname, process.versions.v8); | ||
const version = typeof process.versions.v8 === 'string' | ||
? process.versions.v8 | ||
: typeof process.versions.chakracore === 'string' | ||
? 'chakracore-' + process.versions.chakracore | ||
: 'node-' + process.version; | ||
const cacheDir = path.join(os.tmpdir(), dirname, version); | ||
return cacheDir; | ||
@@ -308,0 +311,0 @@ } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
13430
301
6