Change `src/v3/` to `src/` and remove v3 naming (#474)

Test plan:
`git grep -i v3` only shows incidental hits in longer strings
`yarn travis --full` passes
`yarn backend` works
`yarn build` works
`yarn start` works
`node bin/sourcecred.js start` works
`node bin/sourcecred.js load sourcecred example-github` works

Paired with @wchargin
This commit is contained in:
Dandelion Mané 2018-06-30 16:01:54 -07:00 committed by GitHub
parent 23704da7a5
commit 24cf35da22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
105 changed files with 25 additions and 28 deletions

View File

@ -36,9 +36,9 @@ function getServedPath() {
module.exports = { module.exports = {
dotenv: resolveApp(".env"), dotenv: resolveApp(".env"),
appBuild: resolveApp("build"), appBuild: resolveApp("build"),
appPublic: resolveApp("src/v3/app/public"), appPublic: resolveApp("src/app/public"),
appHtml: resolveApp("src/v3/app/public/index.html"), appHtml: resolveApp("src/app/public/index.html"),
appIndexJs: resolveApp("src/v3/app/index.js"), appIndexJs: resolveApp("src/app/index.js"),
appPackageJson: resolveApp("package.json"), appPackageJson: resolveApp("package.json"),
appSrc: resolveApp("src"), appSrc: resolveApp("src"),
yarnLockFile: resolveApp("yarn.lock"), yarnLockFile: resolveApp("yarn.lock"),
@ -53,20 +53,18 @@ module.exports = {
// source file, and the key will be the filename of the bundled entry // source file, and the key will be the filename of the bundled entry
// point within the build directory. // point within the build directory.
backendEntryPoints: { backendEntryPoints: {
apiApp: resolveApp("src/v3/app/apiApp.js"), apiApp: resolveApp("src/app/apiApp.js"),
// //
sourcecred: resolveApp("src/v3/cli/sourcecred.js"), sourcecred: resolveApp("src/cli/sourcecred.js"),
"commands/load": resolveApp("src/v3/cli/commands/load.js"), "commands/load": resolveApp("src/cli/commands/load.js"),
"commands/start-v3": resolveApp("src/v3/cli/commands/start.js"), "commands/start": resolveApp("src/cli/commands/start.js"),
// //
fetchAndPrintGithubRepoV3: resolveApp( fetchAndPrintGithubRepo: resolveApp(
"src/v3/plugins/github/bin/fetchAndPrintGithubRepo.js" "src/plugins/github/bin/fetchAndPrintGithubRepo.js"
), ),
createExampleRepoV3: resolveApp( createExampleRepo: resolveApp("src/plugins/git/bin/createExampleRepo.js"),
"src/v3/plugins/git/bin/createExampleRepo.js" loadAndPrintGitRepository: resolveApp(
), "src/plugins/git/bin/loadAndPrintRepository.js"
loadAndPrintGitRepositoryV3: resolveApp(
"src/v3/plugins/git/bin/loadAndPrintRepository.js"
), ),
}, },
}; };

View File

@ -73,13 +73,13 @@ function makeTasks(mode /*: "BASIC" | "FULL" */) {
deps: ["check-pretty"], deps: ["check-pretty"],
}, },
{ {
id: "fetchGithubRepoTestV3", id: "fetchGithubRepoTest",
cmd: ["./src/v3/plugins/github/fetchGithubRepoTest.sh", "--no-build"], cmd: ["./src/plugins/github/fetchGithubRepoTest.sh", "--no-build"],
deps: ["backend-in-place"], deps: ["backend-in-place"],
}, },
{ {
id: "loadRepositoryTestV3", id: "loadRepositoryTest",
cmd: ["./src/v3/plugins/git/loadRepositoryTest.sh", "--no-build"], cmd: ["./src/plugins/git/loadRepositoryTest.sh", "--no-build"],
deps: ["backend-in-place"], deps: ["backend-in-place"],
}, },
]; ];

View File

@ -12,8 +12,7 @@ import {
sourcecredDirectoryFlag, sourcecredDirectoryFlag,
} from "../common"; } from "../common";
const execDependencyGraph = require("../../../tools/execDependencyGraph") const execDependencyGraph = require("../../tools/execDependencyGraph").default;
.default;
export default class PluginGraphCommand extends Command { export default class PluginGraphCommand extends Command {
static description = "load data required for SourceCred"; static description = "load data required for SourceCred";

View File

@ -5,7 +5,7 @@ import chalk from "chalk";
import fs from "fs"; import fs from "fs";
import {choosePort} from "react-dev-utils/WebpackDevServerUtils"; import {choosePort} from "react-dev-utils/WebpackDevServerUtils";
import apiApp from "../../../v3/app/apiApp"; import apiApp from "../../app/apiApp";
import {sourcecredDirectoryFlag} from "../common"; import {sourcecredDirectoryFlag} from "../common";
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 4000; const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 4000;

View File

@ -1,5 +1,5 @@
// @flow // @flow
require("../../tools/entry"); require("../tools/entry");
require("@oclif/command") require("@oclif/command")
.run() .run()
.catch(require("@oclif/errors/handle")); .catch(require("@oclif/errors/handle"));

View File

@ -24,7 +24,7 @@ synchronize() (
submodule_flag="$1" # --submodule | --no-submodule submodule_flag="$1" # --submodule | --no-submodule
remote_url="$2" remote_url="$2"
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
node bin/createExampleRepoV3.js "${submodule_flag}" "${tmpdir}" node bin/createExampleRepo.js "${submodule_flag}" "${tmpdir}"
( (
cd "${tmpdir}" cd "${tmpdir}"
git remote add upstream "${remote_url}" git remote add upstream "${remote_url}"

View File

@ -2,7 +2,7 @@
set -eu set -eu
data_file=src/v3/plugins/git/example/example-git.json data_file=src/plugins/git/example/example-git.json
usage() { usage() {
printf 'usage: %s [-u|--updateSnapshot] [--help]\n' "$0" printf 'usage: %s [-u|--updateSnapshot] [--help]\n' "$0"
@ -18,8 +18,8 @@ usage() {
fetch() { fetch() {
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
node bin/createExampleRepoV3.js "${tmpdir}" node bin/createExampleRepo.js "${tmpdir}"
node bin/loadAndPrintGitRepositoryV3.js "${tmpdir}" node bin/loadAndPrintGitRepository.js "${tmpdir}"
rm -rf "${tmpdir}" rm -rf "${tmpdir}"
} }

View File

@ -2,7 +2,7 @@
set -eu set -eu
data_file=src/v3/plugins/github/example/example-github.json data_file=src//plugins/github/example/example-github.json
usage() { usage() {
printf 'usage: %s [-u|--updateSnapshot] [--[no-]build] [--help]\n' "$0" printf 'usage: %s [-u|--updateSnapshot] [--[no-]build] [--help]\n' "$0"
@ -24,7 +24,7 @@ fetch() {
printf >&2 'to a 40-character hex string API token from GitHub.\n' printf >&2 'to a 40-character hex string API token from GitHub.\n'
return 1 return 1
fi fi
node bin/fetchAndPrintGithubRepoV3.js \ node bin/fetchAndPrintGithubRepo.js \
sourcecred example-github "${GITHUB_TOKEN}" sourcecred example-github "${GITHUB_TOKEN}"
} }

Some files were not shown because too many files have changed in this diff Show More