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

docworks-repo

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docworks-repo - npm Package Compare versions

Comparing version 1.3.11 to 1.4.0

4

dist/merge.js

@@ -312,3 +312,5 @@ 'use strict';

var removedService = (0, _collectionUtils.copy)(sRepo, { labels: (0, _collectionUtils.addRemoveLabels)(sRepo.labels, 'removed', 'new') });
messages.push('Service ' + serviceKey(removedService) + ' was removed');
if (!sRepo.labels.find(function (_) {
return _ === 'removed';
})) messages.push('Service ' + serviceKey(removedService) + ' was removed');
return removedService;

@@ -315,0 +317,0 @@ }

@@ -263,3 +263,4 @@ import {zipByKey, addRemoveLabels, hasLabel, copy, compareArraysAsSets} from './collection-utils';

let removedService = copy(sRepo, {labels: addRemoveLabels(sRepo.labels, 'removed', 'new')});
messages.push(`Service ${serviceKey(removedService)} was removed`);
if (!sRepo.labels.find(_ => _ === 'removed'))
messages.push(`Service ${serviceKey(removedService)} was removed`);
return removedService;

@@ -266,0 +267,0 @@ }

{
"name": "docworks-repo",
"version": "1.3.11",
"version": "1.4.0",
"description": "manage service files in a git repo",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -106,2 +106,17 @@ import chai from 'chai';

it('should not re-report removed on a removed service', async function() {
let emptyRepo = [];
let repo = extractServices('./test/compare/repoVersion/changeServices');
// simulate existing service that is marked as removed
let repoServiceA = repo.find(serviceByName('ServiceA'));
repoServiceA.labels = ['removed'];
let mergedRepo = merge(emptyRepo, [repoServiceA]);
expect(mergedRepo.messages).to.satisfy((messages) => !messages.find(_ => _.indexOf('ServiceA') > -1));
let serviceB = mergedRepo.repo.find(serviceByName('ServiceA'));
expect(serviceB.labels).to.include.members(['removed']);
});
it('should remove the changed label if a service did not change', async function() {

@@ -108,0 +123,0 @@ let newRepo = extractServices('./test/compare/newVersion/changeServices');

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