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

workspace-tools

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workspace-tools - npm Package Compare versions

Comparing version 0.19.1 to 0.19.2

17

CHANGELOG.json

@@ -5,3 +5,18 @@ {

{
"date": "Fri, 03 Jun 2022 16:57:02 GMT",
"date": "Thu, 23 Jun 2022 18:51:59 GMT",
"tag": "workspace-tools_v0.19.2",
"version": "0.19.2",
"comments": {
"patch": [
{
"author": "elcraig@microsoft.com",
"package": "workspace-tools",
"comment": "Allow full spawnSync options for git methods",
"commit": "cf0a0d77be58988e411d0349c8a009642770696e"
}
]
}
},
{
"date": "Fri, 03 Jun 2022 16:57:07 GMT",
"tag": "workspace-tools_v0.19.1",

@@ -8,0 +23,0 @@ "version": "0.19.1",

# Change Log - workspace-tools
This log was last generated on Fri, 03 Jun 2022 16:57:02 GMT and should not be manually modified.
This log was last generated on Thu, 23 Jun 2022 18:51:59 GMT and should not be manually modified.
<!-- Start content -->
## 0.19.2
Thu, 23 Jun 2022 18:51:59 GMT
### Patches
- Allow full spawnSync options for git methods (elcraig@microsoft.com)
## 0.19.1
Fri, 03 Jun 2022 16:57:02 GMT
Fri, 03 Jun 2022 16:57:07 GMT

@@ -11,0 +19,0 @@ ### Patches

17

lib/git.d.ts

@@ -0,1 +1,3 @@

/// <reference types="node" />
import { SpawnSyncOptions } from "child_process";
declare type ProcessOutput = {

@@ -6,2 +8,3 @@ stderr: string;

};
/** Observes the git operations called from `git()` or `gitFailFast()` */
declare type GitObserver = (args: string[], output: ProcessOutput) => void;

@@ -14,15 +17,9 @@ /**

/**
* Runs git command - use this for read only commands
* Runs git command - use this for read-only commands
*/
export declare function git(args: string[], options?: {
cwd: string;
maxBuffer?: number;
}): ProcessOutput;
export declare function git(args: string[], options?: SpawnSyncOptions): ProcessOutput;
/**
* Runs git command - use this for commands that makes changes to the file system
* Runs git command - use this for commands that make changes to the filesystem
*/
export declare function gitFailFast(args: string[], options?: {
cwd: string;
maxBuffer?: number;
}): void;
export declare function gitFailFast(args: string[], options?: SpawnSyncOptions): void;
export declare function getUntrackedChanges(cwd: string): string[];

@@ -29,0 +26,0 @@ export declare function fetchRemote(remote: string, cwd: string): void;

@@ -19,7 +19,7 @@ "use strict";

/**
* A maxBuffer override globally for all git operations
* Bumps up the default to 500MB as opposed to the 1MB
* Override this value with "GIT_MAX_BUFFER" environment variable
* A global maxBuffer override for all git operations.
* Bumps up the default to 500MB instead of 1MB.
* Override this value with the `GIT_MAX_BUFFER` environment variable.
*/
const MaxBufferOption = process.env.GIT_MAX_BUFFER ? parseInt(process.env.GIT_MAX_BUFFER) : 500 * 1024 * 1024;
const defaultMaxBuffer = process.env.GIT_MAX_BUFFER ? parseInt(process.env.GIT_MAX_BUFFER) : 500 * 1024 * 1024;
const observers = [];

@@ -36,21 +36,11 @@ let observing;

/**
* Runs git command - use this for read only commands
* Runs git command - use this for read-only commands
*/
function git(args, options) {
const results = (0, child_process_1.spawnSync)("git", args, Object.assign({ maxBuffer: MaxBufferOption }, options));
let output;
if (results.status === 0) {
output = {
stderr: results.stderr.toString().trimRight(),
stdout: results.stdout.toString().trimRight(),
success: true,
};
}
else {
output = {
stderr: results.stderr.toString().trimRight(),
stdout: results.stdout.toString().trimRight(),
success: false,
};
}
const results = (0, child_process_1.spawnSync)("git", args, Object.assign({ maxBuffer: defaultMaxBuffer }, options));
const output = {
stderr: results.stderr.toString().trimRight(),
stdout: results.stdout.toString().trimRight(),
success: results.status === 0
};
// notify observers, flipping the observing bit to prevent infinite loops

@@ -68,3 +58,3 @@ if (!observing) {

/**
* Runs git command - use this for commands that makes changes to the file system
* Runs git command - use this for commands that make changes to the filesystem
*/

@@ -71,0 +61,0 @@ function gitFailFast(args, options) {

{
"name": "workspace-tools",
"version": "0.19.1",
"version": "0.19.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

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