proscenium 0.22.2-aarch64-linux → 0.22.3-aarch64-linux

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: 80674235b91e1592c6090faa96087a6955c626112dfd9934bb81dad1c87bff8c
4
- data.tar.gz: c3504f8e728b439447ee52dd352af2607e4f74dee745572b5a2a8865765a0223
3
+ metadata.gz: d069c30f6506ea081758b58b649f60bd3496063c7f890482e3a00be0216248f5
4
+ data.tar.gz: b07b39e1606eaea28d642f558993ebefe49a05900c2568938e6474eb0a3040b0
5
5
  SHA512:
6
- metadata.gz: 67242a4b8fd5bf4e942f36547c18dbd5283e76640f61ac3b92fe2f07f500a9cc9ef5a0385728f0fd42087d94a3466af2efd0e7f0363b2c0d475fc04bb02683a7
7
- data.tar.gz: ac26fdb8b6ecb1af969c3df439d0703b3bdb8b23ebd8af6618f8b3b641b1d007ea614ac615e12018cc54eb656c220a432a9ea26342a560925847a07ef496df38
6
+ metadata.gz: 2b1155036f7bbdf75a711e96a2425cd43f08469eac597e0b1df5cca14da62ca4a4bc1b5d2108cb98e59b697a2203e92b162bd5cb1d6c6307d24fac25cbb052b7
7
+ data.tar.gz: f5625b44c8f90172a12fc476db484223b1c8d1dce56febf520796a3370d9f1b3a02f05574bb348fc37db74899313d8c26229b8b161697fc45aa014b79a031408
@@ -66,11 +66,15 @@ module Proscenium
66
66
  raise Proscenium::CssModule::TransformError.new(original_name, 'CSS module path not given')
67
67
  end
68
68
 
69
- resolved_path = Resolver.resolve(path.to_s)
70
- digest = Importer.import(resolved_path)
69
+ manifest_path, non_manifest_path = Resolver.resolve(path.to_s, as_array: true)
70
+ digest = Importer.import(manifest_path || non_manifest_path, digest: lambda {
71
+ Utils.digest non_manifest_path
72
+ })
71
73
 
72
74
  transformed_path = ''
73
- transformed_path = "__#{resolved_path[1..].gsub(%r{[@/.+]}, '-')}" if Rails.env.development?
75
+ if Rails.env.development?
76
+ transformed_path = "__#{non_manifest_path[1..].gsub(%r{[@/.+]}, '-')}"
77
+ end
74
78
  transformed_name = name.to_s
75
79
  transformed_name = if transformed_name.start_with?('_')
76
80
  "_#{transformed_name[1..]}-#{digest}#{transformed_path}"
@@ -78,7 +82,7 @@ module Proscenium
78
82
  "#{transformed_name}-#{digest}#{transformed_path}"
79
83
  end
80
84
 
81
- [transformed_name, resolved_path]
85
+ [transformed_name, non_manifest_path]
82
86
  end
83
87
  end
84
88
  end
Binary file
@@ -12,6 +12,8 @@
12
12
 
13
13
  #ifndef GO_CGO_GOSTRING_TYPEDEF
14
14
  typedef struct { const char *p; ptrdiff_t n; } _GoString_;
15
+ extern size_t _GoStringLen(_GoString_ s);
16
+ extern const char *_GoStringPtr(_GoString_ s);
15
17
  #endif
16
18
 
17
19
  #endif
@@ -57,10 +59,16 @@ typedef size_t GoUintptr;
57
59
  typedef float GoFloat32;
58
60
  typedef double GoFloat64;
59
61
  #ifdef _MSC_VER
62
+ #if !defined(__cplusplus) || _MSVC_LANG <= 201402L
60
63
  #include <complex.h>
61
64
  typedef _Fcomplex GoComplex64;
62
65
  typedef _Dcomplex GoComplex128;
63
66
  #else
67
+ #include <complex>
68
+ typedef std::complex<float> GoComplex64;
69
+ typedef std::complex<double> GoComplex128;
70
+ #endif
71
+ #else
64
72
  typedef float _Complex GoComplex64;
65
73
  typedef double _Complex GoComplex128;
66
74
  #endif
@@ -87,7 +95,7 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
87
95
  extern "C" {
88
96
  #endif
89
97
 
90
- extern void reset_config();
98
+ extern void reset_config(void);
91
99
 
92
100
  // Build the given `path` using the `config`.
93
101
  //
@@ -28,18 +28,26 @@ module Proscenium
28
28
  self.imported ||= {}
29
29
 
30
30
  filepath = "/node_modules/#{filepath}" if filepath.start_with?('@rubygems/')
31
- css_module = filepath.end_with?('.module.css')
31
+ css_module = filepath.match?(/\.module(-\$[a-z0-9]+\$)?\.css$/i)
32
32
 
33
33
  unless self.imported.key?(filepath)
34
34
  if sideloaded
35
35
  ActiveSupport::Notifications.instrument 'sideload.proscenium', identifier: filepath,
36
36
  sideloaded: do
37
37
  self.imported[filepath] = { ** }
38
- self.imported[filepath][:digest] = Utils.digest(filepath) if css_module
38
+ self.imported[filepath][:digest] ||= Utils.digest(filepath) if css_module
39
+
40
+ if self.imported[filepath][:digest].is_a?(Proc)
41
+ self.imported[filepath][:digest] = self.imported[filepath][:digest].call
42
+ end
39
43
  end
40
44
  else
41
45
  self.imported[filepath] = { ** }
42
- self.imported[filepath][:digest] = Utils.digest(filepath) if css_module
46
+ self.imported[filepath][:digest] ||= Utils.digest(filepath) if css_module
47
+
48
+ if self.imported[filepath][:digest].is_a?(Proc)
49
+ self.imported[filepath][:digest] = self.imported[filepath][:digest].call
50
+ end
43
51
  end
44
52
  end
45
53
 
@@ -103,9 +111,18 @@ module Proscenium
103
111
  sideloaded = []
104
112
 
105
113
  extensions.find do |x|
106
- if (fp = filepath.sub_ext(x)).exist?
107
- sideloaded << import(Resolver.resolve(fp.to_s), sideloaded: filepath, **options)
108
- end
114
+ next unless (fp = filepath.sub_ext(x)).exist?
115
+
116
+ sideloaded << if extensions.include?('.module.css')
117
+ manifest_path, non_manifest_path = Resolver.resolve(fp.to_s,
118
+ as_array: true)
119
+ import(manifest_path || non_manifest_path,
120
+ sideloaded: filepath,
121
+ digest: -> { Utils.digest non_manifest_path },
122
+ **options)
123
+ else
124
+ import(Resolver.resolve(fp.to_s), sideloaded: filepath, **options)
125
+ end
109
126
  end
110
127
 
111
128
  sideloaded
@@ -10,8 +10,10 @@ module Proscenium
10
10
  # Resolve the given `path` to a fully qualified URL path.
11
11
  #
12
12
  # @param path [String] URL path, file system path, or bare specifier (ie. NPM package).
13
+ # @param as_array [Boolean] whether or not to return both the manifest path and
14
+ # non-manifest path as an array. Only returns the resolved path if false (default).
13
15
  # @return [String] URL path.
14
- def self.resolve(path)
16
+ def self.resolve(path, as_array: false)
15
17
  self.resolved ||= {}
16
18
 
17
19
  if path.start_with?('./', '../')
@@ -20,13 +22,15 @@ module Proscenium
20
22
 
21
23
  self.resolved[path] ||= if (gem = BundledGems.paths.find { |_, v| path.start_with? "#{v}/" })
22
24
  vpath = path.sub(/^#{gem.last}/, "@rubygems/#{gem.first}")
23
- Proscenium::Manifest[vpath] || "/node_modules/#{vpath}"
25
+ [Proscenium::Manifest[vpath], "/node_modules/#{vpath}"]
24
26
  elsif path.start_with?("#{Rails.root}/")
25
27
  vpath = path.delete_prefix(Rails.root.to_s)
26
- Proscenium::Manifest[vpath] || vpath
28
+ [Proscenium::Manifest[vpath], vpath]
27
29
  else
28
- Proscenium::Manifest[path] || Builder.resolve(path)
30
+ [Proscenium::Manifest[path], Builder.resolve(path)]
29
31
  end
32
+
33
+ as_array ? self.resolved[path] : self.resolved[path][0] || self.resolved[path][1]
30
34
  end
31
35
  end
32
36
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.22.2'
4
+ VERSION = '0.22.3'
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.2
4
+ version: 0.22.3
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-10 00:00:00.000000000 Z
11
+ date: 2025-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi