@blazetrails/activesupport
Core utilities and inflection, mirroring Ruby's ActiveSupport
| Measure | Value |
|---|---|
| Rails counterpart | activesupport v8.0.5.2 |
| API methods matched | 100% (2357 of 2357) |
| Rails tests matched | 99% (2179 of 2199) (31 permanent) |
| Ruby files ported | 230 |
| Ruby files unported | 0 |
| Measured at | fe89b44726 |
Gaps by file
Ported files with Rails methods or tests still missing, largest gap first.
| Ruby file | TypeScript file | Methods missing | Tests matched |
|---|---|---|---|
evented_file_update_checker.rb | evented-file-update-checker.ts | 0 | 3 / 23 (1 permanent) |
Missing methods
None recorded for this package.
Unported Ruby files
Every compared Ruby file has a TypeScript file.
Deviation receipts
JSDoc receipt tags in the package's source, by the receipt each carries.
| Tag | PERMANENT | CONVERGEABLE | none |
|---|---|---|---|
@noRailsEquivalent | 164 | 2 | 0 |
@missingRailsCall | 44 | 1 | 0 |
@missingRailsArgs | 27 | 1 | 0 |
@missingRailsName | 15 | 1 | 0 |
@inventedArm | 32 | 1 | 0 |
@perf | 4 | 0 | 0 |
@inlinedFrom | 0 | 0 | 3 |
@internal | 0 | 0 | 241 |
Permanently skipped tests
A thread-owned lock is owned by the Fiber (ThreadLoadInterlockAwareMonitor) (1)
Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub) (6)
singleton_class is a per-object subclass (rbObjSingletonClass) (1)
No section cited (1)
Core extensions are not installed on native prototypes (config.active_support.bare) (2)
Runtime facts Node does not expose (15)
- deprecated object proxy doesnt wrap falsy objects
- deprecated instance variable proxy doesnt wrap falsy objects
- deprecated constant proxy doesnt wrap falsy objects
- notifies forked processes
- object fork
- object fork without block
- process fork
- process fork without block
- kernel fork
- kernel fork without block
- basic object with kernel fork
- process status
- backwards compat for 64 bytes key
- backwards compatibility decrypt previously encrypted messages without metadata
- shutdown handles dead workers gracefully
A String has no encoding tag either (1)
Ratified deviations
Each rule below is ratified in the repository's CLAUDE.md files. The first paragraph is quoted; the link opens the full section at this build's commit.
Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub)
Ruby's basic_obj_respond_to (vendor/ruby/v3.3.11/vm_method.c:2864-2879) takes a pub flag and hands it to method_boundp (:1788-1818), so respond_to?(:m) and respond_to?(:m, true) can answer differently for the same receiver, and Kernel#public_send (vm_eval.c:1350) raises NoMethodError "private method '…' called for …" where send dispatches. Visibility is a property of the method entry, readable at run time.
A String has no encoding tag either
str.encoding, force_encoding and String#b read or change a per-object encoding. A JS string has none, and trails adds none: the carrier that would hold it is the carrier this section rejects. ruby-compat tags a Uint8Array only. A Rails body that branches on a String's encoding ports the UTF-8 arm, and a test asserting str.encoding is permanently unportable for that assertion.
Runtime facts Node does not expose
Each of these is a Ruby or C-library fact with no Node source. They are ratified here so no port re-derives them.
Core extensions are not installed on native prototypes (config.active_support.bare)
Rails' active_support/railtie.rb requires active_support/all unless config.active_support.bare, which reopens Array, String and the other core classes ([1, 2, 3].sample, "hello".exclude?). trails installs nothing on Array.prototype, String.prototype or any other native prototype: a core extension is a free function the caller imports. So active_support.bare has no observable arm, and a Rails test that asserts a core-ext method is present or absent on a native value (vendor/rails/v8.0.5.2/railties/test/application/initializers/frameworks_test.rb:186-201) is parked as it.skip under a PERMANENT-SKIP: line citing this section.
singleton_class is a per-object subclass (rbObjSingletonClass)
Ruby's obj.singleton_class (vendor/ruby/v3.3.11/object.c:288, class.c:2215) is a class of the object's own. It sits between the object and its class, and obj.class skips it (rb_obj_class, object.c:296). So t2.singleton_class.validates(:title, uniqueness: true) (activerecord/test/cases/validations/uniqueness_validation_test.rb:109) gives only t2 the validator, and t2.class is still Topic.
Class#subclasses is seated on a class's first own write (Callbacks::ClassMethods#set_callbacks)
Rails' DescendantsTracker#descendants (activesupport/lib/active_support/descendants_tracker.rb:107-110) is subclasses.concat(subclasses.flat_map(&:descendants)) over Ruby's native Class#subclasses, so __update_callbacks (activesupport/lib/active_support/callbacks.rb:686-691) reaches every subclass with no registration step. JS keeps no subclass list, and the missing inherited hook (root § "inherited is deferred to own-property memo guards") means nothing can build one at definition time.
packages/activesupport/CLAUDE.md →
Call-time constant resolution (activesupport, actionview, actionpack)
The activesupport inventory for root CLAUDE.md § "Call-time constant resolution", which also covers the actionview and actionpack namespace objects shaped the same way.
packages/activesupport/CLAUDE.md →
active_support/message_pack is loaded by an awaited step at boot (SerializerWithFallback's require)
Rails loads active_support/message_pack in line, from two synchronous methods in each of messages/serializer_with_fallback.rb and cache/serializer_with_fallback.rb: [] requires it when a message_pack format is asked for (:9-15), and available? requires it under silence_warnings and a rescue LoadError (:134-140). Their callers are synchronous constructors and readers: Cache::Store#initialize (cache.rb:304), Messages::Codec#initialize (messages/codec.rb:17) and SerializedCookieJars#serializer (actionpack/lib/action_dispatch/middleware/cookies.rb:582).
packages/activesupport/CLAUDE.md →
A thread-owned lock is owned by the Fiber (ThreadLoadInterlockAwareMonitor)
Rails' ThreadLoadInterlockAwareMonitor records Thread.current as its owner (vendor/rails/v8.0.5.2/activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb:46-63), and its @mutex is owned by the Fiber, as Ruby 3's Mutex is. Ruby runs one flow per Thread, so the Fiber that locks the mutex is the one whose exit unlocks it. JS can start two flows on one Thread, and ExecutionWrapper.wrap runs each on its own Fiber (story executor-wrap-concurrent-flows-on-one-thread). A Thread owner then shares one count between those Fibers, and the last exit unlocks the mutex from a Fiber that does not hold it.
packages/activesupport/CLAUDE.md →
Isolation::Subprocess#run_in_isolation's child
A runtime fact Node does not expose (root § "Runtime facts Node does not expose").
packages/activesupport/CLAUDE.md →
A name ported on two receivers is exported once from the barrel (compact_blank, to_fs, to_xml)
Ruby tells Enumerable#compact_blank and Hash#compact_blank (vendor/rails/v8.0.5.2/activesupport/lib/active_support/core_ext/enumerable.rb:184-186, :222-224) apart by receiver. Each ports as a free function at its Rails name in its own module (enumerable-utils.ts, hash-utils.ts), and one flat ESM namespace cannot hold both. The barrel index.ts exports at most one of them, under its Rails name, and never a suffixed alias (compactBlankObj, toFsArray). A caller wanting the other imports it from its module's subpath (@blazetrails/activesupport/hash-utils, @blazetrails/activesupport/core-ext/array/conversions), registered as § "Call-time constant resolution" and the root vitest.config.ts require.