From 8ab63d5f69745451a3f4e6efe6017a5e8146084b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Brand=C3=A3o?= Date: Sun, 16 Apr 2023 16:59:05 -0300 Subject: [PATCH] Prepare 2.0.0-rc.0 release --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ lib/rspec/graphql_matchers/version.rb | 2 +- rspec-graphql_matchers.gemspec | 3 --- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f81bcbe..38dd62e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## 2.0.0 (April 16th, 2023) + +- Adds compatibility with graphql-ruby 2.0+. If you're still using an earlier version, you should stick to 1.4.x. + +### Deprecations + +- The usage of the `#types` helper when writing tests (if you're not including `RSpec::GraphqlMatchers::TypesHelper` anywhere, you shoudn't have to change anything). Use `GraphQL::Types::` instead +- The usage of type instances as expected value for a type comparison is deprecated. Instead, + use the string that represents the type specification. Examples: + + ``` + # Bad - These are deprecated: + expect(a_type).to have_a_field(:lorem).of_type(GraphQL::Types::ID) + expect(a_type).to have_a_field(:lorem).of_type(Types::MyCustomType) + + # Good - Use these instead + expect(a_type).to have_a_field(:lorem).of_type('ID') + expect(a_type).to have_a_field(:lorem).of_type('MyCustomType') + ``` + + The reason behind this change relies on the fact that we should have a decoupling between the + internal constants used to define our API and the public names exposed through it. If we test + a published API using the internal constants, it is possible to perform breaking changes by + renaming the graphql names of our types or entities without actually breaking the tests. + + If we're performing a breaking change to a public API, we want our tests to fail. + ## 1.4.0 (April 16th, 2023) - Removal of deprecated calls to #to_graphql, replacing them with #to_type_signature that was added in graphql-ruby 1.8.3 (https://github.com/khamusa/rspec-graphql_matchers/pull/43 @RobinDaugherty) diff --git a/lib/rspec/graphql_matchers/version.rb b/lib/rspec/graphql_matchers/version.rb index bc8ae0b..06d8c19 100644 --- a/lib/rspec/graphql_matchers/version.rb +++ b/lib/rspec/graphql_matchers/version.rb @@ -2,6 +2,6 @@ module Rspec module GraphqlMatchers - VERSION = '1.4.0'.freeze + VERSION = '2.0.0-rc.0'.freeze end end diff --git a/rspec-graphql_matchers.gemspec b/rspec-graphql_matchers.gemspec index 41aef9e..701fe9e 100644 --- a/rspec-graphql_matchers.gemspec +++ b/rspec-graphql_matchers.gemspec @@ -14,9 +14,6 @@ Gem::Specification.new do |spec| spec.homepage = 'https://github.com/khamusa/rspec-graphql_matchers' spec.license = 'MIT' - # raise 'RubyGems 2.0 or newer is required to protect against public gem ' \ - # 'pushes.' - spec.files = `git ls-files -z` .split("\x0")