capybara-lightpanda 0.12.0 → 0.14.0

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.
@@ -63,10 +63,10 @@ module Capybara
63
63
  # returns spec-correct booleans. Lets _lightpanda.isVisible detect
64
64
  # inline-@media-gated hides via el.checkVisibility() without any
65
65
  # gem-side workaround),
66
- # PR #2487 (css: external <link rel="stylesheet"> fetch behind the
67
- # --enable-external-stylesheets flag — build_args now passes that flag
68
- # unconditionally, so the floor MUST include the build that introduced
69
- # it; the flag is a fatal UnknownOption on builds < 6353),
66
+ # PR #2487 (css: external <link rel="stylesheet"> fetch behind a CLI
67
+ # flag — build_args passes it unconditionally, so the floor MUST include
68
+ # the build that introduced it; since #3305 (8946) the spelling is
69
+ # `--load-resources stylesheet`, see the 2026-09-06 bump),
70
70
  # PR #2498 (StyleManager: author display rule beats UA [hidden] — fixes
71
71
  # the Stimulus/Alpine dropdown ElementNotFound),
72
72
  # PR #2635 (dom: DOM.setFileInputFiles backs input.files + fires change
@@ -227,11 +227,44 @@ module Capybara
227
227
  # and `localhost.evil.com:<port>` still 403). Below 8875 only an IP
228
228
  # literal passed, so a user-supplied `ws_url:` had to say 127.0.0.1.
229
229
  # Pinned by test/features/ws_url_host_test.rb.
230
- # Build 8875 = the #3256 merge (f2169836e). NOTE: this floor leads the
231
- # nightly channel — the 2026-08-26 nightly is 8855 — so it lands with the
232
- # next nightly cut. #3267 (8880, Authorization stripped on cross-origin
233
- # redirects) arrives with the same floor but drives nothing gem-side.
234
- MINIMUM_NIGHTLY_BUILD = Gem::Version.new("8875")
230
+ # Build 8875 = the #3256 merge (f2169836e).
231
+ #
232
+ # 2026-09-06 bump 8875 -> 9058. The binding constraint is the lockstep
233
+ # with MINIMUM_RELEASE below: 9058 is exactly `git rev-list --count
234
+ # 0.4.0`, the newest tagged release, so this is as high as the nightly
235
+ # floor can go without naming a release that does not exist. Two fixes
236
+ # the gem now asserts on ride along:
237
+ # #3298 (8937) Backspace/Delete through CDP Input.dispatchKeyEvent
238
+ # actually edit an <input>/<textarea>: a trusted `beforeinput`
239
+ # (cancelable) then `input` with inputType deleteContentBackward /
240
+ # deleteContentForward, via the text_entry.zig mixin. Below 8937 the
241
+ # keys were dead, so Node#send_keys(:backspace) silently did nothing.
242
+ # Pinned by test/features/keyboard_editing_test.rb.
243
+ # #3305 (8946) renamed --enable-external-stylesheets to
244
+ # `--load-resources stylesheet` and --log-filter-scopes to
245
+ # --log-filter; build_args now passes the new spelling, which is a
246
+ # fatal UnknownOption below 8946. (The same PR flipped iframes and
247
+ # workers off by default — Browser#configure_loading re-enables them
248
+ # per BrowserContext, and did so before this bump.)
249
+ #
250
+ # 2026-10-03 bump 9058 -> 9994 (= release 1.0.0, the new lockstep cap).
251
+ # Retired or ungated by it:
252
+ # #3375 (9071) option.selected deselects its siblings — SELECT_OPTION_JS
253
+ # dropped its `sel.value =` detour, which selected the FIRST option
254
+ # sharing a value rather than the one Capybara resolved.
255
+ # #3378 (9207) matchMedia `change` fires on a viewport override —
256
+ # viewport_test.rb's pin runs un-gated.
257
+ # #3414 / #3420 / #3422 / #3424 (9217-9234, ours) trusted
258
+ # `beforeinput` is cancelable; `.value =` moves the caret to the end;
259
+ # a child-text <textarea> can be selected; arrows/Home/End move the
260
+ # caret — the `send_keys should send special characters` skip is
261
+ # gone and keyboard_editing_test.rb pins all four.
262
+ # Behavior changes the floor now guarantees, all compensated or
263
+ # Chrome-parity: #3654 (9883) CORS enforced by default (blocked requests
264
+ # end in Network.loadingFailed, which Network consumes); #3529 (9877)
265
+ # SameSite=None without Secure refused (Cookies#set reports it);
266
+ # #3702 (9968) click no longer focuses (CLICK_JS focuses itself).
267
+ MINIMUM_NIGHTLY_BUILD = Gem::Version.new("9994")
235
268
 
236
269
  # Second, equivalent floor for the *release* channel.
237
270
  #
@@ -240,21 +273,16 @@ module Capybara
240
273
  # bare "0.3.6" carrying no commit counter at all, and MINIMUM_NIGHTLY_BUILD
241
274
  # has nothing to compare against. Releases are cut from the same trunk, so
242
275
  # a release is acceptable exactly when its own commit count clears the
243
- # nightly floor. As of 2026-08-26 NO published release clears the 8875
244
- # floor — 0.3.7 (build 8671) predates every fix the floor exists for — so
245
- # this pin names the NEXT release. 0.3.8 is not tagged yet; any future tag
246
- # is cut from a trunk already past build 8886, so it clears the floor by
247
- # construction. Until upstream tags it, the release channel is
248
- # deliberately unusable (nightly-only), reported with the standard
249
- # too-old error. When 0.3.8 ships: verify
250
- # `git rev-list --count 0.3.8` >= 8875 and update the lockstep table in
251
- # process_test.rb.
276
+ # nightly floor. 1.0.0 (2026-10-02) is build 9994 — exactly the nightly
277
+ # floor, which is no accident: the floor was raised *to* the release so
278
+ # both channels gate the same commit. (0.4.1 = 9463 and 0.4.0 = 9058
279
+ # predate fixes the floor exists for.)
252
280
  #
253
281
  # INVARIANT: every MINIMUM_NIGHTLY_BUILD bump must also move this to the
254
282
  # first release containing that build (`git rev-list --count <tag>` in the
255
283
  # browser repo tells you). Leaving it behind would let the release channel
256
284
  # silently accept a binary the nightly channel rejects.
257
- MINIMUM_RELEASE = Gem::Version.new("0.3.8")
285
+ MINIMUM_RELEASE = Gem::Version.new("1.0.0")
258
286
 
259
287
  class << self
260
288
  # `lightpanda version` prints one of two shapes, and the gem supports
@@ -423,10 +451,6 @@ module Capybara
423
451
  @options.port.to_s,
424
452
  "--log_level",
425
453
  "info",
426
- # External stylesheet fetch (PR #2487, build >= 6353 — enforced by the
427
- # floor). Always on so linked CSS contributes to checkVisibility /
428
- # getComputedStyle; see .claude/rules/lightpanda-io.md limitation #5.
429
- "--enable-external-stylesheets",
430
454
  # Raise the inbound CDP WebSocket message cap from Lightpanda's 1 MiB
431
455
  # default (Config.zig `cdp_max_message_size`) to 100 MiB, matching
432
456
  # Chrome's inbound DevTools buffer. An inbound message over the cap is
@@ -441,12 +465,23 @@ module Capybara
441
465
  "--cdp-max-message-size",
442
466
  (100 * 1024 * 1024).to_s,
443
467
  ]
444
- # Opt-in image fetching (upstream #3230, build >= 8834). Deliberately
445
- # NOT always-on like --enable-external-stylesheets: images never feed
446
- # the DOM predicates, so the default spends no bandwidth on them. On
447
- # builds < 8834 the flag is a fatal UnknownOption at boot — see
448
- # Options#load_images.
449
- base.push("--load-resources", "image") if @options.load_images
468
+ # Sub-resource loading is one comma-separated `--load-resources` value
469
+ # (Config.LoadResources is a packed struct the CLI parser fills from a
470
+ # comma list — the flag is NOT repeatable). Every kind defaults OFF
471
+ # since #3305 (build 8946).
472
+ # stylesheet — always on (PR #2487, build >= 6353) so linked CSS
473
+ # contributes to checkVisibility / getComputedStyle; see
474
+ # .claude/rules/lightpanda-io.md limitation #5. The spelling
475
+ # `--load-resources stylesheet` is a fatal UnknownOption below 8946,
476
+ # which the floor clears.
477
+ # image — opt-in (upstream #3230, build >= 8834): images never feed
478
+ # the DOM predicates, so the default spends no bandwidth on them.
479
+ # See Options#load_images.
480
+ # iframe / worker — deliberately NOT here. Browser#configure_loading
481
+ # re-enables both over CDP (LP.configureLoading) per BrowserContext.
482
+ resources = ["stylesheet"]
483
+ resources << "image" if @options.load_images
484
+ base.push("--load-resources", resources.join(","))
450
485
  extra = ENV.fetch("LIGHTPANDA_EXTRA_ARGS", "").split
451
486
  base + extra
452
487
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capybara
4
4
  module Lightpanda
5
- VERSION = "0.12.0"
5
+ VERSION = "0.14.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-lightpanda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Navid Emad
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 4.0.16
132
+ rubygems_version: 4.0.20
133
133
  specification_version: 4
134
134
  summary: Capybara driver for the Lightpanda headless browser
135
135
  test_files: []