isomorfeus-preact 22.11.0.rc1 → 23.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62b4e6bc05265ca02d586b44bcd579ee5a75cb5bd31f54125a897d8e398fa88c
4
- data.tar.gz: 3929ae5d2004b3ee4988aeb95a8e419fbd812141f32b03fa73204071af044cd0
3
+ metadata.gz: 0f83a13f88eeee74e8abab06a1c4151de340aae29271528f09b4692169b33cf3
4
+ data.tar.gz: e6ac1ba566815c834dcc3f135c172bfc389647f9e6caea94241197f566aa054a
5
5
  SHA512:
6
- metadata.gz: fa6aeda0ef1e2392c6259ba8e176205013a832909051ad20f6440c8d4645d3479c547f99baf326ce0608005cbf6c9b86720cc934bca3e2a8a015c23b1b28dee3
7
- data.tar.gz: 569e16a8edd6e60826f47b7aeaff7afec87548aee6a61382307f3fc81b36223cc5c2953b430e4ce8391c25b154e1a94691f2e49e3dccf15ca6928d56912d44fb
6
+ metadata.gz: 042c97f715bc2b9464443cc8a2eda65cd19c42085f5bfe729044da89dd2076a6c28c794e1a588ad6b03a87980c5585e7ffe66ad772a138d116d77b8de48753d2
7
+ data.tar.gz: bacb71f23379bd617dd9381bcae3028360fdff64f9032108d247fb47e167bcee7b4f595fb934cd269f63bf3613ad5fcfa2d3b0cd7c70a52a7b5b2b7a74e9eb78
@@ -20,6 +20,7 @@ static ID id_downcase;
20
20
  static ID id_encode_entities;
21
21
  static ID id_eqeq;
22
22
  static ID id_for;
23
+ static ID id_freeze;
23
24
  static ID id_get_child_context;
24
25
  static ID id_get_derived_state_from_props;
25
26
  static ID id_gsub;
@@ -155,6 +156,7 @@ VALUE render_class_component(VALUE vnode, VALUE context) {
155
156
 
156
157
  VALUE node_type = v->type;
157
158
  VALUE props = v->props;
159
+ VALUE state = rb_hash_new();
158
160
 
159
161
  // get context
160
162
  VALUE cctx = get_context(node_type, context);
@@ -166,13 +168,16 @@ VALUE render_class_component(VALUE vnode, VALUE context) {
166
168
  if (rb_funcall(mIsomorfeus, id_development, 0) == Qtrue) { rb_funcall(node_type, id_validate_props, 1, props); }
167
169
  }
168
170
 
171
+ // freeze props
172
+ rb_funcall(props, id_freeze, 0);
173
+
169
174
  // instantiate component
170
175
  VALUE c = rb_funcall(node_type, id_new, 2, props, cctx);
171
176
  v->component = c;
172
177
 
173
178
  // set state, props, context
174
179
  rb_ivar_set(c, iv_props, props);
175
- if (rb_funcall(c, id_state, 0) == Qnil) { rb_ivar_set(c, iv_state, rb_hash_new()); }
180
+ if (rb_funcall(c, id_state, 0) == Qnil) { rb_ivar_set(c, iv_state, state); }
176
181
  if (rb_ivar_get(c, iv_next_state) == Qnil) { rb_ivar_set(c, iv_next_state, rb_funcall(c, id_state, 0)); }
177
182
  rb_ivar_set(c, iv_context, cctx);
178
183
 
@@ -183,6 +188,9 @@ VALUE render_class_component(VALUE vnode, VALUE context) {
183
188
  rb_ivar_set(c, iv_state, rb_funcall(state, id_merge, res));
184
189
  }
185
190
 
191
+ // freeze state
192
+ rb_funcall(rb_funcall(c, id_state, 0), id_freeze, 0);
193
+
186
194
  // render
187
195
  return rb_funcall(c, id_render, 0);
188
196
  }
@@ -460,6 +468,7 @@ void Init_Preact(void) {
460
468
  id_gsub = rb_intern("gsub");
461
469
  id_html_for = rb_intern("html_for");
462
470
  id_for = rb_intern("for");
471
+ id_freeze = rb_intern("freeze");
463
472
  id_include = rb_intern("include?");
464
473
  id_is_a = rb_intern("is_a?");
465
474
  id_is_renderable = rb_intern("is_renderable?");
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Preact
3
- VERSION = '22.11.0.rc1'
3
+ VERSION = '23.1.0.rc2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.11.0.rc1
4
+ version: 23.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-25 00:00:00.000000000 Z
11
+ date: 2023-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.6.0
33
+ version: 1.7.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.6.0
40
+ version: 1.7.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opal-activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,56 +58,56 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.15.10
61
+ version: 0.16.2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.15.10
68
+ version: 0.16.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: isomorfeus-i18n
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 22.11.0.rc1
75
+ version: 23.1.0.rc2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 22.11.0.rc1
82
+ version: 23.1.0.rc2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: isomorfeus-redux
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 22.11.0.rc1
89
+ version: 23.1.0.rc2
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 22.11.0.rc1
96
+ version: 23.1.0.rc2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: isomorfeus-puppetmaster
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.8.2
103
+ version: 0.8.4
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.8.2
110
+ version: 0.8.4
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  - !ruby/object:Gem::Version
232
232
  version: 1.3.1
233
233
  requirements: []
234
- rubygems_version: 3.4.0.dev
234
+ rubygems_version: 3.4.1
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: Preact Components for Isomorfeus.