Skip to content

Commit

Permalink
Fix interface changes of json-colorize dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
usimd committed May 1, 2024
1 parent cf76612 commit 6f631e5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@actions/glob": "^0.4.0",
"@actions/io": "^1.1.3",
"ansi-colors": "^4.1.3",
"json-colorizer": "^3.0.0"
"json-colorizer": "^3.0.1"
},
"devDependencies": {
"@types/jest": "29.5.12",
Expand Down
19 changes: 11 additions & 8 deletions src/configure.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as core from '@actions/core'
import {DEFAULT_CONFIG, validateConfig, PiGenConfig} from './pi-gen-config'
import colorize from 'json-colorizer'
import {colorize, color} from 'json-colorizer'

export async function configure(): Promise<PiGenConfig> {
try {
Expand Down Expand Up @@ -59,13 +59,16 @@ export async function configure(): Promise<PiGenConfig> {
core.info(
colorize(JSON.stringify(userConfig, filterConfigFormat, 2), {
colors: {
BRACKET: 'magenta.bold',
BRACE: 'magenta.bold',
STRING_KEY: 'cyanBright',
BOOLEAN_LITERAL: 'blueBright',
NUMBER_LITERAL: 'greenBright',
NULL_LITERAL: 'blueBright',
STRING_LITERAL: 'red'
Bracket: color.magenta,
Brace: color.magenta,
StringKey: color.cyanBright,
BooleanLiteral: color.blueBright,
NumberLiteral: color.greenBright,
NullLiteral: color.blueBright,
StringLiteral: color.red,
Whitespace: color.reset,
Colon: color.white,
Comma: color.white
}
})
)
Expand Down

0 comments on commit 6f631e5

Please sign in to comment.