@stll/agent-input 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -2
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1837,7 +1837,7 @@ const childSchemasOf = (schema, key) => {
1837
1837
  const properties = schema["properties"];
1838
1838
  const patternProperties = schema["patternProperties"];
1839
1839
  const childSchemas = [];
1840
- if (isRecord(properties) && key in properties) childSchemas.push(properties[key]);
1840
+ if (isRecord(properties) && Object.hasOwn(properties, key)) childSchemas.push(properties[key]);
1841
1841
  if (isRecord(patternProperties)) {
1842
1842
  for (const [pattern, childSchema] of Object.entries(patternProperties)) if (new RegExp(pattern, "u").test(key)) childSchemas.push(childSchema);
1843
1843
  }
@@ -1880,7 +1880,12 @@ const walkObject = ({ schema, value, path, context }) => {
1880
1880
  notes.push(...child.notes);
1881
1881
  }
1882
1882
  }
1883
- if (reading.status === "value") output[key] = reading.value;
1883
+ if (reading.status === "value") Object.defineProperty(output, key, {
1884
+ value: reading.value,
1885
+ enumerable: true,
1886
+ configurable: true,
1887
+ writable: true
1888
+ });
1884
1889
  }
1885
1890
  return issues.length > 0 ? {
1886
1891
  status: "invalid",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/agent-input",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Lenient readers for values agents write: dates, date bounds, date-format specs, numbers, booleans, locales, countries, enum and vocabulary values, ids, ELIs, string lists",
5
5
  "keywords": [
6
6
  "agent",
@@ -41,7 +41,7 @@
41
41
  "build": "tsdown",
42
42
  "pack:dry-run": "bun pm pack --dry-run",
43
43
  "test": "bun test src",
44
- "test:property": "bun test --preload @stll/property-testing/preload $(grep -rlF 'fc.assert' src --include='*.test.ts')",
44
+ "test:property": "bun test --preload @stll/property-testing/preload $(grep -rlE 'fc\\.assert|assertProperty' src --include='*.test.ts')",
45
45
  "typecheck": "bun ../../packages/scripts/src/tsc-native.ts --noEmit",
46
46
  "lint": "cd ../.. && bun --bun oxlint -c oxlint.config.ts --report-unused-disable-directives-severity=error --type-aware --type-check packages/agent-input",
47
47
  "lint:fix": "cd ../.. && bun --bun oxlint -c oxlint.config.ts --type-aware --fix packages/agent-input",
@@ -50,9 +50,9 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@stll/country-codes": "^0.2.0",
53
- "@stll/template-conditions": "^0.6.2",
53
+ "@stll/template-conditions": "^0.6.3",
54
54
  "@stll/text-normalize": "^0.1.1",
55
- "@stll/time": "^0.1.0",
55
+ "@stll/time": "^0.2.0",
56
56
  "better-result": "3.0.1"
57
57
  },
58
58
  "devDependencies": {