File: remove-babel-code-frame.diff

package info (click to toggle)
node-react 18.2.0%2Bdfsg%2B~cs87.31.26-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 30,356 kB
  • sloc: javascript: 361,793; cpp: 1,326; sh: 52; makefile: 46
file content (27 lines) | stat: -rw-r--r-- 1,037 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: remove useless babel-code-frame
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2020-10-21

--- a/scripts/rollup/build.js
+++ b/scripts/rollup/build.js
@@ -17,7 +17,6 @@
 const stripUnusedImports = require('./plugins/strip-unused-imports');
 const Packaging = require('./packaging');
 const {asyncRimRaf} = require('./utils');
-const codeFrame = require('babel-code-frame');
 const Wrappers = require('./wrappers');
 
 const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL;
@@ -645,10 +644,7 @@
     const rawLines = fs.readFileSync(file, 'utf-8');
     // column + 1 is required due to rollup counting column start position from 0
     // whereas babel-code-frame counts from 1
-    const frame = codeFrame(rawLines, line, column + 1, {
-      highlightCode: true,
-    });
-    console.error(frame);
+    console.error(rawLines);
   } else if (error.codeFrame) {
     // This looks like an error from a plugin (e.g. Babel).
     // In this case we'll resort to displaying the provided code frame