Socket
Socket
Sign inDemoInstall

@babel/code-frame

Package Overview
Dependencies
10
Maintainers
5
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-beta.47 to 7.0.0-beta.48

24

lib/index.js

@@ -12,3 +12,3 @@ "use strict";

_highlight = function _highlight() {
_highlight = function () {
return data;

@@ -40,9 +40,6 @@ };

const endLoc = Object.assign({}, startLoc, loc.end);
const _ref = opts || {},
_ref$linesAbove = _ref.linesAbove,
linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove,
_ref$linesBelow = _ref.linesBelow,
linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow;
const {
linesAbove = 2,
linesBelow = 3
} = opts || {};
const startLine = startLoc.line;

@@ -112,8 +109,7 @@ const startColumn = startLoc.column;

const lines = rawLines.split(NEWLINE);
const _getMarkerLines = getMarkerLines(loc, lines, opts),
start = _getMarkerLines.start,
end = _getMarkerLines.end,
markerLines = _getMarkerLines.markerLines;
const {
start,
end,
markerLines
} = getMarkerLines(loc, lines, opts);
const hasColumns = loc.start && typeof loc.start.column === "number";

@@ -120,0 +116,0 @@ const numberMaxWidth = String(end).length;

{
"name": "@babel/code-frame",
"version": "7.0.0-beta.47",
"version": "7.0.0-beta.48",
"description": "Generate errors that contain a code frame that point to source locations.",

@@ -11,3 +11,3 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"dependencies": {
"@babel/highlight": "7.0.0-beta.47"
"@babel/highlight": "7.0.0-beta.48"
},

@@ -14,0 +14,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc