Skip to content

Upgrade: Bump multi_json from 1.19.1 to 1.20.1#19

Open
dependabot[bot] wants to merge 1 commit intodevfrom
dependabot/bundler/multi_json-1.20.1
Open

Upgrade: Bump multi_json from 1.19.1 to 1.20.1#19
dependabot[bot] wants to merge 1 commit intodevfrom
dependabot/bundler/multi_json-1.20.1

Conversation

@dependabot
Copy link
Copy Markdown

@dependabot dependabot Bot commented on behalf of github Apr 27, 2026

Bumps multi_json from 1.19.1 to 1.20.1.

Changelog

Sourced from multi_json's changelog.

[1.20.1]

Fixed

  • Fix JsonGem#load raising ParseError on ASCII-8BIT strings that contain valid UTF-8 bytes (#64). Ruby HTTP clients tag response bodies as ASCII-8BIT by default; the 1.20.0 change from force_encoding to encode broke the dominant real-world case by trying to transcode each byte individually. Switch back to force_encoding followed by a valid_encoding? guard so genuinely invalid byte sequences still surface as ParseError.

Added

  • Validate custom adapters during MultiJson.use and MultiJson.load/dump with an :adapter option, raising MultiJson::AdapterError immediately if the adapter does not respond to .load, .dump, or define a ParseError constant.
  • Validate OptionsCache.max_cache_size= to reject nil, zero, negative, and non-integer values with a clear ArgumentError.
  • Expand the benchmark suite (benchmark.rb) into a full adapter comparison matrix covering load, dump, and round-trip across small, medium, and large payloads in both object-heavy and array-heavy shapes.

[1.20.0]

Added

  • Surface parse error locations as error.line and error.column on MultiJson::ParseError, extracted from the underlying adapter's message for adapters that include one (Oj, the json gem).
  • Make MultiJson::OptionsCache.max_cache_size configurable so applications that generate many distinct option hashes can raise the cache ceiling at runtime.
  • Add YARD documentation for the Adapters module and ParseError constants.
  • Document public API methods as @api public so load, dump, use, with_adapter, current_adapter, adapter, load_options, and dump_options appear in generated docs.
  • Type-check the Yajl, JrJackson, and Gson adapter wrappers under Steep, with stubbed RBS sigs for the underlying libraries living in sig/external_libraries.rbs.
  • Add Ruby 4.0 to the CI matrix.
  • Add workflow badges for linter, mutant, steep, and docs.
  • Add a # frozen_string_literal: true magic comment to every Ruby file in lib/ and test/, enforced by Style/FrozenStringLiteralComment.
  • Collect the five process-wide mutexes into a new MultiJson::Concurrency module, collapsed into a single Concurrency.synchronize(name, &block) method with private constants.
  • Add a deprecate_alias / deprecate_method DSL in lib/multi_json/deprecated.rb so adding or removing a deprecation is a one-liner.
  • Memoize the per-adapter ParseError lookup in MultiJson.parse_error_class_for so the constant resolution runs at most once per adapter.

Changed

  • Split the gem into ruby and java platform variants: the java variant adds concurrent-ruby ~> 1.2 as a runtime dependency and ships the gson and jr_jackson adapters; the ruby variant has no runtime dependencies and ships the MRI-only adapters.
  • Make with_adapter overrides fiber-local so concurrent fibers and threads each observe their own adapter without racing on a shared module variable.
  • Raise MultiJson::ParseError on invalid UTF-8 in the json_gem adapter instead of silently reinterpreting bytes with force_encoding.
  • Warn once for deprecated method aliases: decode, encode, engine, engine=, default_engine, and with_engine now emit a one-time deprecation warning on first call.
  • Emit deprecation warnings only once per process for default_options, default_options=, cached_options, and reset_cached_options!.
  • Include the original exception's class name in MultiJson::AdapterError.build's formatted message.
  • Walk the superclass chain in Adapter.default_load_options / default_dump_options instead of copying at inheritance time, so a parent calling defaults :load, ... after a subclass has been defined now propagates.
  • Replace (...) argument forwarding in MultiJson::Options with explicit *args so the signatures are self-documenting.
  • Reorganize lib/multi_json.rb into clearer sections and document why both the module_function and singleton-only definition patterns coexist.
  • Restructure OptionsCache backend selection so MRI and JRuby execute the same physical require_relative line, restoring JRuby's line coverage threshold to 100%.
  • Unify LOADED_ADAPTER_DETECTORS and REQUIREMENT_MAP in AdapterSelector into a single ADAPTERS source-of-truth.
  • Replace the per-adapter loaded lambdas in AdapterSelector::ADAPTERS with constant name strings walked through Object.const_defined? directly.
  • Extract deprecated public API into lib/multi_json/deprecated.rb.
  • Improve AdapterSelector#load_adapter's error message for unrecognized adapter specs.
  • Move Oj#load's :symbolize_keys translation into a private translate_load_options helper.
  • Drop the ALIASES constant in AdapterSelector in favor of an inline jrjacksonjr_jackson check.
  • Drop the UnannotatedEmptyCollection Steep diagnostic override.

Fixed

... (truncated)

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code labels Apr 27, 2026
@dependabot dependabot Bot force-pushed the dependabot/bundler/multi_json-1.20.1 branch from 81f28ff to 43c268d Compare April 27, 2026 21:21
Bumps [multi_json](https://github.com/sferik/multi_json) from 1.19.1 to 1.20.1.
- [Changelog](https://github.com/sferik/multi_json/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sferik/multi_json/commits)

---
updated-dependencies:
- dependency-name: multi_json
  dependency-version: 1.20.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/bundler/multi_json-1.20.1 branch from 43c268d to f0ba5c4 Compare April 28, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants