Move repoIdRegistry to core (#992)

RepoIdRegistry is used across the project, but not in the explorer. So
it makes very little sense that it live in the explorer module. It's now
moved to core.

Test plan: `yarn test --full` passes
This commit is contained in:
Dandelion Mané 2018-11-01 18:11:48 -07:00 committed by GitHub
parent 6b8cb66013
commit 252d8d5c99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@ const path = require("path");
const paths = require("./paths");
/*:: import type {GitState} from "../src/core/version"; */
/*:: import type {RepoIdRegistry} from "../src/explorer/repoIdRegistry"; */
/*:: import type {RepoIdRegistry} from "../src/core/repoIdRegistry"; */
// Make sure that including paths.js after env.js will read .env variables.
delete require.cache[require.resolve("./paths")];

View File

@ -5,7 +5,7 @@ import type {
$Application as ExpressApp,
$Response as ExpressResponse,
} from "express";
import type {RepoIdRegistry} from "../src/explorer/repoIdRegistry";
import type {RepoIdRegistry} from "../src/core/repoIdRegistry";
*/
const fs = require("fs");
const os = require("os");

View File

@ -6,7 +6,7 @@ import stringify from "json-stable-stringify";
import mkdirp from "mkdirp";
import path from "path";
import * as RepoIdRegistry from "../explorer/repoIdRegistry";
import * as RepoIdRegistry from "../core/repoIdRegistry";
import {repoIdToString, stringToRepoId, type RepoId} from "../core/repoId";
import dedent from "../util/dedent";
import type {Command} from "./command";

View File

@ -7,7 +7,7 @@ import tmp from "tmp";
import {run} from "./testUtil";
import load, {help} from "./load";
import * as RepoIdRegistry from "../explorer/repoIdRegistry";
import * as RepoIdRegistry from "../core/repoIdRegistry";
import {stringToRepoId} from "../core/repoId";
jest.mock("../tools/execDependencyGraph", () => jest.fn());

View File

@ -10,7 +10,7 @@ import {
import {makeRepoId} from "../core/repoId";
describe("explorer/repoIdRegistry", () => {
describe("core/repoIdRegistry", () => {
describe("fromJSON compose on", () => {
function checkExample(x: RepoIdRegistry) {
expect(fromJSON(toJSON(x))).toEqual(x);

View File

@ -3,7 +3,7 @@
import stringify from "json-stable-stringify";
import React, {type ComponentType} from "react";
import type {RepoIdRegistry} from "../explorer/repoIdRegistry";
import type {RepoIdRegistry} from "../core/repoIdRegistry";
import Link from "../webutil/Link";
import type {Assets} from "../webutil/assets";

View File

@ -1,6 +1,6 @@
// @flow
import type {RepoIdRegistry} from "../explorer/repoIdRegistry";
import type {RepoIdRegistry} from "../core/repoIdRegistry";
import {type RouteData, makeRouteData} from "./routeData";
export default function createRouteDataFromEnvironment(): RouteData {

View File

@ -8,7 +8,7 @@
/*::
import type {Assets} from "../webutil/assets";
import type {RepoIdRegistry} from "../explorer/repoIdRegistry";
import type {RepoIdRegistry} from "../core/repoIdRegistry";
type RouteDatum = {|
+path: string,