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

@overturebio-stack/lectern-client

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@overturebio-stack/lectern-client - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

31

lib/change-analyzer.js

@@ -101,3 +101,3 @@ "use strict";

if (fieldDiff.restrictions) {
categorizeRestrictionChanges(analysis, field, fieldDiff.restrictions);
categorizeRestrictionChanges(analysis, field, fieldDiff.restrictions, fieldChange.after);
}

@@ -124,3 +124,4 @@ if (fieldDiff.isArray) {

};
const categorizeRestrictionChanges = (analysis, field, restrictionsChange) => {
const categorizeRestrictionChanges = (analysis, field, restrictionsChange, fieldDefinitionAfter) => {
var _a;
const restrictionsToCheck = ['regex', 'script', 'required', 'codeList', 'range'];

@@ -167,2 +168,28 @@ // additions or deletions of a restriction object as whole (i.e. contains 1 or many restrictions within the 'data')

*/
if (k == 'range' && !change.type) {
// if the change is nested (type is at min max level) then the boundries were updated only : ex:
/*
change = {
"max" : {
type: "updated"
data: "..."
},
"exclusiveMin": {
type: "deleted"
data ..
}
}
*/
const def = {};
if (Object.keys(change)
.some(k => k == 'max' || k == 'min' || k == 'exclusiveMin' || k == 'exclusiveMax')) {
analysis.restrictionsChanges[k]['updated'].push({
field: field,
// we push the whole range definition since it doesnt make sense to just
// push one boundary.
definition: (_a = fieldDefinitionAfter === null || fieldDefinitionAfter === void 0 ? void 0 : fieldDefinitionAfter.restrictions) === null || _a === void 0 ? void 0 : _a.range
});
}
return;
}
const definition = change.data || change;

@@ -169,0 +196,0 @@ analysis.restrictionsChanges[k][change.type].push({

36

package.json
{
"name": "@overturebio-stack/lectern-client",
"version": "1.1.0",
"version": "1.2.0",
"files": [

@@ -28,15 +28,15 @@ "lib/**/*"

"devDependencies": {
"@types/chai": "^4.2.11",
"@types/deep-freeze": "^0.1.1",
"@types/lodash": "^4.14.155",
"@types/mocha": "^5.2.7",
"@types/chai": "^4.2.16",
"@types/deep-freeze": "^0.1.2",
"@types/lodash": "^4.14.168",
"@types/mocha": "^8.2.2",
"@types/node": "^12.0.10",
"@types/node-fetch": "^2.5.0",
"chai": "^4.2.0",
"husky": "^3.0.0",
"mocha": "^6.1.4",
"prettier": "^1.19.1",
"pretty-quick": "^1.11.1",
"rimraf": "^2.6.2",
"tslint": "^5.20.1",
"@types/node-fetch": "^2.5.10",
"chai": "^4.3.4",
"husky": "^6.0.0",
"mocha": "^8.3.2",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.2",
"tslint": "^6.1.3",
"typedoc": "^0.17.7",

@@ -48,8 +48,8 @@ "typescript": "^3.9.5"

"deep-freeze": "^0.0.1",
"lodash": "^4.17.14",
"node-fetch": "^2.6.0",
"node-worker-threads-pool": "^1.2.2",
"lodash": "^4.17.21",
"node-fetch": "^2.6.1",
"node-worker-threads-pool": "^1.4.3",
"promise-tools": "^2.1.0",
"ts-node": "^8.5.4",
"winston": "^3.2.1"
"ts-node": "^9.1.1",
"winston": "^3.3.3"
},

@@ -56,0 +56,0 @@ "prettier": {

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