From 66fad8d2cdd563d65a2058c0ccd2a6df7a01d71a Mon Sep 17 00:00:00 2001 From: Michael van Tellingen Date: Tue, 3 Sep 2024 18:08:40 +0200 Subject: [PATCH] chore: remove sequence from bruno files --- .changeset/real-bananas-itch.md | 5 +++++ src/bruno.ts | 2 -- src/index.ts | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .changeset/real-bananas-itch.md diff --git a/.changeset/real-bananas-itch.md b/.changeset/real-bananas-itch.md new file mode 100644 index 0000000..2fb651d --- /dev/null +++ b/.changeset/real-bananas-itch.md @@ -0,0 +1,5 @@ +--- +"@labdigital/graphql-codegen-bruno": patch +--- + +Remove sequence from bruno files diff --git a/src/bruno.ts b/src/bruno.ts index 117ee24..2daeeb8 100644 --- a/src/bruno.ts +++ b/src/bruno.ts @@ -3,7 +3,6 @@ import type { FileContent } from "./operations"; export const asBruno = async ( operation: FileContent, - sequence: number, defaults: Record, ) => { const formattedContent = await prettier.format(operation.content, { @@ -16,7 +15,6 @@ export const asBruno = async ( meta { name: ${operation.name} type: graphql - seq: ${sequence} } post { diff --git a/src/index.ts b/src/index.ts index ea77936..cc5ddb5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,13 +25,12 @@ export const plugin: PluginFunction = async ( } const operations = extractOperations(schema, documents); - let i = 0; const result: Record> = {}; for (const operation of operations) { const fileName = `${operation.name}.bru`; const outputPath = path.join(outputDir, fileName); - const formattedContent = await asBruno(operation, i, config.defaults); + const formattedContent = await asBruno(operation, config.defaults); fs.outputFileSync(outputPath, formattedContent); result[operation.name] = { @@ -40,7 +39,6 @@ export const plugin: PluginFunction = async ( ? path.relative(outputDir, operation.location) : "(unknown)", }; - i++; } return JSON.stringify(result, null, 2); };