barefoot_js 0.31.8 → 0.31.9

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/barefoot_js.rb +13 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 901bf3514778e24d61cbdaa7a4f32d8ac29dee266bd1ee786e807102e64c1b4f
4
- data.tar.gz: d947c28214b804848aee72129aeeaf58bd2ceec6b8bd0e3ecbd9024220b6a168
3
+ metadata.gz: f6ad56e254b2aca04c26be9e86ca0977d9431e82f26bece658156cbb1355d283
4
+ data.tar.gz: 74c8c1e5aca0160229f1f0e52822fa23edd1a35d74fbe66bc2d9b6712e8654b3
5
5
  SHA512:
6
- metadata.gz: 214a35b8051e6a3dd5b4ad10d416d5fd15aa42cd96de0e88e7fe4a8299b2be57ed108072deb225890b27a80b8fe45f0956a8647ccd478fe6aaf7eeda0288aaf0
7
- data.tar.gz: 3d8ca8a1952f9eafb230317eb5e9b9e73b20c0a3570de677ae2e19fa3c112cc4f70b94d04574a16aa79b0f24713544088c7e3da794833450ab1ad3ca437186dd
6
+ metadata.gz: 62cf1e0ade227f6244b0f91373d95ea670ed2945d658fe571b8646bb3f7a76177287f7eca0d84aa1c44e2ca025a535126f1805a717afc23bdef543ac1c64af3e
7
+ data.tar.gz: e9a66c4b9616078113a96cd55f1551a4aadeffa6ac94d7e21af46c449ade6ab1ffc3b56fb23c8ac981fb24d6a8ae3bdce18ef63d9e21f2ba36be3bfc40719cea
data/lib/barefoot_js.rb CHANGED
@@ -125,11 +125,23 @@ module BarefootJS
125
125
  props = _props
126
126
  return '' unless props && !props.empty?
127
127
 
128
+ # Exclude the internal `scope_id` key from the client hydration
129
+ # payload: it is a server-side render detail (already carried by
130
+ # `_scope_id` for bf-s/bf-h/bf-m emission) with zero client runtime
131
+ # consumers -- the only bf-p parser (packages/client/src/runtime/
132
+ # hydrate.ts's parseProps -> runInit) never reads it back out.
133
+ # Filtered here, the single marshal boundary for bf-p, so it's
134
+ # excluded no matter how a `scope_id` key ends up in the props Hash
135
+ # (found via the bf-p semantic-comparison audit against the Hono
136
+ # reference adapter, which never emits it).
137
+ client_props = props.reject { |k, _| k.to_s == 'scope_id' }
138
+ return '' if client_props.empty?
139
+
128
140
  # The JSON must be attribute-escaped: a raw `'` inside a string value
129
141
  # (e.g. a blog paragraph) terminates the single-quoted attribute and
130
142
  # truncates the hydration payload. The browser entity-decodes the
131
143
  # attribute value, so the client's JSON.parse sees the original text.
132
- json = html_escape(backend.encode_json(props))
144
+ json = html_escape(backend.encode_json(client_props))
133
145
  %( bf-p='#{json}')
134
146
  end
135
147
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barefoot_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.8
4
+ version: 0.31.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - kobaken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-18 00:00:00.000000000 Z
11
+ date: 2026-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo