proscenium 0.22.5-arm64-darwin → 0.22.7-arm64-darwin

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 549db10dfc51b34ac7498de9002d1cab53ef398c44324481655e876bcd2b477a
4
- data.tar.gz: ecc0000b8ae324c997727667397460fc8907d6a2c9e3ae06dbfe5f18cffe13fb
3
+ metadata.gz: 9cec410b451caac328262c75d5a4817994329078bd8cfe7221d07a6e08854e0b
4
+ data.tar.gz: 41591564a8caf2c996422ce9c6056c1e1fb99d9214ca40eeaec2dfa1f4f363fc
5
5
  SHA512:
6
- metadata.gz: d18627e2f839e1b48c377b60217b8cb837179f41ea7dda7217f12e7a007ccd229fc9fdddaf7ee7c471eea7f454b38f16264e2ef0f3232483ea52d5bb2c336a52
7
- data.tar.gz: f4e0191ef770a739de15ae05921d816f09b218e7ff2e1e0c16c2bb496712cbfd7f357c525af0cbdd69454d69c42b60dc2262a3b210ddeb01d8a81188e0638692
6
+ metadata.gz: cfc00e4c5f8dd0fe52e4703826f940b5f0401998c74cb2fa99e702f25a3c56db27e506b0a049f6293c00d4b98c4e81fa415529d4aa8fe3a79b7779cad0e6eeee
7
+ data.tar.gz: 3d9999e0febcef981e010ca5a1d86e0255d750451256d56ff2baceb305161a49e5615682a31cf13335da0cbec01aeb13ed076f2f7acae820a3d7c75ddf611af3
@@ -58,7 +58,7 @@ module Proscenium
58
58
 
59
59
  # The absolute URL path to the javascript component.
60
60
  def virtual_path
61
- @virtual_path ||= Resolver.resolve(self.class.source_path.sub_ext('.jsx').to_s)[0]
61
+ @virtual_path ||= Array(Resolver.resolve(self.class.source_path.sub_ext('.jsx').to_s))[0]
62
62
  end
63
63
 
64
64
  def props
@@ -1,38 +1,35 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/current_attributes'
4
-
5
3
  module Proscenium
6
- class Resolver < ActiveSupport::CurrentAttributes
7
- attribute :resolved unless Rails.env.production?
8
- mattr_accessor :resolved if Rails.env.production?
4
+ class Resolver
5
+ mattr_accessor :resolved, instance_accessor: false, default: {}
9
6
 
10
7
  # Resolve the given `path` to a fully qualified URL path.
11
8
  #
12
- # TODO: cache this across requests in production.
13
- #
14
9
  # @param path [String] URL path, file system path, or bare specifier (ie. NPM package).
15
10
  # @param as_array [Boolean] whether or not to return the manifest path, non-manifest path, and
16
11
  # absolute file system path as an array. Only returns the resolved path if false (default).
17
12
  # @return [String, Array<String>]
18
13
  def self.resolve(path, as_array: false)
19
- self.resolved ||= {}
20
-
21
14
  if path.start_with?('./', '../')
22
15
  raise ArgumentError, '`path` must be an absolute file system or URL path'
23
16
  end
24
17
 
25
- self.resolved[path] ||= if (gem = BundledGems.paths.find { |_, v| path.start_with? "#{v}/" })
26
- vpath = path.sub(/^#{gem.last}/, "@rubygems/#{gem.first}")
27
- [Proscenium::Manifest[vpath], "/node_modules/#{vpath}", path]
28
- elsif path.start_with?("#{Rails.root}/")
29
- vpath = path.delete_prefix(Rails.root.to_s)
30
- [Proscenium::Manifest[vpath], vpath, path]
31
- else
32
- [Proscenium::Manifest[path], *Builder.resolve(path)]
33
- end
18
+ resolved[path] ||= if (gem = BundledGems.paths.find { |_, v| path.start_with? "#{v}/" })
19
+ vpath = path.sub(/^#{gem.last}/, "@rubygems/#{gem.first}")
20
+ [Proscenium::Manifest[vpath], "/node_modules/#{vpath}", path]
21
+ elsif path.start_with?("#{Rails.root}/")
22
+ vpath = path.delete_prefix(Rails.root.to_s)
23
+ [Proscenium::Manifest[vpath], vpath, path]
24
+ else
25
+ [Proscenium::Manifest[path], *Builder.resolve(path)]
26
+ end
27
+
28
+ as_array ? resolved[path] : resolved[path][0] || resolved[path][1]
29
+ end
34
30
 
35
- as_array ? self.resolved[path] : self.resolved[path][0] || self.resolved[path][1]
31
+ def self.reset
32
+ self.resolved = {}
36
33
  end
37
34
  end
38
35
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.22.5'
4
+ VERSION = '0.22.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.5
4
+ version: 0.22.7
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-30 00:00:00.000000000 Z
11
+ date: 2026-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi