fix large numbers
Forwarded: not-needed Last-Update: 2020-05-19 Gbp-Pq: Name fix-large-numbers.diff
This commit is contained in:
parent
6a863e4817
commit
fb3ae96bd2
|
@ -12,7 +12,7 @@ import File from "./file/file";
|
||||||
import parser from "../parser";
|
import parser from "../parser";
|
||||||
|
|
||||||
const debug = buildDebug("babel:transform:file");
|
const debug = buildDebug("babel:transform:file");
|
||||||
const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1_000_000;
|
const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000;
|
||||||
|
|
||||||
export type NormalizedFile = {
|
export type NormalizedFile = {
|
||||||
code: string,
|
code: string,
|
||||||
|
|
|
@ -79,7 +79,7 @@ function normalizeOptions(code, opts): Format {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (format.compact === "auto") {
|
if (format.compact === "auto") {
|
||||||
format.compact = code.length > 500_000; // 500KB
|
format.compact = code.length > 500000; // 500KB
|
||||||
|
|
||||||
if (format.compact) {
|
if (format.compact) {
|
||||||
console.error(
|
console.error(
|
||||||
|
|
|
@ -117,7 +117,7 @@ export default class TraversalContext {
|
||||||
// this path no longer belongs to the tree
|
// this path no longer belongs to the tree
|
||||||
if (path.key === null) continue;
|
if (path.key === null) continue;
|
||||||
|
|
||||||
if (testing && queue.length >= 10_000) {
|
if (testing && queue.length >= 10000) {
|
||||||
this.trap = true;
|
this.trap = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue