mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 03:09:39 -06:00
Remove some files from the repo root (#51446)
This commit is contained in:
parent
3c99d50da5
commit
703652cebf
@ -1,23 +0,0 @@
|
||||
**/node_modules/**
|
||||
/built/**
|
||||
/tests/**
|
||||
/lib/**
|
||||
/src/lib/*.generated.d.ts
|
||||
# Ignore all compiled script outputs
|
||||
/scripts/**/*.js
|
||||
/scripts/**/*.d.*
|
||||
# But, not the ones that are hand-written.
|
||||
# TODO: remove once scripts are pure JS
|
||||
!/scripts/browserIntegrationTest.js
|
||||
!/scripts/createPlaygroundBuild.js
|
||||
!/scripts/failed-tests.js
|
||||
!/scripts/find-unused-diagnostic-messages.js
|
||||
!/scripts/lint-hooks.js
|
||||
!/scripts/perf-result-post.js
|
||||
!/scripts/post-vsts-artifact-comment.js
|
||||
!/scripts/regenerate-unicode-identifier-parts.js
|
||||
!/scripts/run-sequence.js
|
||||
!/scripts/update-experimental-branches.js
|
||||
/scripts/eslint/built/**
|
||||
/internal/**
|
||||
/coverage/**
|
||||
@ -1,4 +1,5 @@
|
||||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"warnOnUnsupportedTypeScriptVersion": false,
|
||||
@ -12,6 +13,17 @@
|
||||
"plugins": [
|
||||
"@typescript-eslint", "no-null", "import", "eslint-plugin-local"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"**/node_modules/**",
|
||||
"/built/**",
|
||||
"/tests/**",
|
||||
"/lib/**",
|
||||
"/src/lib/*.generated.d.ts",
|
||||
"/scripts/**/*.js",
|
||||
"/scripts/**/*.d.*",
|
||||
"/internal/**",
|
||||
"/coverage/**"
|
||||
],
|
||||
"rules": {
|
||||
"sort-imports": ["error", {
|
||||
"ignoreCase": true,
|
||||
|
||||
@ -21,7 +21,7 @@ const glob = util.promisify(_glob);
|
||||
/** @typedef {ReturnType<typeof task>} Task */
|
||||
void 0;
|
||||
|
||||
const copyrightFilename = "CopyrightNotice.txt";
|
||||
const copyrightFilename = "./scripts/CopyrightNotice.txt";
|
||||
const copyright = memoize(async () => {
|
||||
const contents = await fs.promises.readFile(copyrightFilename, "utf-8");
|
||||
return contents.replace(/\r\n/g, "\n");
|
||||
|
||||
@ -401,7 +401,7 @@ emitAsNamespace("ts", moduleSymbol);
|
||||
|
||||
write("export = ts;", WriteTarget.Both);
|
||||
|
||||
const copyrightNotice = fs.readFileSync(path.join(__dirname, "..", "CopyrightNotice.txt"), "utf-8");
|
||||
const copyrightNotice = fs.readFileSync(path.join(__dirname, "CopyrightNotice.txt"), "utf-8");
|
||||
const publicContents = copyrightNotice + publicLines.join(newLine);
|
||||
const internalContents = copyrightNotice + internalLines.join(newLine);
|
||||
|
||||
|
||||
@ -144,7 +144,11 @@ export class DockerfileRunner extends ExternalCompileRunnerBase {
|
||||
describe(`${this.kind()} code samples`, function (this: Mocha.Suite) {
|
||||
this.timeout(cls.timeout); // 20 minutes
|
||||
before(() => {
|
||||
cls.exec("docker", ["build", ".", "-t", "typescript/typescript"], { cwd: IO.getWorkspaceRoot() }); // cached because workspace is hashed to determine cacheability
|
||||
// cached because workspace is hashed to determine cacheability
|
||||
cls.exec("docker", ["build", ".", "-t", "typescript/typescript", "-f", cls.testDir + "Dockerfile"], {
|
||||
cwd: IO.getWorkspaceRoot(),
|
||||
env: { ...process.env, DOCKER_BUILDKIT: "1" }, // We need buildkit to allow Dockerfile.dockerignore to work.
|
||||
});
|
||||
});
|
||||
for (const test of testList) {
|
||||
const directory = typeof test === "string" ? test : test.file;
|
||||
@ -160,7 +164,7 @@ export class DockerfileRunner extends ExternalCompileRunnerBase {
|
||||
}
|
||||
|
||||
private timeout = 1_200_000; // 20 minutes;
|
||||
private exec(command: string, args: string[], options: { cwd: string }): void {
|
||||
private exec(command: string, args: string[], options: { cwd: string; env?: NodeJS.ProcessEnv }): void {
|
||||
const cp: typeof import("child_process") = require("child_process");
|
||||
const stdio = isWorker ? "pipe" : "inherit";
|
||||
const res = cp.spawnSync(isWorker ? `${command} 2>&1` : command, args, { timeout: this.timeout, shell: true, stdio, ...options });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user