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

@bem/deps

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bem/deps - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

55

dist/resolve/add-native-dependencies.js

@@ -77,5 +77,8 @@ 'use strict';

var blockId = modifier.block,
var modifierId = (0, _bemNaming.stringify)(modifier),
blockId = modifier.block,
block = { block: blockId };
if (!bemTypifier._entityMap.has(blockId)) continue;
var hasOrderedDependency = false;

@@ -88,6 +91,6 @@

try {
for (var _iterator9 = dependencyGraph.orderedDependenciesOf(modifier)[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
var modifierDependency = _step9.value;
for (var _iterator9 = dependencyGraph.orderedDependenciesOf(block)[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
var blockDependency = _step9.value;
if ((0, _bemNaming.stringify)(modifierDependency) === blockId) {
if ((0, _bemNaming.stringify)(blockDependency) === modifierId) {
hasOrderedDependency = true;

@@ -141,3 +144,2 @@ break;

var block = booleanModifier.block,
elem = booleanModifier.elem,
modName = booleanModifier.modName,

@@ -154,3 +156,3 @@ ignoreVals = [];

if (modifierDependency.block === block && modifierDependency.elem === elem && modifierDependency.modName === modName) {
if (modifierDependency.block === block && modifierDependency.modName === modName) {
ignoreVals.push(modifierDependency.modVal);

@@ -182,3 +184,3 @@ }

if (modifier.block === block && modifier.elem === elem && modifier.modName === modName && ignoreVals.indexOf(modifier.modVal) === -1) {
if (modifier.block === block && modifier.modName === modName && ignoreVals.indexOf(modifier.modVal) === -1) {
dependencyGraph.addDependency(modifier, booleanModifier, { order: 'blockBooleanModifierBeforeBlockModifier' });

@@ -226,5 +228,8 @@ }

var element = { block: modifier.block, elem: modifier.elem },
var modifierId = (0, _bemNaming.stringify)(modifier),
element = { block: modifier.block, elem: modifier.elem },
elementId = (0, _bemNaming.stringify)(element);
if (!bemTypifier._entityMap.has(elementId)) continue;
var hasOrderedDependency = false;

@@ -237,6 +242,6 @@

try {
for (var _iterator12 = dependencyGraph.orderedDependenciesOf(modifier)[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
var modifierDependency = _step12.value;
for (var _iterator12 = dependencyGraph.orderedDependenciesOf(element)[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
var elementDependency = _step12.value;
if ((0, _bemNaming.stringify)(modifierDependency) === elementId) {
if ((0, _bemNaming.stringify)(elementDependency) === modifierId) {
hasOrderedDependency = true;

@@ -302,3 +307,3 @@ break;

if (modifierDependency.block === block && modifierDependency.elem === elem && modifierDependency.modName === modName) {
if (modifierDependency.block === block && elem && modifierDependency.elem === elem && modifierDependency.modName === modName) {
ignoreVals.push(modifierDependency.modVal);

@@ -330,3 +335,3 @@ }

if (modifier.block === block && modifier.elem === elem && modifier.modName === modName && ignoreVals.indexOf(modifier.modVal) === -1) {
if (modifier.block === block && elem && modifier.elem === elem && modifier.modName === modName && ignoreVals.indexOf(modifier.modVal) === -1) {
dependencyGraph.addDependency(modifier, booleanModifier, { order: 'elementBooleanModifierBeforeElementModifier' });

@@ -374,5 +379,8 @@ }

var blockId = modifier.block,
var modifierId = (0, _bemNaming.stringify)(modifier),
blockId = modifier.block,
block = { block: blockId };
if (!bemTypifier._entityMap.has(blockId)) continue;
var hasOrderedDependency = false;

@@ -385,6 +393,6 @@

try {
for (var _iterator15 = dependencyGraph.orderedDependenciesOf(modifier)[Symbol.iterator](), _step15; !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); _iteratorNormalCompletion15 = true) {
var modifierDependency = _step15.value;
for (var _iterator15 = dependencyGraph.orderedDependenciesOf(block)[Symbol.iterator](), _step15; !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); _iteratorNormalCompletion15 = true) {
var blockDependency = _step15.value;
if ((0, _bemNaming.stringify)(modifierDependency) === blockId) {
if ((0, _bemNaming.stringify)(blockDependency) === modifierId) {
hasOrderedDependency = true;

@@ -436,5 +444,8 @@ break;

var blockId = _element.block,
var elementId = (0, _bemNaming.stringify)(_element),
blockId = _element.block,
block = { block: blockId };
if (!bemTypifier._entityMap.has(blockId)) continue;
var hasOrderedDependency = false;

@@ -447,6 +458,6 @@

try {
for (var _iterator16 = dependencyGraph.orderedDependenciesOf(_element)[Symbol.iterator](), _step16; !(_iteratorNormalCompletion16 = (_step16 = _iterator16.next()).done); _iteratorNormalCompletion16 = true) {
var elementDependency = _step16.value;
for (var _iterator16 = dependencyGraph.orderedDependenciesOf(block)[Symbol.iterator](), _step16; !(_iteratorNormalCompletion16 = (_step16 = _iterator16.next()).done); _iteratorNormalCompletion16 = true) {
var blockDependency = _step16.value;
if ((0, _bemNaming.stringify)(elementDependency) === blockId) {
if ((0, _bemNaming.stringify)(blockDependency) === elementId) {
hasOrderedDependency = true;

@@ -472,3 +483,3 @@ break;

if (!hasOrderedDependency) {
dependencyGraph.addDependency(_element, block, { order: 'elementBeforeBlock' });
dependencyGraph.addDependency(_element, block, { order: 'blockBeforeElement' });
}

@@ -475,0 +486,0 @@ }

2

dist/resolve/dependency-graph/index.js

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

_context.prev = 8;
_iterator = orderedDependencies[Symbol.iterator]();
_iterator = Array.from(orderedDependencies).reverse()[Symbol.iterator]();

@@ -97,0 +97,0 @@ case 10:

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

var declarationEntityId = (0, _bemNaming.stringify)(declarationEntity);
var beforeEntities = [],

@@ -142,2 +143,3 @@ afterEntities = [];

if (declarationEntityId === entityId) continue;
if (visitedIds.has(entityId)) continue;

@@ -197,3 +199,2 @@

var declarationEntityId = (0, _bemNaming.stringify)(declarationEntity);
if (!addedIds.has(declarationEntityId)) {

@@ -200,0 +201,0 @@ resolvedDeclaration.push(declarationEntity);

{
"name": "@bem/deps",
"version": "0.0.1",
"version": "0.0.2",
"description": "",

@@ -49,6 +49,7 @@ "keywords": [

"scripts": {
"prepublish": "npm run dist",
"clean": "rm -rf dist",
"prepublish": "npm run clean && npm run dist",
"test": "npm run lint && npm run unit",
"lint": "jshint . && jscs . -c .jscs.js",
"spec": "mocha -R spec --opts spec/mocha.opts spec/",
"spec": "mocha --opts spec/mocha.opts spec/",
"bench": "matcha benchmark/*.js",

@@ -55,0 +56,0 @@ "cover": "istanbul cover _mocha --opts spec/mocha.opts",

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