Sha256: 0ea0d3a24cf3764822d4f64540a5e194b537597dbee821cd5054e599e8c87842

Contents?: true

Size: 524 Bytes

Versions: 5

Compression:

Stored size: 524 Bytes

Contents

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { existsSync, readFileSync } = require("fs");

const filepath = process.argv[process.argv.length - 1];

const timeout = setTimeout(() => {
  clearInterval(interval);
  throw new Error("Failed to get information from parse server in time.");
}, 5000);

const interval = setInterval(() => {
  if (existsSync(filepath)) {
    process.stdout.write(readFileSync(filepath).toString("utf8"));
    clearTimeout(timeout);
    clearInterval(interval);
  }
}, 100);

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
prettier-2.0.0 dist/parser/getInfo.js
prettier-2.0.0.pre.rc4 dist/parser/getInfo.js
prettier-2.0.0.pre.rc3 dist/parser/getInfo.js
prettier-2.0.0.pre.rc2 dist/parser/getInfo.js
prettier-2.0.0.pre.rc1 dist/parser/getInfo.js