@babel/highlight
Advanced tools
Comparing version 8.0.0-alpha.2 to 8.0.0-alpha.3
import jsTokens from 'js-tokens'; | ||
import { isKeyword, isStrictReservedWord } from '@babel/helper-validator-identifier'; | ||
import _chalk from 'chalk'; | ||
import chalk, { Chalk } from 'chalk'; | ||
const chalk = _chalk; | ||
const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); | ||
@@ -127,3 +126,3 @@ function getDefs(chalk) { | ||
function shouldHighlight(options) { | ||
return !!chalk.supportsColor || options.forceColor; | ||
return chalk.level > 0 || options.forceColor; | ||
} | ||
@@ -133,3 +132,3 @@ let chalkWithForcedColor = undefined; | ||
if (forceColor) { | ||
chalkWithForcedColor ??= new chalk.Instance({ | ||
chalkWithForcedColor ??= new Chalk({ | ||
level: 1 | ||
@@ -136,0 +135,0 @@ }); |
{ | ||
"name": "@babel/highlight", | ||
"version": "8.0.0-alpha.2", | ||
"version": "8.0.0-alpha.3", | ||
"description": "Syntax highlight JavaScript strings for output in terminals.", | ||
@@ -18,4 +18,4 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/helper-validator-identifier": "^8.0.0-alpha.2", | ||
"chalk": "^4.1.2", | ||
"@babel/helper-validator-identifier": "^8.0.0-alpha.3", | ||
"chalk": "^5.3.0", | ||
"js-tokens": "^8.0.0" | ||
@@ -22,0 +22,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18128
146
69
0
0
0
15
+ Addedchalk@5.3.0(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedsupports-color@7.2.0(transitive)
Updatedchalk@^5.3.0