New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

isolated-vm

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isolated-vm - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

src/lib/suspend.h

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## v4.1.0
- Support for nodejs v16.x
- `onCatastrophicError` added
- Fix for `null` error thrown from callback
## v4.0.0

@@ -2,0 +7,0 @@ - `Callback` class addeed.

@@ -131,2 +131,10 @@ declare module "isolated-vm" {

snapshot?: ExternalCopy<ArrayBuffer>;
/**
* Callback to be invoked when a *very bad* error occurs. If this is invoked it means that v8
* has lost all control over the isolate, and all resources in use are totally unrecoverable. If
* you receive this error you should log the error, stop serving requests, finish outstanding
* work, and end the process by calling `process.abort()`.
*/
onCatastrophicError?: (message: string) => void;
};

@@ -133,0 +141,0 @@

2

package.json
{
"name": "isolated-vm",
"version": "4.0.0",
"version": "4.1.0",
"description": "Access to multiple isolates",

@@ -5,0 +5,0 @@ "main": "isolated-vm.js",

@@ -33,3 +33,3 @@ [![npm version](https://badgen.now.sh/npm/v/isolated-vm)](https://www.npmjs.com/package/isolated-vm)

This project requires nodejs LTS version 10.4.0 (or later).
This project requires nodejs version 10.4.0 (or later).

@@ -117,2 +117,6 @@ Furthermore, to install this module you will need a compiler installed. If you run into errors while

`createSnapshot` which will be used to initialize the heap of this isolate.
* `onCatastrophicError` *[function]* - Callback to be invoked when a *very bad* error occurs. If
this is invoked it means that v8 has lost all control over the isolate, and all resources in use
are totally unrecoverable. If you receive this error you should log the error, stop serving
requests, finish outstanding work, and end the process by calling `process.abort()`.

@@ -119,0 +123,0 @@ ##### `ivm.Isolate.createSnapshot(scripts, warmup_script)`

@@ -159,1 +159,20 @@ 'use strict';

}
// Check exception from Callback
{
let isolate = new ivm.Isolate();
let context = isolate.createContextSync();
let script = isolate.compileScriptSync(`
const array = [];
while (true) {
array.push(Math.random().toString());
}`);
try {
script.runSync(context);
let ref = context.global.getSync('top');
ref();
assert.fail("Did not throw");
} catch (err) {
assert.ok(err.message.match(/memory limit/));
}
}

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc