Socket
Socket
Sign inDemoInstall

@babel/highlight

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/highlight - npm Package Compare versions

Comparing version 8.0.0-alpha.2 to 8.0.0-alpha.3

7

lib/index.js
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

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