isolated-vm
Advanced tools
Comparing version 4.6.0 to 4.7.2
@@ -53,2 +53,2 @@ 'use strict'; | ||
}); | ||
console.log('Inspector: chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:10000'); | ||
console.log('Inspector: devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:10000'); |
{ | ||
"name": "isolated-vm", | ||
"version": "4.6.0", | ||
"version": "4.7.2", | ||
"description": "Access to multiple isolates", | ||
@@ -11,4 +11,4 @@ "main": "isolated-vm.js", | ||
"scripts": { | ||
"install": "prebuild-install || (node-gyp rebuild --release -j 4 && node-gyp clean)", | ||
"rebuild": "node-gyp rebuild --release -j 4", | ||
"install": "prebuild-install || (node-gyp rebuild --release -j max && node-gyp clean)", | ||
"rebuild": "node-gyp rebuild --release -j max", | ||
"prebuild": "prebuild", | ||
@@ -24,7 +24,4 @@ "upload": "prebuild --upload ${GITHUB_TOKEN}", | ||
"isolated-vm": ".", | ||
"prebuild": "^11.0.4" | ||
"prebuild": "^12.1.0" | ||
}, | ||
"overrides": { | ||
"node-gyp": "^9.4.0" | ||
}, | ||
"binary": { | ||
@@ -31,0 +28,0 @@ "module_path": "out" |
@@ -54,2 +54,3 @@ [![npm version](https://badgen.now.sh/npm/v/isolated-vm)](https://www.npmjs.com/package/isolated-vm) | ||
* [Examples](#examples) | ||
* [🚨 Frequently Asked Question 🚨](#frequently-asked-question) | ||
* [Alternatives](#alternatives) | ||
@@ -74,2 +75,3 @@ | ||
* Arch Linux users should run: `sudo pacman -S make gcc python` | ||
* Red Hat users should run: `sudo dnf install python3 gcc gcc-c++ zlib-devel brotli-devel openssl-devel libuv-devel` | ||
@@ -550,3 +552,3 @@ | ||
Primitive values can be copied exactly as they are. Date objects will be copied as as Dates. | ||
Primitive values can be copied exactly as they are. Date objects will be copied as Dates. | ||
ArrayBuffers, TypedArrays, and DataViews will be copied in an efficient format. SharedArrayBuffers | ||
@@ -733,2 +735,32 @@ will simply copy a reference to the existing memory and when copied into another isolate the new | ||
FREQUENTLY ASKED QUESTION | ||
------------------------- | ||
There is only 1 frequently asked question: | ||
"How do I pass a [module, function, object, library] into an isolate?" | ||
You don't! Isolates are `isolated`. An *isolate* is its own environment with its own heap which is | ||
*isolated* from all other **isolates**. It may help to think of the question in the context of a | ||
web browser. How would you pass a function from nodejs into Firefox? You can't, it is nonsense. | ||
Depending on the function you could just pass the code for the function directly into the isolate | ||
and execute it there. That's how a `<script />` tag works in our browser metaphor. This works for | ||
functions that don't need to do anything such as file access or network requests. Check out Webpack, | ||
Rollup, esbuild, etc for bundling solutions. | ||
If you want to perform operations on files, network, native modules, etc then you will need to set | ||
up some kind of shim delegate which can perform the operation within nodejs and pass the result back | ||
to your isolate. In the browser metaphor this would be like a REST call back to your service. | ||
Finally, and I'm not trying to be mean here, if this explanation doesn't make sense then you really | ||
should not be using this module. This is a low-level module which is just one piece of a very | ||
complicated problem. If your goal is to run code from untrusted sources then you *must* have a very | ||
comprehensive understanding of JavaScript. You should know where the ECMAScript specification ends | ||
and where the HTML, DOM, and other web specifications begin. You should be a security-focused | ||
hacker, otherwise you will almost certain make a company-ending mistake. This is not a module for | ||
the faint of heart. Turn back now! | ||
ALTERNATIVES | ||
@@ -735,0 +767,0 @@ ------------ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
516189
99
782
2