@stll/oxlint-config 1.1.0 → 1.2.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.
@@ -276,12 +276,17 @@ const importerDependencies = (value) => {
276
276
  }
277
277
  return result;
278
278
  };
279
+ const BUN_TEXT_LOCKFILE_VERSIONS = /* @__PURE__ */ new Set([
280
+ 0,
281
+ 1,
282
+ 2
283
+ ]);
279
284
  const parseChangedLock = ({ file, text }) => {
280
285
  const resolutions = [];
281
286
  const importers = {};
282
287
  if (file.endsWith("bun.lock")) {
283
288
  const parsed = parseChangedJson(text);
284
- if (!changedRecord(parsed) || ![0, 1].includes(Number(parsed["lockfileVersion"])) || !changedRecord(parsed["packages"]) || !changedRecord(parsed["workspaces"])) throw new Error("Unsupported Bun lockfile shape");
289
+ if (!changedRecord(parsed) || !BUN_TEXT_LOCKFILE_VERSIONS.has(Number(parsed["lockfileVersion"])) || !changedRecord(parsed["packages"]) || !changedRecord(parsed["workspaces"])) throw new Error("Unsupported Bun lockfile shape");
285
290
  for (const [directory, workspace] of Object.entries(parsed["workspaces"])) importers[directory || "."] = importerDependencies(workspace);
286
291
  for (const [location, value] of Object.entries(parsed["packages"])) {
287
292
  const dependency = dependencyName(location);