Remove dependency on home-or-tmp package (#9678)

This commit is contained in:
Amir Seljubac
2019-03-13 23:20:29 +01:00
committed by Brian Ng
parent a64bf63639
commit 0a69b45126
2 changed files with 2 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
import path from "path";
import fs from "fs";
import os from "os";
import { sync as mkdirpSync } from "mkdirp";
import homeOrTmp from "home-or-tmp";
import * as babel from "@babel/core";
import findCacheDir from "find-cache-dir";
const DEFAULT_CACHE_DIR =
findCacheDir({ name: "@babel/register" }) || homeOrTmp;
findCacheDir({ name: "@babel/register" }) || os.homedir() || os.tmpdir();
const DEFAULT_FILENAME = path.join(
DEFAULT_CACHE_DIR,
`.babel.${babel.version}.${babel.getEnv()}.json`,