88f6f6507f3628937e2977e64b60c8827c40969944b9fc4872e672a4c1f1af2c8c5088ebc1c912b8d3b98ae381869d5b789210d4c5ce3976fc52e02c6f36•8.75 kB
{"_id":"v8-compile-cache-lib","_rev":"2-d72e398b06011103df993c5f38b7a82f","name":"v8-compile-cache-lib","dist-tags":{"latest":"3.0.1"},"versions":{"3.0.0":{"name":"v8-compile-cache-lib","version":"3.0.0","description":"Require hook for automatic V8 compile cache persistence","main":"v8-compile-cache.js","scripts":{"bench":"bench/run.sh","eslint":"eslint --max-warnings=0 .","tap":"tap test/*-test.js","test":"npm run tap","posttest":"npm run eslint"},"author":{"name":"Andrew Bradley","email":"cspotcode@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/cspotcode/v8-compile-cache-lib.git"},"license":"MIT","dependencies":{},"devDependencies":{"babel-core":"6.26.3","eslint":"^7.12.1","flow-parser":"0.136.0","rimraf":"^2.5.4","rxjs":"6.6.3","semver":"^5.3.0","tap":"^9.0.0","temp":"^0.8.3","yarn":"1.22.10"},"gitHead":"9302bac4374ed1a4c438c0d73153c7c333e4404a","bugs":{"url":"https://github.com/cspotcode/v8-compile-cache-lib/issues"},"homepage":"https://github.com/cspotcode/v8-compile-cache-lib#readme","_id":"v8-compile-cache-lib@3.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==","shasum":"0582bcb1c74f3a2ee46487ceecf372e46bce53e8","tarball":"https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz","fileCount":6,"unpackedSize":18116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVTbNCRA9TVsSAnZWagAA0McP/0hX+OfHiW6rVR1PDeSL\n84SBW6lO05OP+fucGFWrd0bW4kcS/noMckDVSVqhiZ7EvUoCB86rHiR3/fSS\nFKeWdKEknviNWV4RiX1h93uYNsAX/ng9penwaFKLfqaRYTNhJJnSc+7ujs3a\n7SxRVACulYU7M+tsFqwAGulcXVGgGxHqawiMaBGVQis3rjro96KshIABthNy\nMKyRFBhQcjBTKxkwfxiXqGlCIe5gkh8Y8jH2HL3JxFa8Bq0ONqqHG5QV1/Az\nid9dIp3FpINUix1sefgTVdKI1jx1zmGoFZ/inGnayfHE5dYBVMlUMLad8W5w\n5vpRQLpN5iHkKaCvTgvNSsKQjs1bjTBexTyIUh21jfad6JxXS17+EKC2CVRE\nOgKTgWgZTddDvB4FBzhaB1kOzWtrwOpr6txeevzPXw0iEvmONtv8C7Nir2BI\ngcVPge3phyeB354W/ZCD2ZXQn/AWHfeLjBgyLhcsvKtX+1WOcVna2oFrILCB\nUA/fPIayxuX3h5QehBn4SLwOmFfLVdKUOYMpggU3ZAHfLUACguYOW02s9OcW\nF1C9BnWMTeyzF66CCfnTzLj+XGwZW8dBoseVTn86oA+/SUy4JtyFw1VOEAXo\ntaevakUJtKut072XixXhQFWrFGg2reVuiunqrAJ0T9wg9YOSvsUta9G9hNpx\nI39n\r\n=IZjB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF4Vjg4JpH5oPhZl+Ky8bchY80K0yzWs+6b0x73bsPO8AiEA00rbjYBFpob0I4cNh9mbIr5D/mNGR9rb5LN8TaqFZw8="}]},"_npmUser":{"name":"cspotcode","email":"cspotcode@gmail.com"},"directories":{},"maintainers":[{"name":"cspotcode","email":"cspotcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v8-compile-cache-lib_3.0.0_1616197325220_0.2306999092979689"},"_hasShrinkwrap":false},"3.0.1":{"name":"v8-compile-cache-lib","version":"3.0.1","description":"Require hook for automatic V8 compile cache persistence","main":"v8-compile-cache.js","scripts":{"bench":"bench/run.sh","eslint":"eslint --max-warnings=0 .","tap":"tap test/*-test.js","test":"npm run tap","posttest":"npm run eslint"},"author":{"name":"Andrew Bradley","email":"cspotcode@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/cspotcode/v8-compile-cache-lib.git"},"license":"MIT","dependencies":{},"devDependencies":{"babel-core":"6.26.3","eslint":"^7.12.1","flow-parser":"0.136.0","rimraf":"^2.5.4","rxjs":"6.6.3","semver":"^5.3.0","tap":"^9.0.0","temp":"^0.8.3","yarn":"1.22.10"},"bugs":{"url":"https://github.com/cspotcode/v8-compile-cache-lib/issues"},"homepage":"https://github.com/cspotcode/v8-compile-cache-lib#readme","_id":"v8-compile-cache-lib@3.0.1","_nodeVersion":"17.3.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==","shasum":"6336e8d71965cb3d35a1bbb7868445a7c05264bf","tarball":"https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz","fileCount":6,"unpackedSize":18165,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5vL2qkFNnHQNlG63To4Rm+qqwsAxHIgbyRyhnMCywRAIgVppYcUkV9GInw7hL+Uvkllv/mIJrY0aq44jSJQTcBOk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWhXrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZgw/6AqWBEKR0E0e4fgzNOpBN0/p7DsiGcqccveabLD8B/hDr0oRm\r\nNuchEvTpyq5KYyE70K8O71pkmw00dyowbxHzecBGhNOpnqY3YVXYVwsNiJiD\r\n2dgjhOaUjhi4svBOLscrp0UMuqn1hRHTZNM9ICqBqU0X73Ey5hb2QstHVOsn\r\nw8jsczmFxiTvjaEShEcs6eikDdtmrOD0F4Mjbp1l83Osyf+iW4M2Yp3bmGt4\r\nPu+YMdqXxY1JdL/xjQcaqwGAHU9AfT9RaNFTUhgkfyufAiyOzSlMufD1whOO\r\nQ/daFoRglz4G3hambypEE9oYGVwi3KBx68xeyg62eAwNNQjkXqFKLcPKJAMJ\r\nGyDcMI4q7NApziLl/TR8kBis1Aaay8ILs/VipWs/Tbr5fb3zraDtXyQVmAuh\r\n1YQ5xZCsJstwwlyAfltbrqnFWcf2PcGyCyie3JBvrJoV4UecMqdRJcIaycmT\r\nHx0yZm/lZmLFtbzdY1tygMhmkMtFpJGrsBYawEmao9AiYZDZw7EcmtKBjVga\r\nUgV6bSXnYPH+L6wI3zaWebbKjJMimL8Z/ZVWonAY1uGn+H/4TsQ/UIaH/Nqp\r\n7+suO+PqqGyBqkTlgpWeY3QlY5Cm+kBY4UWo+3jxus2IyVoVPwRpXr7Oq1IX\r\ng6t3uyD2KQgQ63hR0oozq6svEiBKeoDztjw=\r\n=s6xY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cspotcode","email":"cspotcode@gmail.com"},"directories":{},"maintainers":[{"name":"cspotcode","email":"cspotcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v8-compile-cache-lib_3.0.1_1650071019009_0.025645322864183306"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-19T23:42:05.219Z","3.0.0":"2021-03-19T23:42:05.346Z","modified":"2022-05-23T01:55:17.302Z","3.0.1":"2022-04-16T01:03:39.155Z"},"maintainers":[{"name":"cspotcode","email":"cspotcode@gmail.com"}],"description":"Require hook for automatic V8 compile cache persistence","homepage":"https://github.com/cspotcode/v8-compile-cache-lib#readme","repository":{"type":"git","url":"git+https://github.com/cspotcode/v8-compile-cache-lib.git"},"author":{"name":"Andrew Bradley","email":"cspotcode@gmail.com"},"bugs":{"url":"https://github.com/cspotcode/v8-compile-cache-lib/issues"},"license":"MIT","readme":"# v8-compile-cache-lib\n\n> Fork of [`v8-compile-cache`](https://www.npmjs.com/package/v8-compile-cache) exposed as an API for programmatic usage in other libraries and tools.\n\n---\n\n[](https://github.com/cspotcode/v8-compile-cache-lib/actions?query=workflow%3A%22Continuous+Integration%22)\n\n`v8-compile-cache-lib` attaches a `require` hook to use [V8's code cache](https://v8project.blogspot.com/2015/07/code-caching.html) to speed up instantiation time. The \"code cache\" is the work of parsing and compiling done by V8.\n\nThe ability to tap into V8 to produce/consume this cache was introduced in [Node v5.7.0](https://nodejs.org/en/blog/release/v5.7.0/).\n\n## Usage\n\n1. Add the dependency:\n\n ```sh\n $ npm install --save v8-compile-cache-lib\n ```\n\n2. Then, in your entry module add:\n\n ```js\n require('v8-compile-cache-lib').install();\n ```\n\n**`.install()` in Node <5.7.0 is a noop – but you need at least Node 4.0.0 to support the ES2015 syntax used by `v8-compile-cache-lib`.**\n\n## Options\n\nSet the environment variable `DISABLE_V8_COMPILE_CACHE=1` to disable the cache.\n\nCache directory is defined by environment variable `V8_COMPILE_CACHE_CACHE_DIR` or defaults to `<os.tmpdir()>/v8-compile-cache-<V8_VERSION>`.\n\n## Internals\n\nCache files are suffixed `.BLOB` and `.MAP` corresponding to the entry module that required `v8-compile-cache-lib`. 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.\n\n## Benchmarks\n\nSee https://github.com/cspotcode/v8-compile-cache-lib/tree/master/bench.\n\n**Load Times:**\n\n| Module | Without Cache | With Cache |\n| ---------------- | -------------:| ----------:|\n| `babel-core` | `218ms` | `185ms` |\n| `yarn` | `153ms` | `113ms` |\n| `yarn` (bundled) | `228ms` | `105ms` |\n\n_^ Includes the overhead of loading the cache itself._\n\n## Acknowledgements\n\n* The original [`v8-compile-cache`](https://github.com/zertosh/v8-compile-cache) from which this library is forked.\n* `FileSystemBlobStore` and `NativeCompileCache` are based on Atom's implementation of their v8 compile cache: \n - https://github.com/atom/atom/blob/b0d7a8a/src/file-system-blob-store.js\n - https://github.com/atom/atom/blob/b0d7a8a/src/native-compile-cache.js\n* `mkdirpSync` is based on:\n - https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98\n","readmeFilename":"README.md"}