From 1f7ee2ed1c4088996667dc415f767288cadc4c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dandelion=20Man=C3=A9?= Date: Thu, 18 Jul 2019 14:30:21 +0100 Subject: [PATCH] deprecate cli/load This commit deprecates `cli/load` so that we can write a new implementation, and then make an atomic switch. Test plan: `yarn test --full` --- src/cli/{load.js => deprecated_load.js} | 0 src/cli/{load.test.js => deprecated_load.test.js} | 4 ++-- src/cli/help.js | 2 +- src/cli/sourcecred.js | 2 +- src/cli/sourcecred.test.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/cli/{load.js => deprecated_load.js} (100%) rename src/cli/{load.test.js => deprecated_load.test.js} (99%) diff --git a/src/cli/load.js b/src/cli/deprecated_load.js similarity index 100% rename from src/cli/load.js rename to src/cli/deprecated_load.js diff --git a/src/cli/load.test.js b/src/cli/deprecated_load.test.js similarity index 99% rename from src/cli/load.test.js rename to src/cli/deprecated_load.test.js index 3fefe6a..31f9d56 100644 --- a/src/cli/load.test.js +++ b/src/cli/deprecated_load.test.js @@ -11,7 +11,7 @@ import { makeLoadDefaultPlugins, loadIndividualPlugin, help, -} from "./load"; +} from "./deprecated_load"; import * as RepoIdRegistry from "../core/repoIdRegistry"; import {makeRepoId} from "../core/repoId"; @@ -27,7 +27,7 @@ const execDependencyGraph: JestMockFn = (require("../tools/execDependencyGraph") const loadGithubData: JestMockFn = (require("../plugins/github/loadGithubData") .loadGithubData: any); -describe("cli/load", () => { +describe("cli/deprecated_load", () => { beforeEach(() => { jest.clearAllMocks(); // Tests should call `newSourcecredDirectory` directly when they diff --git a/src/cli/help.js b/src/cli/help.js index bc6e815..835b151 100644 --- a/src/cli/help.js +++ b/src/cli/help.js @@ -4,7 +4,7 @@ import type {Command} from "./command"; import dedent from "../util/dedent"; -import {help as loadHelp} from "./load"; +import {help as loadHelp} from "./deprecated_load"; import {help as analyzeHelp} from "./analyze"; import {help as pagerankHelp} from "./pagerank"; import {help as scoresHelp} from "./scores"; diff --git a/src/cli/sourcecred.js b/src/cli/sourcecred.js index 9e4dca1..04f4c1c 100644 --- a/src/cli/sourcecred.js +++ b/src/cli/sourcecred.js @@ -6,7 +6,7 @@ import type {Command} from "./command"; import {VERSION_SHORT} from "../core/version"; import help from "./help"; -import load from "./load"; +import load from "./deprecated_load"; import analyze from "./analyze"; import pagerank from "./pagerank"; import scores from "./scores"; diff --git a/src/cli/sourcecred.test.js b/src/cli/sourcecred.test.js index 144c2d0..be71741 100644 --- a/src/cli/sourcecred.test.js +++ b/src/cli/sourcecred.test.js @@ -12,7 +12,7 @@ function mockCommand(name) { } jest.mock("./help", () => mockCommand("help")); -jest.mock("./load", () => mockCommand("load")); +jest.mock("./deprecated_load", () => mockCommand("load")); jest.mock("./analyze", () => mockCommand("analyze")); jest.mock("./pagerank", () => mockCommand("pagerank")); jest.mock("./clear", () => mockCommand("clear"));