Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

bare-realm

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-realm - npm Package Compare versions

Comparing version
1.0.8
to
2.0.0
+12
-3
index.d.ts

@@ -1,7 +0,16 @@

declare class Realm {
evaluate(code: string, opts?: { filename: string; offset: number }): any
interface EvaluateOptions {
filename?: string
offset?: number
}
destroy(): void
interface Realm {
evaluate(code: string, options?: EvaluateOptions): any
}
declare class Realm {}
declare namespace Realm {
export type { EvaluateOptions }
}
export = Realm
const binding = require('./binding')
const errors = require('./lib/errors')

@@ -9,9 +8,3 @@ module.exports = class Realm {

destroy() {
this._handle = null
}
evaluate(code, opts = {}) {
if (this._handle === null) throw errors.REALM_DESTROYED()
const { filename = '<anonymous>', offset = 0 } = opts

@@ -18,0 +11,0 @@

+3
-5
{
"name": "bare-realm",
"version": "1.0.8",
"version": "2.0.0",
"description": "Realm support for Bare",
"exports": {
"./package": "./package.json",
".": {
"types": "./index.d.ts",
"default": "./index.js"
},
"./package": "./package.json",
"./errors": "./lib/errors.js"
}
},

@@ -19,3 +18,2 @@ "files": [

"CMakeLists.txt",
"lib",
"prebuilds"

@@ -22,0 +20,0 @@ ],

module.exports = class RealmError extends Error {
constructor(msg, code, fn = RealmError) {
super(`${code}: ${msg}`)
this.code = code
if (Error.captureStackTrace) {
Error.captureStackTrace(this, fn)
}
}
get name() {
return 'RealmError'
}
static REALM_DESTROYED(msg = 'Realm has been destroyed') {
return new RealmError(msg, 'REALM_DESTROYED', RealmError.REALM_DESTROYED)
}
}

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 too big to display

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 too big to display

Sorry, the diff of this file is too big to display