nulladrift 0.7.0 → 0.7.1

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/index.js CHANGED
@@ -758,8 +758,9 @@ function collectFacts(schema) {
758
758
  const properties = asObject(object["properties"]);
759
759
  if (properties) {
760
760
  const requiredList = Array.isArray(object["required"]) ? object["required"].filter((entry) => typeof entry === "string") : [];
761
+ const requiredSet = new Set(requiredList);
761
762
  for (const [name, child] of Object.entries(properties)) {
762
- visit(child, path === "" ? name : `${path}.${name}`, requiredList.includes(name), depth + 1);
763
+ visit(child, path === "" ? name : `${path}.${name}`, requiredSet.has(name), depth + 1);
763
764
  }
764
765
  }
765
766
  const items = object["items"];
@@ -772,7 +773,8 @@ function collectFacts(schema) {
772
773
  return facts;
773
774
  }
774
775
  function isSuperset(next, previous) {
775
- return previous.every((entry) => next.includes(entry));
776
+ const members = new Set(next);
777
+ return previous.every((entry) => members.has(entry));
776
778
  }
777
779
  function classifySchemaChange(before, after) {
778
780
  if (stableKey(before) === stableKey(after)) return "same";
@@ -1846,7 +1848,7 @@ import { readFile as readFile3 } from "fs/promises";
1846
1848
  import { isAbsolute as isAbsolute2, resolve as resolve3 } from "path";
1847
1849
 
1848
1850
  // src/lib/version.ts
1849
- var VERSION = "0.7.0";
1851
+ var VERSION = "0.7.1";
1850
1852
  var USER_AGENT = `nulladrift/${VERSION} (+https://github.com/Nulladrift/nulladrift)`;
1851
1853
 
1852
1854
  // src/lock/provenance.ts