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.
- checksums.yaml +4 -4
- data/lib/barefoot_js.rb +13 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6ad56e254b2aca04c26be9e86ca0977d9431e82f26bece658156cbb1355d283
|
|
4
|
+
data.tar.gz: 74c8c1e5aca0160229f1f0e52822fa23edd1a35d74fbe66bc2d9b6712e8654b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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(
|
|
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.
|
|
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-
|
|
11
|
+
date: 2026-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tzinfo
|