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 2.1.1 to 2.2.0

4

CHANGELOG.md
# `v8-module-cache` Changelog
## 2020-10-28, Version 2.2.0
* Added `V8_COMPILE_CACHE_CACHE_DIR` option [#23](https://github.com/zertosh/v8-compile-cache/pull/23).
## 2020-05-30, Version 2.1.1

@@ -4,0 +8,0 @@

19

package.json
{
"name": "v8-compile-cache",
"version": "2.1.1",
"version": "2.2.0",
"description": "Require hook for automatic V8 compile cache persistence",

@@ -8,5 +8,6 @@ "main": "v8-compile-cache.js",

"bench": "bench/run.sh",
"lint": "eslint --max-warnings=0 .",
"test": "tap test/*-test.js",
"posttest": "npm run lint"
"eslint": "eslint --max-warnings=0 .",
"tap": "tap test/*-test.js",
"test": "npm run tap",
"posttest": "npm run eslint"
},

@@ -24,12 +25,12 @@ "author": "Andres Suarez <zertosh@gmail.com>",

"devDependencies": {
"babel-core": "6.23.1",
"eslint": "^3.15.0",
"flow-parser": "0.38.0",
"babel-core": "6.26.3",
"eslint": "^7.12.1",
"flow-parser": "0.136.0",
"rimraf": "^2.5.4",
"rxjs": "5.2.0",
"rxjs": "6.6.3",
"semver": "^5.3.0",
"tap": "^10.1.1",
"temp": "^0.8.3",
"yarn": "0.20.3"
"yarn": "1.22.10"
}
}

@@ -29,5 +29,7 @@ # v8-compile-cache

Cache directory is defined by environment variable `V8_COMPILE_CACHE_CACHE_DIR` or defaults to `<os.tmpdir()>/v8-compile-cache-<V8_VERSION>`.
## Internals
The caches are stored in `$TMP/v8-compile-cache/V8_VERSION`, where there are `.BLOB` and `.MAP` files corresponding to the entry module that required `v8-compile-cache`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis.
Cache files are suffixed `.BLOB` and `.MAP` corresponding to the entry module that required `v8-compile-cache`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis.

@@ -34,0 +36,0 @@ ## Benchmarks

@@ -89,4 +89,2 @@ 'use strict';

fs.writeFileSync(this._mapFilename, mapToStore);
} catch (error) {
throw error;
} finally {

@@ -305,3 +303,4 @@ fs.unlinkSync(this._lockFilename);

};
return str.replace(/[\\:\/\x00z]/g, match => (ESCAPE_LOOKUP[match]));
const ESCAPE_REGEX = /[\\:/\x00z]/g; // eslint-disable-line no-control-regex
return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);
}

@@ -316,2 +315,7 @@

function getCacheDir() {
const v8_compile_cache_cache_dir = process.env.V8_COMPILE_CACHE_CACHE_DIR;
if (v8_compile_cache_cache_dir) {
return v8_compile_cache_cache_dir;
}
// Avoid cache ownership issues on POSIX systems.

@@ -354,3 +358,3 @@ const dirname = typeof process.getuid === 'function'

process.once('exit', code => {
process.once('exit', () => {
if (blobStore.isDirty()) {

@@ -357,0 +361,0 @@ blobStore.save();

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