Socket
Socket
Sign inDemoInstall

eslint-plugin-diff

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-diff - npm Package Compare versions

Comparing version 1.0.13-5 to 1.0.13-6

36

dist/git.js

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

const RUNNING_INSIDE_VSCODE = process.env.VSCODE_CLI !== undefined;
const COMMAND = "git";
const sanitizeFilePath = (filePath) => JSON.stringify(path.resolve(filePath));

@@ -41,4 +42,3 @@ const diffCacheKey = (filePath, staged) => JSON.stringify([path.resolve(filePath), staged]);

if (RUNNING_INSIDE_VSCODE || diff === undefined) {
const command = [
"git",
const args = [
"diff",

@@ -54,6 +54,4 @@ "--diff-algorithm=histogram",

sanitizeFilePath(filePath),
]
.filter(Boolean)
.join(" ");
const result = child_process.execSync(command).toString();
].reduce((acc, cur) => (typeof cur === "string" ? [...acc, cur] : acc), []);
const result = child_process.execFileSync(COMMAND, args).toString();
setCachedDiff(filePath, staged, result);

@@ -69,4 +67,3 @@ diff = result;

if (RUNNING_INSIDE_VSCODE || diffFileListCache === undefined) {
const command = [
"git",
const args = [
"diff",

@@ -80,7 +77,5 @@ "--diff-algorithm=histogram",

JSON.stringify((_a = process.env.ESLINT_PLUGIN_DIFF_COMMIT) !== null && _a !== void 0 ? _a : "HEAD"),
]
.filter(Boolean)
.join(" ");
];
diffFileListCache = child_process
.execSync(command)
.execFileSync(COMMAND, args)
.toString()

@@ -97,5 +92,5 @@ .trim()

if (RUNNING_INSIDE_VSCODE || gitFileListCache === undefined) {
const command = ["git", "ls-files"].filter(Boolean).join(" ");
const args = ["ls-files"];
gitFileListCache = child_process
.execSync(command)
.execFileSync(COMMAND, args)
.toString()

@@ -110,4 +105,3 @@ .trim()

const hasCleanIndex = (filePath) => {
const command = [
"git",
const args = [
"diff",

@@ -119,6 +113,6 @@ "--quiet",

sanitizeFilePath(filePath),
].join(" ");
];
let result = true;
try {
child_process.execSync(command).toString();
child_process.execFileSync(COMMAND, args).toString();
}

@@ -137,7 +131,5 @@ catch (err) {

else if (RUNNING_INSIDE_VSCODE || untrackedFileListCache === undefined) {
const command = ["git", "ls-files", "--exclude-standard", "--others"]
.filter(Boolean)
.join(" ");
const args = ["ls-files", "--exclude-standard", "--others"];
untrackedFileListCache = child_process
.execSync(command)
.execFileSync(COMMAND, args)
.toString()

@@ -144,0 +136,0 @@ .trim()

{
"name": "eslint-plugin-diff",
"version": "1.0.13-5",
"version": "1.0.13-6",
"description": "Run ESLint on your changes only",

@@ -43,27 +43,27 @@ "keywords": [

"devDependencies": {
"@paleite/eslint-config": "^1.0.0",
"@paleite/eslint-config-base": "^1.0.0",
"@paleite/eslint-config-typescript": "^1.0.0",
"@paleite/jest-config": "^1.0.0",
"@paleite/prettier-config": "^1.0.0",
"@paleite/tsconfig-node16": "^1.0.0",
"@types/eslint": "^8.4.1",
"@types/jest": "^27.4.1",
"@paleite/eslint-config": "^1.0.2",
"@paleite/eslint-config-base": "^1.0.2",
"@paleite/eslint-config-typescript": "^1.0.2",
"@paleite/jest-config": "^1.0.2",
"@paleite/prettier-config": "^1.0.2",
"@paleite/tsconfig-node16": "^1.0.2",
"@types/eslint": "^8.4.2",
"@types/jest": "^28.1.1",
"@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"eslint": "^8.11.0",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"eslint": "^8.17.0",
"eslint-config-prettier": "^8.5.0",
"eslint-files": "^1.0.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.0.0",
"husky": "^7.0.4",
"jest": "^27.5.1",
"jest-mock": "^27.5.1",
"lint-staged": "^12.3.7",
"husky": "^8.0.1",
"jest": "^28.1.0",
"jest-mock": "^28.1.0",
"lint-staged": "^13.0.0",
"np": "^7.6.1",
"pinst": "^3.0.0",
"prettier": "^2.6.0",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
"prettier": "^2.6.2",
"ts-jest": "^28.0.4",
"typescript": "^4.7.3"
},

@@ -70,0 +70,0 @@ "peerDependencies": {

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