Skip to content

Commit

Permalink
chore(release): publish packages
Browse files Browse the repository at this point in the history
  • Loading branch information
knaeckeKami committed Nov 10, 2023
1 parent 9ff0655 commit f7d87a2
Show file tree
Hide file tree
Showing 23 changed files with 591 additions and 9 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2023-11-10

### Changes

---

Packages with breaking changes:

- [`ferry_exec` - `v0.4.0`](#ferry_exec---v040)

Packages with other changes:

- [`ferry` - `v0.15.0-dev.4`](#ferry---v0150-dev4)
- [`ferry_test_graphql2` - `v0.2.4-dev.1`](#ferry_test_graphql2---v024-dev1)
- [`ferry_flutter` - `v0.8.1-dev.4`](#ferry_flutter---v081-dev4)
- [`ferry_cache` - `v0.7.1-dev.4`](#ferry_cache---v071-dev4)
- [`ferry_generator` - `v0.8.2-dev.2`](#ferry_generator---v082-dev2)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `ferry` - `v0.15.0-dev.4`
- `ferry_test_graphql2` - `v0.2.4-dev.1`
- `ferry_flutter` - `v0.8.1-dev.4`
- `ferry_cache` - `v0.7.1-dev.4`
- `ferry_generator` - `v0.8.2-dev.2`

---

#### `ferry_exec` - `v0.4.0`

- **BREAKING** **FEAT**(ferry_exec): add `varToJson()` method to OperationRequest and FragmentRequest in order to make the cache work without casts to dynamic.


## 2023-08-13

### Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/ferry/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ homepage: https://ferrygraphql.com/
description: Ferry is a simple, powerful GraphQL Client for Flutter and Dart.
repository: https://github.com/gql-dart/ferry
environment:
sdk: '>=2.15.0 <3.0.0'
sdk: '>=3.0.0 <4.0.0'
dependencies:
gql: '>=0.14.0 <2.0.0'
rxdart: ^0.27.1
Expand All @@ -14,7 +14,7 @@ dependencies:
collection: ^1.15.0
hive: ^2.0.0
built_value: ^8.0.4
ferry_exec: ^0.3.1
ferry_exec: ^0.4.0
normalize: ^0.9.0-dev.2
ferry_cache: ^0.7.1-dev.3
dev_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/ferry_cache/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository: https://github.com/gql-dart/ferry
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
ferry_exec: ^0.3.1
ferry_exec: ^0.4.0
meta: ^1.3.0
rxdart: ^0.27.1
normalize: ^0.9.0-dev.2
Expand Down
6 changes: 6 additions & 0 deletions packages/ferry_exec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.4.0

> Note: This release has breaking changes.
- **BREAKING** **FEAT**(ferry_exec): add `varToJson()` method to OperationRequest and FragmentRequest in order to make the cache work without casts to dynamic.

## 0.3.1

- Bump "ferry_exec" to `0.3.1`.
Expand Down
84 changes: 84 additions & 0 deletions packages/ferry_exec/lib/src/json_operation_request.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import 'package:collection/collection.dart';
import 'package:ferry_exec/ferry_exec.dart';
import 'package:gql_exec/gql_exec.dart';

/// A [OperationRequest] that parses the response into a [Map<String, dynamic>]
/// this is useful for when you don't have a generated class for the operation
/// or as an escape hatch for when you want to parse the response yourself.
class JsonOperationRequest implements OperationRequest<Map<String, dynamic>, Map<String, dynamic>> {
@override
final FetchPolicy fetchPolicy;

@override
final String? requestId;

@override
final String? updateCacheHandlerKey;

@override
final Map<String, dynamic>? updateCacheHandlerContext;

@override
final bool executeOnListen;

@override
final Map<String, dynamic> vars;

@override
final Map<String, dynamic>? Function(Map<String, dynamic>?, Map<String, dynamic>?)? updateResult;

@override
final Operation operation;

@override
Request get execRequest => Request(operation: operation, variables: vars);

JsonOperationRequest(
{required this.operation,
required this.fetchPolicy,
required this.requestId,
this.updateCacheHandlerKey,
this.updateCacheHandlerContext,
this.executeOnListen = true,
required this.vars,
this.updateResult,
this.optimisticResponse});

@override
Map<String, dynamic> parseData(Map<String, dynamic> json) => json;

@override
final Map<String, dynamic>? optimisticResponse;

@override
Map<String, dynamic> varsToJson() => vars;

@override
bool operator ==(Object o) {
if (identical(this, o)) return true;

return o is JsonOperationRequest &&
o.operation == operation &&
o.fetchPolicy == fetchPolicy &&
o.requestId == requestId &&
o.updateCacheHandlerKey == updateCacheHandlerKey &&
o.updateCacheHandlerContext == updateCacheHandlerContext &&
o.executeOnListen == executeOnListen &&
const DeepCollectionEquality().equals(vars, o.vars) &&
o.updateResult == updateResult &&
o.optimisticResponse == optimisticResponse;
}

@override
int get hashCode {
return operation.hashCode ^
fetchPolicy.hashCode ^
requestId.hashCode ^
updateCacheHandlerKey.hashCode ^
updateCacheHandlerContext.hashCode ^
executeOnListen.hashCode ^
const DeepCollectionEquality().hash(vars) ^
updateResult.hashCode ^
optimisticResponse.hashCode;
}
}
4 changes: 2 additions & 2 deletions packages/ferry_exec/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: ferry_exec
version: 0.3.1
version: 0.4.0
homepage: https://ferrygraphql.com/
description: A strongly typed execution interface for GraphQL operations
repository: https://github.com/gql-dart/ferry
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0 <4.0.0'
dependencies:
gql: '>=0.14.0 <2.0.0'
gql_exec: '>=0.4.0 <2.0.0'
Expand Down
2 changes: 1 addition & 1 deletion packages/ferry_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
dependencies:
ferry: ^0.15.0-dev.3
gql_exec: '>=0.4.0 <2.0.0'
ferry_exec: ^0.3.1
ferry_exec: ^0.4.0
flutter:
sdk: flutter
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion packages/ferry_generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 0.8.2-dev.1

- **FEAT**(ferry_generator): add option to reuse data classes for fragments with a single inline fragment spread as selection (#530).
- **FEAT**(ferry_generator): experimental: add option to reuse data classes for fragments with a single inline fragment spread as selection (#530).

## 0.8.2-dev.0

Expand Down
9 changes: 9 additions & 0 deletions packages/ferry_generator/lib/src/codegen/fragment_req.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ Class _buildFragmentReqClass(
..lambda = true
..body = dataTypeRef.property('fromJson').call([refer('json')]).code,
),
Method(
(b) => b
..annotations.add(refer('override'))
..returns = refer('Map<String, dynamic>')
..type = MethodType.getter
..name = 'varsToJson'
..lambda = true
..body = refer('vars').property('toJson').call([]).code,
),
],
initializers: {
'document': refer('document', '#ast'),
Expand Down
9 changes: 9 additions & 0 deletions packages/ferry_generator/lib/src/codegen/operation_req.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ Class _buildOperationReqClass(
..lambda = true
..body = dataTypeRef.property('fromJson').call([refer('json')]).code,
),
Method(
(b) => b
..annotations.add(refer('override'))
..returns = refer('Map<String, dynamic>')
..type = MethodType.getter
..name = 'varsToJson'
..lambda = true
..body = (refer('vars').property('toJson').call([])).code,
),
],
initializers: {
'operation': refer('Operation', 'package:gql_exec/gql_exec.dart').call(
Expand Down
2 changes: 1 addition & 1 deletion packages/ferry_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
code_builder: ^4.3.0
build: ^2.0.0
path: ^1.8.0
ferry_exec: ^0.3.1
ferry_exec: ^0.4.0
yaml: ^3.1.0
dart_style: ^2.3.2
glob: ^2.0.1
Expand Down
2 changes: 1 addition & 1 deletion packages/ferry_test_graphql2/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
gql: '>=0.14.0 <2.0.0'
gql_exec: '>=0.4.0 <2.0.0'
gql_link: '>=0.5.0 <2.0.0'
ferry_exec: ^0.3.1
ferry_exec: ^0.4.0
built_value: ^8.0.4
built_collection: ^5.0.0
gql_code_builder: ^0.8.0
Expand Down
9 changes: 9 additions & 0 deletions packages/ferry_test_graphql3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Dart
.dart_tool
.packages
pubspec.lock

# Documentation
doc/api

build/
Loading

0 comments on commit f7d87a2

Please sign in to comment.