mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 13:48:46 -05:00
Remove all submodules - just force clone and reset on run instead (#33425)
This commit is contained in:
12
.gitignore
vendored
12
.gitignore
vendored
@@ -81,4 +81,14 @@ tests/cases/user/*/**/*.d.ts
|
||||
tests/baselines/reference/dt
|
||||
.failed-tests
|
||||
TEST-results.xml
|
||||
package-lock.json
|
||||
package-lock.json
|
||||
tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
|
||||
tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
|
||||
tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
|
||||
tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
|
||||
tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
|
||||
tests/cases/user/create-react-app/create-react-app
|
||||
tests/cases/user/webpack/webpack
|
||||
tests/cases/user/puppeteer/puppeteer
|
||||
tests/cases/user/axios-src/axios-src
|
||||
tests/cases/user/prettier/prettier
|
||||
40
.gitmodules
vendored
40
.gitmodules
vendored
@@ -1,40 +0,0 @@
|
||||
[submodule "tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter"]
|
||||
path = tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-React-Starter
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter"]
|
||||
path = tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-Node-Starter.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter"]
|
||||
path = tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-React-Native-Starter.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter"]
|
||||
path = tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-Vue-Starter.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter"]
|
||||
path = tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
|
||||
url = https://github.com/Microsoft/TypeScript-WeChat-Starter.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/create-react-app/create-react-app"]
|
||||
path = tests/cases/user/create-react-app/create-react-app
|
||||
url = https://github.com/facebook/create-react-app.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/webpack/webpack"]
|
||||
path = tests/cases/user/webpack/webpack
|
||||
url = https://github.com/webpack/webpack.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/puppeteer/puppeteer"]
|
||||
path = tests/cases/user/puppeteer/puppeteer
|
||||
url = https://github.com/GoogleChrome/puppeteer.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/axios-src/axios-src"]
|
||||
path = tests/cases/user/axios-src/axios-src
|
||||
url = https://github.com/axios/axios.git
|
||||
ignore = all
|
||||
[submodule "tests/cases/user/prettier/prettier"]
|
||||
path = tests/cases/user/prettier/prettier
|
||||
url = https://github.com/prettier/prettier.git
|
||||
ignore = all
|
||||
|
||||
@@ -10,6 +10,7 @@ interface ExecResult {
|
||||
|
||||
interface UserConfig {
|
||||
types: string[];
|
||||
cloneUrl: string;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
@@ -49,13 +50,17 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
|
||||
const stdio = isWorker ? "pipe" : "inherit";
|
||||
let types: string[] | undefined;
|
||||
if (fs.existsSync(path.join(cwd, "test.json"))) {
|
||||
const submoduleDir = path.join(cwd, directoryName);
|
||||
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
|
||||
exec("git", ["clean", "-f"], { cwd: submoduleDir });
|
||||
exec("git", ["submodule", "update", "--init", "--remote", "."], { cwd: originalCwd });
|
||||
|
||||
const config = JSON.parse(fs.readFileSync(path.join(cwd, "test.json"), { encoding: "utf8" })) as UserConfig;
|
||||
ts.Debug.assert(!!config.types, "Bad format from test.json: Types field must be present.");
|
||||
ts.Debug.assert(!!config.cloneUrl, "Bad format from test.json: cloneUrl field must be present.");
|
||||
const submoduleDir = path.join(cwd, directoryName);
|
||||
if (!fs.existsSync(submoduleDir)) {
|
||||
exec("git", ["clone", config.cloneUrl, directoryName], { cwd });
|
||||
}
|
||||
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
|
||||
exec("git", ["clean", "-f"], { cwd: submoduleDir });
|
||||
exec("git", ["pull", "-f"], { cwd: submoduleDir });
|
||||
|
||||
types = config.types;
|
||||
|
||||
cwd = config.path ? path.join(cwd, config.path) : submoduleDir;
|
||||
|
||||
Submodule tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter deleted from ca14e7ccbc
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-Node-Starter.git",
|
||||
"types": ["jquery"]
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter deleted from 30acce5e13
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-React-Native-Starter.git",
|
||||
"types": ["jest"],
|
||||
"path": "TypeScript-React-Native-Starter/ExampleProject"
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter deleted from 19c71f2c6a
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter",
|
||||
"types": ["jest", "node"]
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter deleted from 56024cfe41
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-Vue-Starter.git",
|
||||
"types": []
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter deleted from 3fb8b46010
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/Microsoft/TypeScript-React-Starter",
|
||||
"types": []
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/axios-src/axios-src deleted from d74385f1c8
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/axios/axios.git",
|
||||
"types": ["node"]
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/create-react-app/create-react-app deleted from 74eb65a462
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/facebook/create-react-app.git",
|
||||
"types": []
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/prettier/prettier deleted from e83b4537fe
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/prettier/prettier.git",
|
||||
"types": ["node"]
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/puppeteer/puppeteer deleted from a5f03ce1c8
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/GoogleChrome/puppeteer.git",
|
||||
"types": []
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"cloneUrl": "https://github.com/webpack/webpack.git",
|
||||
"types": []
|
||||
}
|
||||
|
||||
Submodule tests/cases/user/webpack/webpack deleted from e4c7d8c0ae
Reference in New Issue
Block a user