create-caspian-app 1.0.16 → 1.0.17

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.
@@ -101,12 +101,27 @@ class TestDeferComponentRoots:
101
101
  assert "<template" in out
102
102
  assert 'pp-component="abc"' in out
103
103
 
104
- def test_finalize_html_defers_and_tags_scripts(self):
104
+ def test_brace_entities_are_double_encoded_inside_deferred_templates(self):
105
+ html = (
106
+ '<body><div pp-component="abc" '
107
+ 'title="&#123;attr&#125;" '
108
+ 'class="probe &#x7b;active&#x7d;">'
109
+ '&lbrace;text&rbrace;'
110
+ '</div><p>&#123;outside&#125;</p></body>'
111
+ )
112
+
113
+ out = main.defer_component_roots(html)
114
+
115
+ assert 'title="&amp;#123;attr&amp;#125;"' in out
116
+ assert 'class="probe &amp;#x7b;active&amp;#x7d;"' in out
117
+ assert "&amp;lbrace;text&amp;rbrace;" in out
118
+ assert "<p>&#123;outside&#125;</p>" in out
119
+
120
+ def test_finalize_html_defers_and_preserves_plain_scripts(self):
105
121
  html = (
106
122
  "<body><div pp-component=\"abc\">"
107
123
  "<script>console.log(1)</script></div></body>"
108
124
  )
109
125
  out = main.finalize_html(html)
110
- # transform_scripts retags author scripts before deferral.
111
- assert 'type="text/pp"' in out
126
+ assert "<script>console.log(1)</script>" in out
112
127
  assert "<template" in out
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-caspian-app",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Scaffold a new Caspian project (FastAPI-powered reactive Python framework).",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",