Socket
Socket
Sign inDemoInstall

lint-staged

Package Overview
Dependencies
Maintainers
1
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lint-staged - npm Package Compare versions

Comparing version 13.1.3 to 13.1.4

8

lib/figures.js

@@ -1,8 +0,8 @@

import { blue, redBright, yellow } from 'colorette'
import chalk from 'chalk'
import { figures } from 'listr2'
export const info = blue(figures.arrowRight)
export const info = chalk.blue(figures.arrowRight)
export const error = redBright(figures.cross)
export const error = chalk.redBright(figures.cross)
export const warning = yellow(figures.warning)
export const warning = chalk.yellow(figures.warning)

@@ -1,2 +0,2 @@

import { redBright, bold, yellow } from 'colorette'
import chalk from 'chalk'
import inspect from 'object-inspect'

@@ -7,5 +7,5 @@

export const configurationError = (opt, helpMsg, value) =>
`${redBright(`${error} Validation Error:`)}
`${chalk.redBright(`${error} Validation Error:`)}
Invalid value for '${bold(opt)}': ${bold(
Invalid value for '${chalk.bold(opt)}': ${chalk.bold(
inspect(value, { inlineCharacterLimit: Number.POSITIVE_INFINITY })

@@ -16,8 +16,8 @@ )}

export const NOT_GIT_REPO = redBright(`${error} Current directory is not a git directory!`)
export const NOT_GIT_REPO = chalk.redBright(`${error} Current directory is not a git directory!`)
export const FAILED_GET_STAGED_FILES = redBright(`${error} Failed to get staged files!`)
export const FAILED_GET_STAGED_FILES = chalk.redBright(`${error} Failed to get staged files!`)
export const incorrectBraces = (before, after) =>
yellow(
chalk.yellow(
`${warning} Detected incorrect braces with only single value: \`${before}\`. Reformatted as: \`${after}\`

@@ -41,6 +41,6 @@ `

return yellow(`${warning} Skipping backup because ${reason}.\n`)
return chalk.yellow(`${warning} Skipping backup because ${reason}.\n`)
}
export const DEPRECATED_GIT_ADD = yellow(
export const DEPRECATED_GIT_ADD = chalk.yellow(
`${warning} Some of your tasks use \`git add\` command. Please remove it from the config since all modifications made by tasks will be automatically added to the git commit index.

@@ -54,7 +54,9 @@ `

export const GIT_ERROR = `\n ${redBright(`${error} lint-staged failed due to a git error.`)}`
export const GIT_ERROR = `\n ${chalk.redBright(`${error} lint-staged failed due to a git error.`)}`
export const invalidOption = (name, value, message) => `${redBright(`${error} Validation Error:`)}
export const invalidOption = (name, value, message) => `${chalk.redBright(
`${error} Validation Error:`
)}
Invalid value for option '${bold(name)}': ${bold(value)}
Invalid value for option '${chalk.bold(name)}': ${chalk.bold(value)}

@@ -66,3 +68,3 @@ ${message}

export const PREVENTED_EMPTY_COMMIT = `
${yellow(`${warning} lint-staged prevented an empty git commit.
${chalk.yellow(`${warning} lint-staged prevented an empty git commit.
Use the --allow-empty option to continue, or check your task configuration`)}

@@ -69,0 +71,0 @@ `

@@ -1,2 +0,2 @@

import { redBright, dim } from 'colorette'
import chalk from 'chalk'
import { execa, execaCommand } from 'execa'

@@ -35,3 +35,3 @@ import debug from 'debug'

if (hasOutput) {
const outputTitle = isError ? redBright(`${error} ${command}:`) : `${info} ${command}:`
const outputTitle = isError ? chalk.redBright(`${error} ${command}:`) : `${info} ${command}:`
const output = []

@@ -45,3 +45,3 @@ .concat(ctx.quiet ? [] : ['', outputTitle])

const tag = getTag(result)
const message = redBright(`\n${error} ${command} failed without output (${tag}).`)
const message = chalk.redBright(`\n${error} ${command} failed without output (${tag}).`)
if (!ctx.quiet) ctx.output.push(message)

@@ -121,3 +121,3 @@ }

const tag = getTag(result)
return new Error(`${redBright(command)} ${dim(`[${tag}]`)}`)
return new Error(`${chalk.redBright(command)} ${chalk.dim(`[${tag}]`)}`)
}

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

@@ -5,3 +5,3 @@ /** @typedef {import('./index').Logger} Logger */

import { dim } from 'colorette'
import chalk from 'chalk'
import debug from 'debug'

@@ -208,3 +208,3 @@ import { Listr } from 'listr2'

return {
title: `${task.pattern}${dim(
title: `${task.pattern}${chalk.dim(
` — ${fileCount} ${fileCount === 1 ? 'file' : 'files'}`

@@ -221,3 +221,3 @@ )}`,

if (fileCount === 0) {
return `${task.pattern}${dim(' — no files')}`
return `${task.pattern}${chalk.dim(' — no files')}`
}

@@ -233,4 +233,4 @@ return false

title:
`${configName}${dim(` — ${files.length} ${files.length > 1 ? 'files' : 'file'}`)}` +
(chunkCount > 1 ? dim(` (chunk ${index + 1}/${chunkCount})...`) : ''),
`${configName}${chalk.dim(` — ${files.length} ${files.length > 1 ? 'files' : 'file'}`)}` +
(chunkCount > 1 ? chalk.dim(` (chunk ${index + 1}/${chunkCount})...`) : ''),
task: (ctx, task) => task.newListr(chunkListrTasks, { concurrent, exitOnError: true }),

@@ -242,3 +242,3 @@ skip: () => {

if (chunkListrTasks.every((task) => task.skip())) {
return `${configName}${dim(' — no tasks to run')}`
return `${configName}${chalk.dim(' — no tasks to run')}`
}

@@ -245,0 +245,0 @@ return false

{
"name": "lint-staged",
"version": "13.1.3",
"version": "13.1.4",
"description": "Lint files staged by git",

@@ -36,4 +36,4 @@ "license": "MIT",

"dependencies": {
"chalk": "5.2.0",
"cli-truncate": "^3.1.0",
"colorette": "^2.0.19",
"commander": "^10.0.0",

@@ -40,0 +40,0 @@ "debug": "^4.3.4",

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