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

react-cosmos-shared2

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cosmos-shared2 - npm Package Compare versions

Comparing version 5.2.0-alpha.2 to 5.2.0-alpha.3

14

dist/fixtureTree/createFixtureTree/hideSingleChildDirs.js

@@ -8,4 +8,2 @@ "use strict";

var _lodash = require("lodash");
function hideSingleChildDirs(rootNode) {

@@ -20,15 +18,5 @@ var items = rootNode.items,

var newDirs = {};
(0, _lodash.forEach)(dirs, function (dir, dirName) {
var subDirNames = Object.keys(dir.dirs);
if (containsSingleDir(dir) && !newDirs[subDirNames[0]]) {
newDirs[subDirNames[0]] = hideSingleChildDirs(dir.dirs[subDirNames[0]]);
} else {
newDirs[dirName] = hideSingleChildDirs(dir);
}
});
return {
items: items,
dirs: newDirs
dirs: dirs
};

@@ -35,0 +23,0 @@ }

@@ -9,13 +9,4 @@ "use strict";

function getSortedNodeDirNames(nodeDirs) {
return Object.keys(nodeDirs).slice() // Sort alphabetically first
.sort().sort(function (dirName1, dirName2) {
return calcNodeDepth(nodeDirs[dirName2]) - calcNodeDepth(nodeDirs[dirName1]);
});
} // Only differentiate between nodes with and without subdirs and ignore
// depth level in the latter
function calcNodeDepth(node) {
var hasDirs = Object.keys(node.dirs).length > 0;
return hasDirs ? 1 : 0;
return Object.keys(nodeDirs).slice() // Sort alphabetically
.sort();
}

4

package.json
{
"name": "react-cosmos-shared2",
"version": "5.2.0-alpha.2",
"version": "5.2.0-alpha.3",
"description": "Code shared between Cosmos packages",

@@ -14,3 +14,3 @@ "repository": "https://github.com/react-cosmos/react-cosmos/tree/master/packages/react-cosmos-shared2",

},
"gitHead": "9684624429776b4ee18b67902d9a8d8e19ace2f9"
"gitHead": "3eb63074a13e6e94b5395c59b91d49caaf11746f"
}
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