Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mendoza

Package Overview
Dependencies
Maintainers
37
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mendoza - npm Package Compare versions

Comparing version 3.0.3-canary.0 to 3.0.3

15

dist/index.js

@@ -12,2 +12,3 @@ var __defProp$1 = Object.defineProperty;

};
const OPS = ["Value", "Copy", "Blank", "ReturnIntoArray", "ReturnIntoObject", "ReturnIntoObjectSameKey", "PushField", "PushElement", "PushParent", "Pop", "PushFieldCopy", "PushFieldBlank", "PushElementCopy", "PushElementBlank", "ReturnIntoObjectPop", "ReturnIntoObjectSameKeyPop", "ReturnIntoArrayPop", "ObjectSetFieldValue", "ObjectCopyField", "ObjectDeleteField", "ArrayAppendValue", "ArrayAppendSlice", "StringAppendString", "StringAppendSlice"];
class Patcher {

@@ -21,3 +22,2 @@ constructor(model, root, patch) {

__publicField$1(this, "outputStack");
__publicField$1(this, "ops");
this.model = model;

@@ -29,3 +29,2 @@ this.root = root;

this.outputStack = [];
this.ops = [this.processValue, this.processCopy, this.processBlank, this.processReturnIntoArray, this.processReturnIntoObject, this.processReturnIntoObjectSameKey, this.processPushField, this.processPushElement, this.processPushParent, this.processPop, this.processPushFieldCopy, this.processPushFieldBlank, this.processPushElementCopy, this.processPushElementBlank, this.processReturnIntoObjectPop, this.processReturnIntoObjectSameKeyPop, this.processReturnIntoArrayPop, this.processObjectSetFieldValue, this.processObjectCopyField, this.processObjectDeleteField, this.processArrayAppendValue, this.processArrayAppendSlice, this.processStringAppendString, this.processStringAppendSlice];
}

@@ -44,7 +43,6 @@ read() {

let opcode = this.read();
let op = this.ops[opcode];
if (!op) {
throw new Error("Unknown opcode: ".concat(opcode));
}
op.apply(this);
let op = OPS[opcode];
if (!op) throw new Error("Unknown opcode: ".concat(opcode));
let processor = "process".concat(op);
this[processor].apply(this);
}

@@ -143,5 +141,2 @@ let entry = this.outputStack.pop();

}
processPushParent() {
throw new Error("not implemented");
}
processPushElement() {

@@ -148,0 +143,0 @@ let idx = this.read();

{
"name": "mendoza",
"version": "3.0.3-canary.0",
"version": "3.0.3",
"description": "Mendoza, differ for structured documents",

@@ -5,0 +5,0 @@ "keywords": [

import {ObjectModel} from './object-model'
import {RawPatch} from './patch'
const OPS = [
'Value',
'Copy',
'Blank',
'ReturnIntoArray',
'ReturnIntoObject',
'ReturnIntoObjectSameKey',
'PushField',
'PushElement',
'PushParent',
'Pop',
'PushFieldCopy',
'PushFieldBlank',
'PushElementCopy',
'PushElementBlank',
'ReturnIntoObjectPop',
'ReturnIntoObjectSameKeyPop',
'ReturnIntoArrayPop',
'ObjectSetFieldValue',
'ObjectCopyField',
'ObjectDeleteField',
'ArrayAppendValue',
'ArrayAppendSlice',
'StringAppendString',
'StringAppendSlice',
]
type InputEntry<V> = {

@@ -22,3 +49,2 @@ value: V

outputStack: OutputEntry<V, S, O, A>[]
ops: ((this: Patcher<V, S, O, A>) => void)[]

@@ -32,28 +58,2 @@ constructor(model: ObjectModel<V, S, O, A>, root: V, patch: RawPatch) {

this.outputStack = []
this.ops = [
this.processValue,
this.processCopy,
this.processBlank,
this.processReturnIntoArray,
this.processReturnIntoObject,
this.processReturnIntoObjectSameKey,
this.processPushField,
this.processPushElement,
this.processPushParent,
this.processPop,
this.processPushFieldCopy,
this.processPushFieldBlank,
this.processPushElementCopy,
this.processPushElementBlank,
this.processReturnIntoObjectPop,
this.processReturnIntoObjectSameKeyPop,
this.processReturnIntoArrayPop,
this.processObjectSetFieldValue,
this.processObjectCopyField,
this.processObjectDeleteField,
this.processArrayAppendValue,
this.processArrayAppendSlice,
this.processStringAppendString,
this.processStringAppendSlice,
]
}

@@ -71,7 +71,6 @@

let opcode = this.read() as number
let op = this.ops[opcode]
if (!op) {
throw new Error(`Unknown opcode: ${opcode}`)
}
op.apply(this)
let op = OPS[opcode]
if (!op) throw new Error(`Unknown opcode: ${opcode}`)
let processor = `process${op}`
;(this as any)[processor].apply(this)
}

@@ -185,6 +184,2 @@

processPushParent() {
throw new Error('not implemented')
}
processPushElement() {

@@ -191,0 +186,0 @@ let idx = this.read() as number

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