@weborigami/language 0.6.8 → 0.6.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weborigami/language",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "Web Origami expression language compiler and runtime",
5
5
  "type": "module",
6
6
  "main": "./main.js",
@@ -11,7 +11,7 @@
11
11
  "typescript": "5.9.3"
12
12
  },
13
13
  "dependencies": {
14
- "@weborigami/async-tree": "0.6.8",
14
+ "@weborigami/async-tree": "0.6.9",
15
15
  "exif-parser": "0.1.12",
16
16
  "watcher": "2.3.1",
17
17
  "yaml": "2.8.1"
@@ -215,11 +215,13 @@ export function propertyInfo(key, value) {
215
215
  }
216
216
  }
217
217
 
218
- // Special case: a key with an extension has to be a getter
219
218
  const hasExtension =
220
219
  typeof key === "string" && extension.extname(key).length > 0;
221
- if (hasExtension) {
222
- valueType = VALUE_TYPE.GETTER;
220
+
221
+ // Special case: if the key has an extension but the value is a primitive,
222
+ // treat it as eager so we can handle the extension.
223
+ if (hasExtension && valueType === VALUE_TYPE.PRIMITIVE) {
224
+ valueType = VALUE_TYPE.EAGER;
223
225
  }
224
226
 
225
227
  return { enumerable, hasExtension, key, keyType, value, valueType };
@@ -75,7 +75,7 @@ describe("expressionObject", () => {
75
75
  });
76
76
  });
77
77
 
78
- test("returned object values can be unpacked", async () => {
78
+ test.only("returned object values can be unpacked", async () => {
79
79
  const entries = [["data.json", `{ "a": 1 }`]];
80
80
  const context = new SyncMap();
81
81
  const result = await expressionObject(entries, { object: context });