terminal-shop 3.8.1 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 599e129d7291d6af08b3d81afb02569f0b59daf1db3ab1b9e0aab5eb8420c8b1
4
- data.tar.gz: 80ac8c28092fb302019fc19c536258f4fae23ce8777108dde50898fe49f6572e
3
+ metadata.gz: ca87a0b1da8b61b429a9b578cde7a63212a7a13157df7363289e911237369aef
4
+ data.tar.gz: c01665d3f6bdebd07187ae7b9a775401dd4c6f4f70aaca092225e9d43b8f7320
5
5
  SHA512:
6
- metadata.gz: 1214379df3ea55463a0e23d01249c474ad3ca6e29c70d127e153787a59cbb82552ec12818867948f7a90774fff3fe571d22c09a2d7c6a6c31b7ad8048f1f57c6
7
- data.tar.gz: '0592dcc2f02b159ea20773cd02caaf9c3d49d9a6ed27ff72b8e824455f30468f608f649e8bb4f97d7821a55c5ede02908920aa1b7b5ecb9f61774c73d40fe722'
6
+ metadata.gz: d9d441963ab7ab4a30f3aa3602f4668d8d5733ce76416bb0a52e03bfb579662955beb7995a452b5e32490d869ad01c8f1cdd74da14eeed00ba0818e739b67eb1
7
+ data.tar.gz: 3b0bfebce0c069209e7d721eca01d40f86d33e9783c86385daca6b406e4c8f9412dab3c82e6255222298965c11e3c94e503463e83d9c20cbeb52618f28d4bbc5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.8.3 (2025-06-03)
4
+
5
+ Full Changelog: [v3.8.2...v3.8.3](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.8.2...v3.8.3)
6
+
7
+ ### Bug Fixes
8
+
9
+ * `to_sorbet_type` should not return branded types ([5d5980e](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/5d5980e177248dc7f66ee0802622bfa833b5b313))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** version bump ([ff0ee20](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/ff0ee20a9b486bdbf60d5d386d2edf9c1c594dcc))
15
+
16
+ ## 3.8.2 (2025-05-28)
17
+
18
+ Full Changelog: [v3.8.1...v3.8.2](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.8.1...v3.8.2)
19
+
20
+ ### Bug Fixes
21
+
22
+ * sorbet types for enums, and make tapioca detection ignore `tapioca dsl` ([30f6f4a](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/30f6f4a26d4fb2075d067c8aa673686512dcd68b))
23
+
24
+
25
+ ### Chores
26
+
27
+ * **internal:** version bump ([730fe7b](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/730fe7b769330586248eae9ec45fd35b3a60c3e1))
28
+
3
29
  ## 3.8.1 (2025-05-24)
4
30
 
5
31
  Full Changelog: [v3.8.0...v3.8.1](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.8.0...v3.8.1)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "terminal-shop", "~> 3.8.1"
20
+ gem "terminal-shop", "~> 3.8.3"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -116,11 +116,14 @@ module TerminalShop
116
116
  #
117
117
  # @return [Object]
118
118
  def to_sorbet_type
119
- case values
119
+ types = values.map { TerminalShop::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
120
+ case types
120
121
  in []
121
122
  T.noreturn
122
- in [value, *_]
123
- T.all(TerminalShop::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
123
+ in [type]
124
+ type
125
+ else
126
+ T.any(*types)
124
127
  end
125
128
  end
126
129
 
@@ -201,11 +201,14 @@ module TerminalShop
201
201
  #
202
202
  # @return [Object]
203
203
  def to_sorbet_type
204
- case (v = variants)
204
+ types = variants.map { TerminalShop::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
205
+ case types
205
206
  in []
206
207
  T.noreturn
208
+ in [type]
209
+ type
207
210
  else
208
- T.any(*v.map { TerminalShop::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
211
+ T.any(*types)
209
212
  end
210
213
  end
211
214
 
@@ -875,8 +875,12 @@ module TerminalShop
875
875
  case type
876
876
  in TerminalShop::Internal::Util::SorbetRuntimeSupport
877
877
  type.to_sorbet_type
878
- else
878
+ in Class | Module
879
879
  type
880
+ in true | false
881
+ T::Boolean
882
+ else
883
+ type.class
880
884
  end
881
885
  end
882
886
  end
@@ -11,16 +11,16 @@ module TerminalShop
11
11
  mod.constants.each do |name|
12
12
  case mod.const_get(name)
13
13
  in true | false
14
- mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
14
+ mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
15
15
  mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
16
16
  in Integer
17
- mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
17
+ mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
18
18
  mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
19
19
  in Float
20
- mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
20
+ mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
21
21
  mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
22
22
  in Symbol
23
- mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
23
+ mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
24
24
  mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
25
25
  else
26
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TerminalShop
4
- VERSION = "3.8.1"
4
+ VERSION = "3.8.3"
5
5
  end
data/lib/terminal_shop.rb CHANGED
@@ -20,7 +20,9 @@ require "uri"
20
20
 
21
21
  # We already ship the preferred sorbet manifests in the package itself.
22
22
  # `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
23
- if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
23
+ if Object.const_defined?(:Tapioca) &&
24
+ caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) &&
25
+ ARGV.none?(/dsl/)
24
26
  return
25
27
  end
26
28
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal-shop
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1
4
+ version: 3.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terminal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-25 00:00:00.000000000 Z
11
+ date: 2025-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool