phlex-reactive 0.11.0 → 0.11.1

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.
@@ -730,7 +730,13 @@ module Phlex
730
730
  action: "input->reactive#recompute",
731
731
  reactive_compute_reducer_param: definition.reducer,
732
732
  reactive_compute_inputs_param: compute_inputs_param(definition),
733
- reactive_compute_outputs_param: definition.outputs.map(&:to_s).to_json
733
+ reactive_compute_outputs_param: definition.outputs.map(&:to_s).to_json,
734
+ # Issue #199: the client self-seeds the derived fields on connect from
735
+ # this marker, so a freshly-rendered compute root computes its outputs
736
+ # + mirrors on first paint — no wait for the first user input, and no
737
+ # synthetic seed `input` for an app to race. STRING "true" (a valueless
738
+ # boolean attr renders "" → falsy client-side; the client reads == "true").
739
+ reactive_compute_seed: "true"
734
740
  }
735
741
  # Declared cross-root text mirrors (issue #159) ride as a JSON object of
736
742
  # name → [id selectors]; omitted entirely when undeclared so the shipped
@@ -106,7 +106,11 @@ module Phlex
106
106
  return false unless result.success?
107
107
 
108
108
  names = authorization_method_names
109
- call_names(result.value).any? { names.include?(it) }
109
+ # Set#intersect? on the Set receiver (names) — Array#intersect? would raise
110
+ # TypeError on a Set arg (caught by the rescue below → a silent false, the
111
+ # bug the naive Style/ArrayIntersect autocorrect introduces). Set#intersect?
112
+ # accepts any Enumerable, so the call_names Array is a valid argument.
113
+ names.intersect?(call_names(result.value))
110
114
  rescue StandardError
111
115
  false
112
116
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlex
4
4
  module Reactive
5
- VERSION = "0.11.0"
5
+ VERSION = "0.11.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-reactive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson