From 876bd228501e5cdc5f53057cfc85c1f23bf334f4 Mon Sep 17 00:00:00 2001 From: Zachary Belford Date: Thu, 1 Oct 2020 19:33:14 -0700 Subject: [PATCH 1/2] fix: remove use of build dir --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 62d3065..a8accd9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -68,7 +68,7 @@ const generateTs = async (transpiler: Transpiler, schema: JSONSchemaObject, outp "es2015", ], "declaration": true, - "outDir": `${outpath}/build`, + "outDir": `${outpath}`, "strict": true, "esModuleInterop": true, "resolveJsonModule": true, @@ -76,7 +76,7 @@ const generateTs = async (transpiler: Transpiler, schema: JSONSchemaObject, outp indexTS, `${outpath}/src/schema.json` ]); - await writeFile(`${outpath}/build/index.d.ts`, transpiler.toTs()); + await writeFile(`${outpath}/index.d.ts`, transpiler.toTs()); return true; } From dc5d83166585e2fca09a0cf60db1cf4add78fb11 Mon Sep 17 00:00:00 2001 From: Zachary Belford Date: Thu, 1 Oct 2020 21:40:23 -0700 Subject: [PATCH 2/2] fix: tests for build dir removal --- src/index.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.test.ts b/src/index.test.ts index 7f2decf..0431ddd 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -38,13 +38,13 @@ describe("json-schema-tools semantic-release plugin", () => { }, { nextRelease: { version: "1.0.0" } } ).then(async () => { - const tsFile = await readFile("./testeroo/build/index.d.ts", "utf8"); + const tsFile = await readFile("./testeroo/index.d.ts", "utf8"); expect(typeof tsFile).toEqual("string"); const goFile = await readFile("./testeroo/foobar.go", "utf8"); expect(typeof goFile).toBe("string"); - const exported = require('../testeroo/build/index.js'); // eslint-disable-line + const exported = require('../testeroo/index.js'); // eslint-disable-line expect(exported.default.default).toBe(true); expect(exported.default.type).toBe("string"); });