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:
parent
6b8cb66013
commit
252d8d5c99
|
@ -7,7 +7,7 @@ const path = require("path");
|
||||||
const paths = require("./paths");
|
const paths = require("./paths");
|
||||||
|
|
||||||
/*:: import type {GitState} from "../src/core/version"; */
|
/*:: 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.
|
// Make sure that including paths.js after env.js will read .env variables.
|
||||||
delete require.cache[require.resolve("./paths")];
|
delete require.cache[require.resolve("./paths")];
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type {
|
||||||
$Application as ExpressApp,
|
$Application as ExpressApp,
|
||||||
$Response as ExpressResponse,
|
$Response as ExpressResponse,
|
||||||
} from "express";
|
} from "express";
|
||||||
import type {RepoIdRegistry} from "../src/explorer/repoIdRegistry";
|
import type {RepoIdRegistry} from "../src/core/repoIdRegistry";
|
||||||
*/
|
*/
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const os = require("os");
|
const os = require("os");
|
||||||
|
|
|
@ -6,7 +6,7 @@ import stringify from "json-stable-stringify";
|
||||||
import mkdirp from "mkdirp";
|
import mkdirp from "mkdirp";
|
||||||
import path from "path";
|
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 {repoIdToString, stringToRepoId, type RepoId} from "../core/repoId";
|
||||||
import dedent from "../util/dedent";
|
import dedent from "../util/dedent";
|
||||||
import type {Command} from "./command";
|
import type {Command} from "./command";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import tmp from "tmp";
|
||||||
import {run} from "./testUtil";
|
import {run} from "./testUtil";
|
||||||
import load, {help} from "./load";
|
import load, {help} from "./load";
|
||||||
|
|
||||||
import * as RepoIdRegistry from "../explorer/repoIdRegistry";
|
import * as RepoIdRegistry from "../core/repoIdRegistry";
|
||||||
import {stringToRepoId} from "../core/repoId";
|
import {stringToRepoId} from "../core/repoId";
|
||||||
|
|
||||||
jest.mock("../tools/execDependencyGraph", () => jest.fn());
|
jest.mock("../tools/execDependencyGraph", () => jest.fn());
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
|
|
||||||
import {makeRepoId} from "../core/repoId";
|
import {makeRepoId} from "../core/repoId";
|
||||||
|
|
||||||
describe("explorer/repoIdRegistry", () => {
|
describe("core/repoIdRegistry", () => {
|
||||||
describe("fromJSON compose on", () => {
|
describe("fromJSON compose on", () => {
|
||||||
function checkExample(x: RepoIdRegistry) {
|
function checkExample(x: RepoIdRegistry) {
|
||||||
expect(fromJSON(toJSON(x))).toEqual(x);
|
expect(fromJSON(toJSON(x))).toEqual(x);
|
|
@ -3,7 +3,7 @@
|
||||||
import stringify from "json-stable-stringify";
|
import stringify from "json-stable-stringify";
|
||||||
import React, {type ComponentType} from "react";
|
import React, {type ComponentType} from "react";
|
||||||
|
|
||||||
import type {RepoIdRegistry} from "../explorer/repoIdRegistry";
|
import type {RepoIdRegistry} from "../core/repoIdRegistry";
|
||||||
import Link from "../webutil/Link";
|
import Link from "../webutil/Link";
|
||||||
import type {Assets} from "../webutil/assets";
|
import type {Assets} from "../webutil/assets";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import type {RepoIdRegistry} from "../explorer/repoIdRegistry";
|
import type {RepoIdRegistry} from "../core/repoIdRegistry";
|
||||||
import {type RouteData, makeRouteData} from "./routeData";
|
import {type RouteData, makeRouteData} from "./routeData";
|
||||||
|
|
||||||
export default function createRouteDataFromEnvironment(): RouteData {
|
export default function createRouteDataFromEnvironment(): RouteData {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
/*::
|
/*::
|
||||||
import type {Assets} from "../webutil/assets";
|
import type {Assets} from "../webutil/assets";
|
||||||
import type {RepoIdRegistry} from "../explorer/repoIdRegistry";
|
import type {RepoIdRegistry} from "../core/repoIdRegistry";
|
||||||
|
|
||||||
type RouteDatum = {|
|
type RouteDatum = {|
|
||||||
+path: string,
|
+path: string,
|
||||||
|
|
Loading…
Reference in New Issue