diff --git a/.changeset/bruno-fixes.md b/.changeset/bruno-fixes.md deleted file mode 100644 index 128e6b9..0000000 --- a/.changeset/bruno-fixes.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@labdigital/graphql-codegen-bruno": minor ---- - -Add the `url` and `auth` options for the request URL and auth mode; they default to the previously hardcoded `{{graphql-gateway}}/graphql` and `none`. - -This release changes the generated output: - -- A request now contains only its operation followed by the fragments it (transitively) uses, each once. Previously it contained the complete source document (including other operations in the same document) and fragments could be included twice. The GraphQL is printed with `graphql`'s `print`, so comments of the source document are no longer included. -- Subscriptions are written to `subscriptions/` instead of `mutations/`. Run once with `clean: true` (or remove them manually) to remove the subscriptions from `mutations/`. -- `clean: true` now only removes the previously generated requests (the `.bru` files, except `folder.bru`, in the `queries/`, `mutations/` and `subscriptions/` folders of the output directory) instead of everything in the output directory, so it no longer deletes `bruno.json`, environments or other files. -- prettier is no longer bundled (the package was 5 MB); formatting is done by `graphql`'s `print`. diff --git a/.changeset/improve-readme.md b/.changeset/improve-readme.md deleted file mode 100644 index 28ee380..0000000 --- a/.changeset/improve-readme.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@labdigital/graphql-codegen-bruno": patch -"@labdigital/graphql-codegen-k6": patch -"@labdigital/graphql-codegen-typedefs": patch ---- - -Improve README diff --git a/.changeset/k6-fix-document-modes.md b/.changeset/k6-fix-document-modes.md deleted file mode 100644 index 87b85d6..0000000 --- a/.changeset/k6-fix-document-modes.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@labdigital/graphql-codegen-k6": patch ---- - -Fix the generated code for `documentMode` `graphQLTag` (the default) and `external`: the `Requester` type referred to `DocumentNode` without importing it, so the output did not type check. `DocumentNode` is now imported from `documentNodeImport` (default `graphql`), respecting `useTypeImports`. - -Fix `documentMode: "string"`: the output referred to a `TypedDocumentString` class that was never defined. The class is now generated (the same class as `typed-document-node` and the client preset use), the operation documents are typed with their result and variables, and the requester receives the `TypedDocumentString` (which serializes to the query string). diff --git a/.changeset/node-22-security-updates.md b/.changeset/node-22-security-updates.md deleted file mode 100644 index 193f274..0000000 --- a/.changeset/node-22-security-updates.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@labdigital/graphql-codegen-bruno": minor -"@labdigital/graphql-codegen-k6": minor -"@labdigital/graphql-codegen-typedefs": minor ---- - -Require Node.js >= 22 (Node 18/20 are end-of-life) and update build/test tooling to resolve security advisories. Packages are now built with tsdown instead of tsup (same output files). diff --git a/.changeset/typedefs-extend-schema.md b/.changeset/typedefs-extend-schema.md deleted file mode 100644 index b6deabe..0000000 --- a/.changeset/typedefs-extend-schema.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@labdigital/graphql-codegen-typedefs": minor ---- - -Only print the schema definition as `extend schema { ... }`. Previously the whole printed schema was prefixed with `extend`, which produced invalid output for schemas without root types (`extend type ...`, `extend directive ...`) and for schemas with a description. The description of the schema is dropped from the extension, as extensions cannot have one. - -Add the `extendSchema` option (default `true`, the previous behaviour); set it to `false` to print a plain `schema { ... }` definition instead. diff --git a/.changeset/update-dependencies.md b/.changeset/update-dependencies.md deleted file mode 100644 index 57d2e27..0000000 --- a/.changeset/update-dependencies.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@labdigital/graphql-codegen-bruno": minor -"@labdigital/graphql-codegen-k6": minor -"@labdigital/graphql-codegen-typedefs": minor ---- - -Update dependencies to resolve security advisories: `@graphql-codegen/plugin-helpers` 7, `@graphql-codegen/visitor-plugin-common` 7 and `@graphql-tools/utils` 12. The `graphql` peer dependency now accepts both v16 and v17. - -The packages now only publish `dist`, declare `types` in their `exports` map and are marked side-effect free. diff --git a/packages/bruno/CHANGELOG.md b/packages/bruno/CHANGELOG.md index bfeda2a..ad4def0 100644 --- a/packages/bruno/CHANGELOG.md +++ b/packages/bruno/CHANGELOG.md @@ -1,5 +1,26 @@ # @labdigital/graphql-codegen-bruno +## 1.4.0 + +### Minor Changes + +- 8ce45bb: Add the `url` and `auth` options for the request URL and auth mode; they default to the previously hardcoded `{{graphql-gateway}}/graphql` and `none`. + + This release changes the generated output: + + - A request now contains only its operation followed by the fragments it (transitively) uses, each once. Previously it contained the complete source document (including other operations in the same document) and fragments could be included twice. The GraphQL is printed with `graphql`'s `print`, so comments of the source document are no longer included. + - Subscriptions are written to `subscriptions/` instead of `mutations/`. Run once with `clean: true` (or remove them manually) to remove the subscriptions from `mutations/`. + - `clean: true` now only removes the previously generated requests (the `.bru` files, except `folder.bru`, in the `queries/`, `mutations/` and `subscriptions/` folders of the output directory) instead of everything in the output directory, so it no longer deletes `bruno.json`, environments or other files. + - prettier is no longer bundled (the package was 5 MB); formatting is done by `graphql`'s `print`. +- f8e2749: Require Node.js >= 22 (Node 18/20 are end-of-life) and update build/test tooling to resolve security advisories. Packages are now built with tsdown instead of tsup (same output files). +- 376e6ab: Update dependencies to resolve security advisories: `@graphql-codegen/plugin-helpers` 7, `@graphql-codegen/visitor-plugin-common` 7 and `@graphql-tools/utils` 12. The `graphql` peer dependency now accepts both v16 and v17. + + The packages now only publish `dist`, declare `types` in their `exports` map and are marked side-effect free. + +### Patch Changes + +- 58552a7: Improve README + ## 1.3.1 ### Patch Changes diff --git a/packages/bruno/package.json b/packages/bruno/package.json index e536ffc..99fbb6b 100644 --- a/packages/bruno/package.json +++ b/packages/bruno/package.json @@ -1,6 +1,6 @@ { "name": "@labdigital/graphql-codegen-bruno", - "version": "1.3.1", + "version": "1.4.0", "type": "module", "engines": { "node": ">=22" diff --git a/packages/k6/CHANGELOG.md b/packages/k6/CHANGELOG.md index 44c310e..d6ac3e1 100644 --- a/packages/k6/CHANGELOG.md +++ b/packages/k6/CHANGELOG.md @@ -1,5 +1,21 @@ # @labdigital/graphql-codegen-k6 +## 0.2.0 + +### Minor Changes + +- f8e2749: Require Node.js >= 22 (Node 18/20 are end-of-life) and update build/test tooling to resolve security advisories. Packages are now built with tsdown instead of tsup (same output files). +- 376e6ab: Update dependencies to resolve security advisories: `@graphql-codegen/plugin-helpers` 7, `@graphql-codegen/visitor-plugin-common` 7 and `@graphql-tools/utils` 12. The `graphql` peer dependency now accepts both v16 and v17. + + The packages now only publish `dist`, declare `types` in their `exports` map and are marked side-effect free. + +### Patch Changes + +- 58552a7: Improve README +- 8ce45bb: Fix the generated code for `documentMode` `graphQLTag` (the default) and `external`: the `Requester` type referred to `DocumentNode` without importing it, so the output did not type check. `DocumentNode` is now imported from `documentNodeImport` (default `graphql`), respecting `useTypeImports`. + + Fix `documentMode: "string"`: the output referred to a `TypedDocumentString` class that was never defined. The class is now generated (the same class as `typed-document-node` and the client preset use), the operation documents are typed with their result and variables, and the requester receives the `TypedDocumentString` (which serializes to the query string). + ## 0.1.1 ### Patch Changes diff --git a/packages/k6/package.json b/packages/k6/package.json index 8cab06c..2797020 100644 --- a/packages/k6/package.json +++ b/packages/k6/package.json @@ -1,6 +1,6 @@ { "name": "@labdigital/graphql-codegen-k6", - "version": "0.1.1", + "version": "0.2.0", "type": "module", "types": "./dist/index.d.ts", "description": "GraphQL Code Generator plugin for generating a ready-to-use k6 compatible SDK based on GraphQL operations", diff --git a/packages/typedefs/CHANGELOG.md b/packages/typedefs/CHANGELOG.md index 1959910..b81328d 100644 --- a/packages/typedefs/CHANGELOG.md +++ b/packages/typedefs/CHANGELOG.md @@ -1,5 +1,21 @@ # @labdigital/graphql-codegen-typedefs +## 0.2.0 + +### Minor Changes + +- f8e2749: Require Node.js >= 22 (Node 18/20 are end-of-life) and update build/test tooling to resolve security advisories. Packages are now built with tsdown instead of tsup (same output files). +- 8ce45bb: Only print the schema definition as `extend schema { ... }`. Previously the whole printed schema was prefixed with `extend`, which produced invalid output for schemas without root types (`extend type ...`, `extend directive ...`) and for schemas with a description. The description of the schema is dropped from the extension, as extensions cannot have one. + + Add the `extendSchema` option (default `true`, the previous behaviour); set it to `false` to print a plain `schema { ... }` definition instead. +- 376e6ab: Update dependencies to resolve security advisories: `@graphql-codegen/plugin-helpers` 7, `@graphql-codegen/visitor-plugin-common` 7 and `@graphql-tools/utils` 12. The `graphql` peer dependency now accepts both v16 and v17. + + The packages now only publish `dist`, declare `types` in their `exports` map and are marked side-effect free. + +### Patch Changes + +- 58552a7: Improve README + ## 0.1.1 ### Patch Changes diff --git a/packages/typedefs/package.json b/packages/typedefs/package.json index df59df0..66a4fd7 100644 --- a/packages/typedefs/package.json +++ b/packages/typedefs/package.json @@ -1,6 +1,6 @@ { "name": "@labdigital/graphql-codegen-typedefs", - "version": "0.1.1", + "version": "0.2.0", "description": "Generate a typedefs file with your GraphQL schema", "type": "module", "types": "./dist/index.d.ts",