From 604f18c4322c89fd45279d68aac5af88955cc2b9 Mon Sep 17 00:00:00 2001 From: Christian Budde Christensen Date: Thu, 23 Nov 2023 22:26:36 +0000 Subject: [PATCH] fix: Asset resolution bug --- packages/graphql_codegen/CHANGELOG.md | 4 ++++ packages/graphql_codegen/example/pubspec.lock | 2 +- packages/graphql_codegen/lib/builder.dart | 17 ++--------------- packages/graphql_codegen/pubspec.yaml | 2 +- packages/graphql_switch/example/pubspec.lock | 2 +- packages/graphql_switch/pubspec.lock | 2 +- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/packages/graphql_codegen/CHANGELOG.md b/packages/graphql_codegen/CHANGELOG.md index edbf559b..bb55cc6d 100644 --- a/packages/graphql_codegen/CHANGELOG.md +++ b/packages/graphql_codegen/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.13.9 + +- Fix bug in asset path resolution, again. + # 0.13.8 - Fix bug in asset path resolution. diff --git a/packages/graphql_codegen/example/pubspec.lock b/packages/graphql_codegen/example/pubspec.lock index 0f74a28b..ff290c53 100644 --- a/packages/graphql_codegen/example/pubspec.lock +++ b/packages/graphql_codegen/example/pubspec.lock @@ -329,7 +329,7 @@ packages: path: ".." relative: true source: path - version: "0.13.8" + version: "0.13.9" graphql_flutter: dependency: "direct main" description: diff --git a/packages/graphql_codegen/lib/builder.dart b/packages/graphql_codegen/lib/builder.dart index 58526e08..79997c5d 100644 --- a/packages/graphql_codegen/lib/builder.dart +++ b/packages/graphql_codegen/lib/builder.dart @@ -171,21 +171,7 @@ class GraphQLBuilder extends Builder { ), ); } - return { - ...Map.fromEntries( - kGraphQLFileExtensions.map( - (e) => MapEntry( - p.join(_assetsPrefix, '{{dir}}', '{{file}}.${e}'), - [ - p.join( - p.relative(config.outputDirectory, from: '/'), - '{{dir}}', - '{{file}}.${e}.dart', - ) - ], - ), - ), - ), + final res = { ...Map.fromEntries( kGraphQLFileExtensions.map( (e) => MapEntry( @@ -200,5 +186,6 @@ class GraphQLBuilder extends Builder { ), ) }; + return res; } } diff --git a/packages/graphql_codegen/pubspec.yaml b/packages/graphql_codegen/pubspec.yaml index ccb50029..c93cc00f 100644 --- a/packages/graphql_codegen/pubspec.yaml +++ b/packages/graphql_codegen/pubspec.yaml @@ -3,7 +3,7 @@ description: | Simple, opinionated, codegen library for GraphQL. It allows you to generate serializers and client helpers to easily call and parse your data. -version: 0.13.8 +version: 0.13.9 homepage: https://github.com/heftapp/graphql_codegen/tree/main/packages/graphql_codegen repository: https://github.com/heftapp/graphql_codegen/tree/main/packages/graphql_codegen diff --git a/packages/graphql_switch/example/pubspec.lock b/packages/graphql_switch/example/pubspec.lock index 3c2b8c2e..6ab70ea2 100644 --- a/packages/graphql_switch/example/pubspec.lock +++ b/packages/graphql_switch/example/pubspec.lock @@ -300,7 +300,7 @@ packages: path: "../../graphql_codegen" relative: true source: path - version: "0.13.8" + version: "0.13.9" graphql_switch: dependency: "direct main" description: diff --git a/packages/graphql_switch/pubspec.lock b/packages/graphql_switch/pubspec.lock index 880ce0d3..5c6bc304 100644 --- a/packages/graphql_switch/pubspec.lock +++ b/packages/graphql_switch/pubspec.lock @@ -316,7 +316,7 @@ packages: path: "../graphql_codegen" relative: true source: path - version: "0.13.8" + version: "0.13.9" graphs: dependency: transitive description: