Socket
Socket
Sign inDemoInstall

simple-git

Package Overview
Dependencies
Maintainers
2
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-git - npm Package Compare versions

Comparing version 2.46.0 to 2.47.0

src/lib/tasks/grep.d.ts

7

CHANGELOG.md
# Change History & Release Notes
## [2.47.0](https://www.github.com/steveukx/git-js/compare/v2.46.0...v2.47.0) (2021-10-19)
### Features
* git-grep ([653065e](https://www.github.com/steveukx/git-js/commit/653065ebb19bb6718466fc00d9c77047b83aca5d))
## [2.46.0](https://www.github.com/steveukx/git-js/compare/v2.45.1...v2.46.0) (2021-09-29)

@@ -4,0 +11,0 @@

4

package.json
{
"name": "simple-git",
"description": "Simple GIT interface for node.js",
"version": "2.46.0",
"version": "2.47.0",
"author": "Steve King <steve@mydev.co>",

@@ -15,3 +15,3 @@ "contributors": [

"@kwsites/promise-deferred": "^1.1.1",
"debug": "^4.3.1"
"debug": "^4.3.2"
},

@@ -18,0 +18,0 @@ "devDependencies": {

# Simple Git
[![NPM version](https://img.shields.io/npm/v/simple-git.svg)](https://www.npmjs.com/package/simple-git)
[![Build Status](https://travis-ci.org/steveukx/git-js.svg?branch=master)](https://travis-ci.org/steveukx/git-js)

@@ -254,2 +253,7 @@ A lightweight interface for running `git` commands in any [node.js](https://nodejs.org) application.

## git grep [examples](./examples/git-grep.md)
- `.grep(searchTerm)` searches for a single search term across all files in the working tree, optionally passing a standard [options](#how-to-specify-options) object of additional arguments
- `.grep(grepQueryBuilder(...))` use the `grepQueryBuilder` to create a complex query to search for, optionally passing a standard [options](#how-to-specify-options) object of additional arguments
## git hash-object

@@ -256,0 +260,0 @@

@@ -9,2 +9,3 @@ import { GitConstructError } from './errors/git-construct-error';

import { GitConfigScope } from './tasks/config';
import { grepQueryBuilder } from './tasks/grep';
import { ResetMode } from './tasks/reset';

@@ -21,3 +22,4 @@ declare const api: {

TaskConfigurationError: typeof TaskConfigurationError;
grepQueryBuilder: typeof grepQueryBuilder;
};
export default api;

@@ -11,2 +11,3 @@ "use strict";

const config_1 = require("./tasks/config");
const grep_1 = require("./tasks/grep");
const reset_1 = require("./tasks/reset");

@@ -23,4 +24,5 @@ const api = {

TaskConfigurationError: task_configuration_error_1.TaskConfigurationError,
grepQueryBuilder: grep_1.grepQueryBuilder,
};
exports.default = api;
//# sourceMappingURL=api.js.map

@@ -23,3 +23,4 @@ import { SimpleGitFactory } from '../../typings';

TaskConfigurationError: typeof import("./errors/task-configuration-error").TaskConfigurationError;
grepQueryBuilder: typeof import("./tasks/grep").grepQueryBuilder;
};
export declare function gitInstanceFactory(baseDir?: string | Partial<SimpleGitOptions>, options?: Partial<SimpleGitOptions>): any;

@@ -7,2 +7,3 @@ "use strict";

const config_1 = require("./tasks/config");
const grep_1 = require("./tasks/grep");
const hash_object_1 = require("./tasks/hash-object");

@@ -79,3 +80,3 @@ const init_1 = require("./tasks/init");

exports.SimpleGitApi = SimpleGitApi;
Object.assign(SimpleGitApi.prototype, config_1.default(), log_1.default());
Object.assign(SimpleGitApi.prototype, config_1.default(), grep_1.default(), log_1.default());
//# sourceMappingURL=simple-git-api.js.map
/// <reference types="node" />
import { Maybe } from '../types';
export declare const NULL = "\0";
export declare const NOOP: (...args: any[]) => void;

@@ -4,0 +5,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.delay = exports.pick = exports.bufferToString = exports.prefixedArray = exports.asNumber = exports.asStringArray = exports.asArray = exports.objectToString = exports.remove = exports.including = exports.append = exports.folderExists = exports.forEachLineWithContent = exports.toLinesWithContent = exports.last = exports.first = exports.splitOn = exports.isUserFunction = exports.asFunction = exports.NOOP = void 0;
exports.delay = exports.pick = exports.bufferToString = exports.prefixedArray = exports.asNumber = exports.asStringArray = exports.asArray = exports.objectToString = exports.remove = exports.including = exports.append = exports.folderExists = exports.forEachLineWithContent = exports.toLinesWithContent = exports.last = exports.first = exports.splitOn = exports.isUserFunction = exports.asFunction = exports.NOOP = exports.NULL = void 0;
const file_exists_1 = require("@kwsites/file-exists");
exports.NULL = '\0';
const NOOP = () => {

@@ -6,0 +7,0 @@ };

@@ -180,2 +180,12 @@ import { DefaultLogFields } from '../src/lib/tasks/log';

/** Represents the response to git.grep */
export interface GrepResult {
paths: Set<string>;
results: Record<string, Array<{
line: number;
path: string;
preview: string;
}>>;
}
/**

@@ -215,3 +225,3 @@ * The `InitResult` is returned when (re)initialising a git repo.

*/
moves: Array<{from: string, to: string}>;
moves: Array<{ from: string, to: string }>;
}

@@ -218,0 +228,0 @@

@@ -391,2 +391,9 @@ import * as resp from './response';

/**
* Search for files matching the supplied search terms
*/
grep(searchTerm: string | types.GitGrepQuery, callback?: types.SimpleGitTaskCallback<resp.GrepResult>): Response<resp.GrepResult>;
grep(searchTerm: string | types.GitGrepQuery, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.GrepResult>): Response<resp.GrepResult>;
/**
* List remotes by running the `ls-remote` command with any number of arbitrary options

@@ -393,0 +400,0 @@ * in either array of object form.

@@ -8,2 +8,3 @@ export { RemoteWithoutRefs, RemoteWithRefs } from '../src/lib/responses/GetRemoteSummary';

export { ApplyOptions } from '../src/lib/tasks/apply-patch';
export { CheckRepoActions } from '../src/lib/tasks/check-is-repo';

@@ -13,3 +14,3 @@ export { CleanOptions, CleanMode } from '../src/lib/tasks/clean';

export { GitConfigScope } from '../src/lib/tasks/config';
export { ApplyOptions } from '../src/lib/tasks/apply-patch';
export { GitGrepQuery, grepQueryBuilder } from '../src/lib/tasks/grep';
export { ResetOptions, ResetMode } from '../src/lib/tasks/reset';

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc