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

cytoscape

Package Overview
Dependencies
Maintainers
3
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape - npm Package Compare versions

Comparing version 3.12.2 to 3.13.0

src/collection/algorithms/hopcroft-tarjan-biconnected.js

32

.size-snapshot.json
{
"build/cytoscape.umd.js": {
"bundled": 921218,
"minified": 341676,
"gzipped": 106237
"bundled": 926866,
"minified": 343399,
"gzipped": 106827
},
"build/cytoscape.cjs.js": {
"bundled": 848807,
"minified": 360099,
"gzipped": 108513
"bundled": 854137,
"minified": 362078,
"gzipped": 109159
},
"build/cytoscape.esm.js": {
"bundled": 848634,
"minified": 359956,
"gzipped": 108479,
"bundled": 853964,
"minified": 361935,
"gzipped": 109124,
"treeshaked": {
"rollup": {
"code": 336328,
"code": 338049,
"import_statements": 51
},
"webpack": {
"code": 338196
"code": 339923
}

@@ -27,12 +27,12 @@ }

"build/cytoscape.esm.min.js": {
"bundled": 341491,
"minified": 341001,
"gzipped": 106081,
"bundled": 343214,
"minified": 342724,
"gzipped": 106650,
"treeshaked": {
"rollup": {
"code": 340477,
"code": 342200,
"import_statements": 0
},
"webpack": {
"code": 341763
"code": 343484
}

@@ -39,0 +39,0 @@ }

{
"name": "cytoscape",
"version": "3.12.2",
"version": "3.13.0",
"license": "MIT",

@@ -110,2 +110,3 @@ "description": "Graph theory (a.k.a. network) library for analysis and visualisation",

"release": "run-s copyright dist docs",
"postpublish": "run-s docs:push",
"watch": "run-s watch:fast",

@@ -119,7 +120,7 @@ "watch:sync": "livereload \"build, debug\"",

"watch:build:cjs": "cross-env FILE=cjs SOURCEMAPS=true NODE_ENV=development rollup -c -w",
"test": "mocha -r esm --recursive",
"test": "run-s test:js test:modules lint",
"test:js": "mocha -r esm --recursive",
"test:build": "cross-env TEST_BUILD=true mocha",
"test:modules": "mocha -r esm test/modules",
"ci:build": "run-s build test:build test:modules lint",
"ci": "run-s test test:modules lint",
"travis": "run-s build test:build test:modules lint",
"docs": "run-s docs:build docs:js",

@@ -130,3 +131,3 @@ "docs:js": "cpy build/cytoscape.min.js documentation/js",

"benchmark": "run-s benchmark:single",
"benchmark:download": "download https://raw.githubusercontent.com/cytoscape/cytoscape.js/master/dist/cytoscape.js --out build --filename cytoscape.benchmark.js",
"benchmark:download": "download https://raw.githubusercontent.com/cytoscape/cytoscape.js/master/dist/cytoscape.cjs.js --out build --filename cytoscape.benchmark.js",
"benchmark:all:exec": "node benchmark/all",

@@ -143,25 +144,25 @@ "benchmark:all": "run-s benchmark:download benchmark:all:exec",

"chai": "^4.1.2",
"cpy-cli": "^2.0.0",
"cpy-cli": "^3.0.0",
"cross-env": "^6.0.0",
"download-cli": "^1.0.5",
"eslint": "^6.0.0",
"esm": "^3.0.8",
"esm": "^3.2.25",
"gh-pages": "^2.1.1",
"handlebars": "^4.1.2",
"handlebars": "^4.5.3",
"highlight.js": "^9.15.6",
"http-server": "^0.11.1",
"http-server": "^0.12.0",
"jsonlint": "^1.6.2",
"livereload": "^0.7.0",
"marked": "^0.7.0",
"livereload": "^0.8.2",
"marked": "^0.8.0",
"mocha": "^6.2.2",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.0",
"rollup": "^1.19.4",
"rollup": "^1.27.8",
"rollup-plugin-babel": "^4.3.0",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-license": "^0.11.0",
"rollup-plugin-license": "^0.13.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-size-snapshot": "^0.10.0",
"rollup-plugin-terser": "^5.0.0"
"rollup-plugin-terser": "^5.1.3"
},

@@ -168,0 +169,0 @@ "dependencies": {

@@ -110,12 +110,15 @@ <img style="width: 200px; height: 200px;" src="https://raw.githubusercontent.com/cytoscape/cytoscape.js/unstable/documentation/img/cytoscape-logo.png" width="200" height="200"></img>

If the `TRAVIS` or `TEST_BUILD` environment variables are defined, then `mocha` or `npm test` will test `build/cytoscape.umd.js`. Otherwise, the unbundled, unbabelified, raw source is tested. This keeps local tests very quick to run on modern versions of node while ensuring we can test old versions of node as well. The library can be built on `node>=6`, but it can be tested on `node>=0.10`.
The default test scripts run directly agasinst the source code. Tests can alternatively be run on a built bundle. The library can be built on `node>=6`, but the library's bundle can be tested on `node>=0.10`.
* `test` : run the Mocha unit tests
* `test:build` : run the Mocha unit tests (on a built bundle)
* `test` : run all testing & linting
* `test:js` : run the mocha tests on the public API of the lib (directly on source files)
* `npm run test:js -- -g "my test name"` runs tests on only the matching test cases
* `test:build` : run the mocha tests on the public API of the lib (on a built bundle)
* `npm run build` should be run beforehand on a recent version of node
* `npm run test:build -- -g "my test name"` runs build tests on only the matching test cases
* `test:modules` : run unit tests on private, internal API
* `npm run test:modules -- -g "my test name"` runs modules tests on only the matching test cases
* `lint` : lint the js sources via eslint
* `ci` : run tests and linting
* `ci:build` : run tests and linting (on a built bundle)
* `benchmark` : run all benchmarks
* `benchmark:single` : run benchmarks only for the suite specified in `benchmark/single`
* `sniper` : runs a biojs sniper server that hosts demos

@@ -147,2 +150,2 @@

Mocha tests are found in the [test directory](https://github.com/cytoscape/cytoscape.js/tree/master/test). The tests can be run in the browser or they can be run via Node.js (`npm test` or `mocha`).
Mocha tests are found in the [test directory](https://github.com/cytoscape/cytoscape.js/tree/master/test). The tests can be run in the browser or they can be run via Node.js (`npm run test:js`).

@@ -18,2 +18,3 @@ import * as util from '../../util';

import hierholzer from './hierholzer';
import hopcroftTarjanBiconnected from './hopcroft-tarjan-biconnected';

@@ -38,3 +39,4 @@ var elesfn = {};

affinityPropagation,
hierholzer
hierholzer,
hopcroftTarjanBiconnected
].forEach(function(props) {

@@ -41,0 +43,0 @@ util.extend(elesfn, props);

@@ -160,6 +160,33 @@ import { error } from '../../util';

// construct components corresponding to each disjoint subset of nodes
const constructComponent = (subset) => {
const component = this.spawn();
subset.forEach(node => {
component.merge(node);
node.connectedEdges().forEach(edge => {
// ensure edge is within calling collection and edge is not in cut
if (this.contains(edge) && !cut.contains(edge)) {
component.merge(edge);
}
});
});
return component;
};
const components = [
constructComponent(partition1),
constructComponent(partition2)
];
let ret = {
cut,
components,
// n.b. partitions are included to be compatible with the old api spec
// (could be removed in a future major version)
partition1,
partition2,
partition2
};

@@ -166,0 +193,0 @@

@@ -125,2 +125,32 @@ import * as is from '../is' ;

const defineSymbolIterator = () => {
const typeofUndef = typeof undefined;
const isIteratorSupported = typeof Symbol != typeofUndef && typeof Symbol.iterator != typeofUndef; // eslint-disable-line no-undef
if (isIteratorSupported) {
elesfn[Symbol.iterator] = function() { // eslint-disable-line no-undef
let entry = { value: undefined, done: false };
let i = 0;
let length = this.length;
return {
next: () => {
if ( i < length ) {
entry.value = this[i++];
} else {
entry.value = undefined;
entry.done = true;
}
return entry;
},
[Symbol.iterator]: function() { // eslint-disable-line no-undef
return this;
}
};
};
}
};
defineSymbolIterator();
export default elesfn;

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

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

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

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

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