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

git-changed-files

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-changed-files - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

3

index.js

@@ -26,3 +26,4 @@ const chalk = require('chalk');

diffFilter: 'ACDMRTUXB',
formats: false
formats: false,
showStatus: false
};

@@ -29,0 +30,0 @@

{
"name": "git-changed-files",
"version": "0.0.2",
"version": "0.1.0",
"description": "Get the change between any of your branch and current branch of a `git` repository",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -29,3 +29,3 @@ # git-changed-files

(async() => {
let committedGitFiles = await gitStatus();
let committedGitFiles = await gitChangedFiles();
console.log(committedGitFiles);

@@ -40,3 +40,3 @@ })().catch((err) => {

(async() => {
let committedGitFiles = await gitStatus({ formats: ['*.yml'] });
let committedGitFiles = await gitChangedFiles({ formats: ['*.yml'] });
console.log(committedGitFiles);

@@ -51,3 +51,3 @@ })().catch((err) => {

(async() => {
let committedGitFiles = await gitStatus({ formats: ['!*.yml'] });
let committedGitFiles = await gitChangedFiles({ formats: ['!*.yml'] });
console.log(committedGitFiles);

@@ -62,3 +62,3 @@ })().catch((err) => {

(async() => {
let committedGitFiles = await gitStatus({ diffFilter: 'A' });
let committedGitFiles = await gitChangedFiles({ diffFilter: 'A' });
console.log(committedGitFiles);

@@ -71,2 +71,18 @@ })().catch((err) => {

(async() => {
let committedGitFiles = await gitChangedFiles({ showStatus: true });
console.log(committedGitFiles);
})().catch((err) => {
console.log(err);
});
/*
Expected:
[ { filename: '.editorconfig', status: 'Deleted' },
{ filename: '.travis.yml', status: 'Modified' },
{ filename: 'destroy.js', status: 'Added' },
{ filename: 'index.js', status: 'Modified' },
{ filename: 'package.json', status: 'Modified' } ]
*/
```

@@ -122,2 +138,13 @@

##### showStatus
Type: `boolean`<br />
Default: `false`
To show the type of file change in the result.
Example: If showStatus is true then output will be
`[{ filename: '.editorconfig', status: 'Deleted' }]`
## Built With

@@ -124,0 +151,0 @@

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