Socket
Socket
Sign inDemoInstall

v8-compile-cache

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

4

CHANGELOG.md
# `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 @@

2

package.json
{
"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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc