ventojs 0.12.4 → 0.12.5

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <h1>
2
- <img align="left" width="40" src="https://raw.githubusercontent.com/ventojs/vento/main/docs/icon.svg"></img>
2
+ <img align="left" width="40" src="https://raw.githubusercontent.com/ventojs/vento/main/docs/favicon.svg"></img>
3
3
  Vento
4
4
  </h1>
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../src/src/transformer.ts"],"names":[],"mappings":"AAkHA,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,MAAM,CA4HR"}
1
+ {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../src/src/transformer.ts"],"names":[],"mappings":"AAkHA,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,MAAM,CAiIR"}
@@ -179,7 +179,10 @@ export function transformTemplateCode(code, templateState) {
179
179
  case "Identifier":
180
180
  // Don't transform identifiers that aren't at the start of a MemberExpression
181
181
  // ie. don't transform `bar` or `baz` in `foo.bar.baz`
182
- if (parent?.type === "MemberExpression" && parent.property === node) {
182
+ // MemberExpression nodes can also take on a computed property
183
+ // which means it is an array-like access, so we do transform those.
184
+ if (parent?.type === "MemberExpression" && parent.property === node &&
185
+ parent.computed === false) {
183
186
  return;
184
187
  }
185
188
  // Don't transform identifiers that are keys in an object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ventojs",
3
- "version": "0.12.4",
3
+ "version": "0.12.5",
4
4
  "description": "🌬 A minimal but powerful template engine",
5
5
  "homepage": "https://vento.js.org/",
6
6
  "repository": "github:oscarotero/vento",