@barefootjs/mojolicious 0.17.1 → 0.18.0
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.
- package/dist/adapter/expr/array-method.d.ts +3 -1
- package/dist/adapter/expr/array-method.d.ts.map +1 -1
- package/dist/adapter/expr/emitters.d.ts +7 -3
- package/dist/adapter/expr/emitters.d.ts.map +1 -1
- package/dist/adapter/index.js +56 -13
- package/dist/adapter/mojo-adapter.d.ts.map +1 -1
- package/dist/build.js +56 -13
- package/dist/conformance-pins.d.ts +10 -0
- package/dist/conformance-pins.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -13
- package/dist/test-render.d.ts.map +1 -1
- package/lib/BarefootJS/Backend/Mojo.pm +14 -5
- package/lib/Mojolicious/Plugin/BarefootJS/DevReload.pm +1 -1
- package/lib/Mojolicious/Plugin/BarefootJS.pm +55 -33
- package/package.json +3 -3
- package/src/__tests__/mojo-adapter.test.ts +28 -136
- package/src/__tests__/multi-component-registry.test.ts +215 -0
- package/src/__tests__/stock-route.test.ts +203 -0
- package/src/adapter/expr/array-method.ts +22 -1
- package/src/adapter/expr/emitters.ts +23 -11
- package/src/adapter/mojo-adapter.ts +128 -24
- package/src/conformance-pins.ts +138 -0
- package/src/index.ts +1 -0
- package/src/test-render.ts +8 -0
package/src/index.ts
CHANGED
package/src/test-render.ts
CHANGED
|
@@ -213,6 +213,14 @@ export async function renderMojoComponent(options: RenderOptions): Promise<strin
|
|
|
213
213
|
await Bun.write(resolve(tempDir, `${toSnakeCase(childName)}.html.ep`), patchTemplate(template))
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
// Surface every `props.<x>` access as a propsParam before building
|
|
217
|
+
// the top-level stash (idempotent; the same shared pass the adapter's
|
|
218
|
+
// `generate` applies to its own IR instance — this round-tripped IR
|
|
219
|
+
// hasn't been augmented). Without it, a read reachable only through a
|
|
220
|
+
// dynamic text child / condition / loop array (#2126 follow-up) has
|
|
221
|
+
// no param entry, `buildPerlProps` seeds nothing, and the template's
|
|
222
|
+
// bare `$var` aborts under Mojo::Template's strict vars.
|
|
223
|
+
augmentInheritedPropAccesses(ir)
|
|
216
224
|
// Build props hash for Perl
|
|
217
225
|
const propsPerl = buildPerlProps(componentName, props, ir)
|
|
218
226
|
|