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

@bscotch/blork-shared

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bscotch/blork-shared - npm Package Compare versions

Comparing version 0.30.1 to 0.30.2

7

dist/tasks.d.ts

@@ -93,2 +93,9 @@ import { Assignments, CommentData, TaskData, UserDataSafe } from './index.js';

/**
* Returns `true` if the task has multiple assignees,
* where at least one is done and at least one is not done.
* For all other cases returns `false`.
*/
export declare function taskIsPartiallyComplete(task: TaskData | undefined): boolean;
export declare function taskIsPartiallyComplete(tasks: TaskCache, taskId: string): boolean;
/**
* If the user is an assignee (directly or through a group) to the task,

@@ -95,0 +102,0 @@ * *and* the task is marked as done for that assignment, return `true`. Else `false` (including if the user is not assigned).

@@ -296,2 +296,25 @@ import { assert, assertNoConflict, assertValidRequest } from './errors.js';

}
export function taskIsPartiallyComplete(tasks, taskId) {
if (!tasks)
return false;
const task = tasks instanceof Map ? tasks.get(taskId) : tasks;
if (!task)
return false;
const assignees = userAssignmentsToArray(task.assigned);
if (assignees.length < 2)
return false;
let hasDone = false;
let hasNotDone = false;
for (const owner of assignees) {
if (owner.done) {
hasDone = true;
}
else {
hasNotDone = true;
}
if (hasDone && hasNotDone)
return true;
}
return false;
}
/**

@@ -298,0 +321,0 @@ * If the user is an assignee (directly or through a group) to the task,

8

package.json
{
"name": "@bscotch/blork-shared",
"version": "0.30.1",
"version": "0.30.2",
"description": "Client and shared utilities for Blork projects.",

@@ -19,4 +19,4 @@ "keywords": [],

"@leeoniya/ufuzzy": "1.0.14",
"marked": "14.1.3",
"shiki": "1.22.2",
"marked": "15.0.2",
"shiki": "1.23.1",
"zod": "^3.23.8"

@@ -26,3 +26,3 @@ },

"source-map-support": "0.5.21",
"typescript": "5.6.3"
"typescript": "5.7.2"
},

@@ -29,0 +29,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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