[build] Delete empty test directory and fix building empty project in worker mode (#13679)

This commit is contained in:
Curtis Man 2023-01-18 19:20:29 -08:00 коммит произвёл GitHub
Родитель 8b66b42361
Коммит 19b152223c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 15 добавлений и 28 удалений

Просмотреть файл

@ -17,7 +17,7 @@ $ npm install -g @fluid-tools/build-cli
$ flub COMMAND
running command...
$ flub (--version|-V)
@fluid-tools/build-cli/0.6.0
@fluid-tools/build-cli/0.7.1
$ flub --help [COMMAND]
USAGE
$ flub COMMAND

Просмотреть файл

@ -112,7 +112,9 @@ export abstract class LeafTask extends Task {
if (ret.error) {
const codeStr = ret.error.code !== undefined ? ` (exit code ${ret.error.code})` : "";
console.error(`${this.node.pkg.nameColored}: error during command '${this.command}'`);
console.error(
`${this.node.pkg.nameColored}: error during command '${this.command}'${codeStr}`,
);
console.error(this.getExecErrors(ret));
return this.execDone(startTime, BuildResult.Failed);
}

Просмотреть файл

@ -48,7 +48,7 @@ export async function compile(msg: WorkerMessage): Promise<WorkerExecResult> {
},
})!;
} else {
throw new Error("Unknown config file in commane line");
throw new Error("Unknown config file in command line");
}
}
@ -71,7 +71,9 @@ export async function compile(msg: WorkerMessage): Promise<WorkerExecResult> {
const emitResult = program.emit();
diagnostics.push(...emitResult.diagnostics);
if (!emitResult.emitSkipped) {
if (emitResult.emitSkipped && diagnostics.length > 0) {
code = ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
} else {
code =
diagnostics.length !== 0
? ts.ExitStatus.DiagnosticsPresent_OutputsGenerated

Просмотреть файл

@ -74,7 +74,7 @@ $ npm install -g @fluid-tools/version-tools
$ fluv COMMAND
running command...
$ fluv (--version|-V)
@fluid-tools/version-tools/0.6.0
@fluid-tools/version-tools/0.7.1
$ fluv --help [COMMAND]
USAGE
$ fluv COMMAND

Просмотреть файл

@ -72,6 +72,7 @@
"devDependencies": {
"@fluid-experimental/sequence-deprecated-previous": "npm:@fluid-experimental/sequence-deprecated@2.0.0-internal.2.0.0",
"@fluid-internal/test-dds-utils": ">=2.0.0-internal.2.4.0 <2.0.0-internal.3.0.0",
"@fluid-tools/build-cli": "^0.7.0",
"@fluidframework/build-common": "^1.1.0",
"@fluidframework/build-tools": "^0.7.0",
"@fluidframework/eslint-config-fluid": "^2.0.0",

Просмотреть файл

@ -76,6 +76,7 @@
},
"devDependencies": {
"@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.2.4.0 <2.0.0-internal.3.0.0",
"@fluid-tools/build-cli": "^0.7.0",
"@fluidframework/build-common": "^1.1.0",
"@fluidframework/build-tools": "^0.7.0",
"@fluidframework/driver-definitions": ">=2.0.0-internal.2.4.0 <2.0.0-internal.3.0.0",

Просмотреть файл

@ -92,7 +92,7 @@ describe("RequestParser", () => {
const requestParser = RequestParser.create({ url: "/objectId/route", headers: { wait: true } });
const response = await rootDataStoreRequestHandler(requestParser, runtime);
assert.equal(response?.status, 200);
assert.equal(response.value.route, "/route");
assert.equal(response?.value.route, "/route");
});
it("Data store request with non-existing sub route", async () => {

Просмотреть файл

@ -56,6 +56,7 @@
"uuid": "^8.3.1"
},
"devDependencies": {
"@fluid-tools/build-cli": "^0.7.0",
"@fluidframework/aqueduct": ">=2.0.0-internal.2.4.0 <2.0.0-internal.3.0.0",
"@fluidframework/build-common": "^1.1.0",
"@fluidframework/build-tools": "^0.7.0",

Просмотреть файл

@ -8,6 +8,6 @@ module.exports = {
require.resolve("@fluidframework/eslint-config-fluid"), "prettier"
],
"parserOptions": {
"project": ["./tsconfig.json", "./src/test/tsconfig.json"]
"project": ["./tsconfig.json"]
},
}

Просмотреть файл

@ -16,14 +16,13 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "npm run build:genver && concurrently npm:build:compile npm:lint && npm run build:docs",
"build:compile": "npm run tsc && npm run build:test && npm run build:esnext",
"build:compile": "npm run tsc && npm run build:esnext",
"build:compile:min": "npm run build:compile",
"build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
"build:esnext": "tsc --project ./tsconfig.esnext.json",
"build:full": "npm run build",
"build:full:compile": "npm run build:compile",
"build:genver": "gen-version",
"build:test": "tsc --project ./src/test/tsconfig.json",
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"eslint": "eslint --format stylish src",

Просмотреть файл

@ -1,19 +0,0 @@
{
"extends": "@fluidframework/build-common/ts-common-config.json",
"compilerOptions": {
"rootDir": "./",
"outDir": "../../dist/test",
"declaration": false,
"declarationMap": false,
"skipLibCheck": true,
"noEmit": true,
},
"include": [
"./**/*"
],
"references": [
{
"path": "../.."
}
]
}