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

flora

Package Overview
Dependencies
Maintainers
0
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flora - npm Package Compare versions

Comparing version 6.1.0 to 7.0.0

6

lib/cast.js

@@ -59,3 +59,3 @@ 'use strict';

return dt.toISO();
} catch (e) {
} catch {
// api.log.warn(`cannot parse date: "${value}": ${e.message}`);

@@ -70,3 +70,3 @@ return null;

return dt.toISODate();
} catch (e) {
} catch {
// api.log.warn(`cannot parse date: "${value}": ${e.message}`);

@@ -102,3 +102,3 @@ return null;

obj = JSON.parse(value);
} catch (e) {
} catch {
api.log.warn(`cannot parse JSON: '${value}`);

@@ -105,0 +105,0 @@ return null;

@@ -107,3 +107,2 @@ 'use strict';

api.log.trace('Loading resource ' + resourceName);
// eslint-disable-next-line global-require
const resourceFunction = require(resources[resourceName].instanceFile);

@@ -110,0 +109,0 @@ if (typeof resourceFunction !== 'function') {

'use strict';
const cloneDeep = require('lodash.clonedeep');
const requestParser = require('@florajs/request-parser');

@@ -515,6 +514,6 @@ const { ImplementationError } = require('@florajs/errors');

if (attrNode.parentKey === null) {
attrNode.parentKey = cloneDeep(parentResource.primaryKey);
attrNode.parentKey = structuredClone(parentResource.primaryKey);
}
if (attrNode.childKey === null) {
attrNode.childKey = cloneDeep(childResource.primaryKey);
attrNode.childKey = structuredClone(childResource.primaryKey);
}

@@ -521,0 +520,0 @@

@@ -164,3 +164,2 @@ 'use strict';

delete require.cache[resolvedConfigPath];
// eslint-disable-next-line global-require
this.config = require(resolvedConfigPath);

@@ -167,0 +166,0 @@ }

@@ -19,13 +19,2 @@ 'use strict';

/**
* Deep-clone an object and try to be efficient.
*
* @param {Object} obj
* @returns {Object}
* @private
*/
function cloneDeep(obj) {
return JSON.parse(JSON.stringify(obj));
}
/**
* Merges additional options, attributes and DataSources from parent-resource

@@ -73,3 +62,3 @@ * into sub-resource.

} else if (typeof subResourceConfig[optionName] === 'object') {
attrNode[optionName] = cloneDeep(subResourceConfig[optionName]);
attrNode[optionName] = structuredClone(subResourceConfig[optionName]);
} else if (!(optionName in attrNode)) {

@@ -214,3 +203,3 @@ attrNode[optionName] = subResourceConfig[optionName];

} else if (typeof origSubAttrNode[optionName] === 'object') {
subAttrNode[optionName] = cloneDeep(origSubAttrNode[optionName]);
subAttrNode[optionName] = structuredClone(origSubAttrNode[optionName]);
} else {

@@ -589,3 +578,3 @@ subAttrNode[optionName] = origSubAttrNode[optionName];

context.resourceTree.filter.forEach((andFilter2) => {
combinedFilter.push(cloneDeep(andFilter).concat(cloneDeep(andFilter2)));
combinedFilter.push(structuredClone(andFilter).concat(structuredClone(andFilter2)));
});

@@ -592,0 +581,0 @@ });

@@ -58,3 +58,2 @@ 'use strict';

async run() {
// eslint-disable-next-line global-require
const config = require(this._configPath);

@@ -61,0 +60,0 @@

@@ -119,3 +119,3 @@ 'use strict';

opts.data = JSON.parse(payload);
} catch (err) {
} catch {
if (httpRequest.flora) httpRequest.flora.state = 'processing';

@@ -122,0 +122,0 @@ if (timeout) {

@@ -19,3 +19,3 @@ 'use strict';

const dom = new DOMParser({
errorHandler: (level, message) => {
onError: (level, message) => {
throw new Error(message);

@@ -34,3 +34,3 @@ }

function copyXmlAttributes(node) {
if (!node.hasAttributes()) return {};
if (!node.attributes.length) return {};

@@ -37,0 +37,0 @@ return Array.from(node.attributes)

{
"name": "flora",
"version": "6.1.0",
"version": "7.0.0",
"description": "FLexible Open Rest API",
"main": "index.js",
"scripts": {
"prepare": "git config --local core.hooksPath .githooks",
"doc": "jsdoc -R README.md -d build/docs lib",
"test": "mocha",
"test": "node --test test/*.spec.js",
"lint": "eslint .",
"test-lint": "eslint . && mocha"
"test-lint": "eslint . && npm run test"
},

@@ -16,3 +17,2 @@ "files": [

],
"pre-commit": "test-lint",
"keywords": [

@@ -46,3 +46,3 @@ "api",

"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -52,26 +52,21 @@ "dependencies": {

"@florajs/errors": "^4.0.0",
"@florajs/request-parser": "^4.0.0",
"@xmldom/xmldom": "^0.8.10",
"@florajs/request-parser": "^5.0.0",
"@xmldom/xmldom": "^0.9.7",
"bunyan": "^1.8.15",
"chokidar": "^3.6.0",
"chokidar": "^4.0.3",
"content-type": "^1.0.5",
"lodash.clonedeep": "^4.5.0",
"luxon": "^3.5.0",
"promise-events": "^0.2.4",
"serve-static": "^1.15.0"
"serve-static": "^1.16.2"
},
"devDependencies": {
"abstract-logging": "^2.0.1",
"chai": "^4.3.7",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^5.2.1",
"jsdoc": "^4.0.3",
"mocha": "^10.7.0",
"mock-fs": "^5.2.0",
"pre-commit": "^1.2.2",
"prettier": "^3.3.3",
"sinon": "^15.2.0",
"sinon-chai": "^3.7.0"
"eslint": "^9.19.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.3",
"globals": "^15.14.0",
"jsdoc": "^4.0.4",
"mock-fs": "^5.4.1",
"prettier": "^3.4.2"
}
}
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