@babel/highlight
Advanced tools
Comparing version 7.22.10 to 7.22.13
@@ -10,4 +10,5 @@ "use strict"; | ||
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); | ||
var _chalk2 = require("chalk"); | ||
const chalk = _chalk2; | ||
var _chalk = _interopRequireWildcard(require("chalk"), true); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); | ||
@@ -79,3 +80,3 @@ function getDefs(chalk) { | ||
function shouldHighlight(options) { | ||
return !!chalk.supportsColor || options.forceColor; | ||
return _chalk.default.level > 0 || options.forceColor; | ||
} | ||
@@ -86,3 +87,3 @@ let chalkWithForcedColor = undefined; | ||
var _chalkWithForcedColor; | ||
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk.constructor({ | ||
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ | ||
enabled: true, | ||
@@ -93,3 +94,3 @@ level: 1 | ||
} | ||
return chalk; | ||
return _chalk.default; | ||
} | ||
@@ -96,0 +97,0 @@ { |
{ | ||
"name": "@babel/highlight", | ||
"version": "7.22.10", | ||
"version": "7.22.13", | ||
"description": "Syntax highlight JavaScript strings for output in terminals.", | ||
@@ -5,0 +5,0 @@ "author": "The Babel Team (https://babel.dev/team)", |
Sorry, the diff of this file is not supported yet
18776
108