@wise/wds-codemods 1.0.0-experimental-0576f11 → 1.0.0-experimental-96ec24b

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.
@@ -1451,7 +1451,6 @@ var require_semver = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7
1451
1451
 
1452
1452
  //#endregion
1453
1453
  //#region src/controller/helpers/getCodemodConfig.ts
1454
- /** Retrieves a JSON object from a file path, returning null if the file does not exist */
1455
1454
  const getJsonFromPath = (baseDir, fileName) => {
1456
1455
  const jsonPath = (0, node_path.join)(baseDir, fileName);
1457
1456
  try {
@@ -1613,12 +1612,10 @@ const assessPrerequisites = (packagePath, codemodPath) => {
1613
1612
  return false;
1614
1613
  }
1615
1614
  if (actualPackagePath !== resolvedPackagePath) console.info(`Using package.json from ${actualPackagePath} for dependency checks`);
1616
- const packageJson = getJsonFromPath(actualPackagePath, "package.json");
1617
- if (!packageJson) return false;
1618
- const { dependencies = {}, peerDependencies = {} } = packageJson;
1615
+ const { dependencies = {}, peerDependencies = {} } = getJsonFromPath(actualPackagePath, "package.json");
1619
1616
  const comparisons = {};
1620
1617
  let isCompliant = true;
1621
- if (codemodConfig?.prerequisites) Object.entries(codemodConfig.prerequisites).forEach(([name, versionRequirement]) => {
1618
+ if (codemodConfig.prerequisites) Object.entries(codemodConfig.prerequisites).forEach(([name, versionRequirement]) => {
1622
1619
  const nodeModulesVersion = getVersionFromNodeModules(actualPackagePath, name);
1623
1620
  const isDependencySatisfied = isVersionSatisfied(dependencies[name], versionRequirement);
1624
1621
  const isPeerDependencySatisfied = isVersionSatisfied(peerDependencies[name], versionRequirement);
@@ -2002,4 +1999,4 @@ Object.defineProperty(exports, 'runTransformPrompts', {
2002
1999
  return runTransformPrompts;
2003
2000
  }
2004
2001
  });
2005
- //# sourceMappingURL=helpers-RWhTD5Is.js.map
2002
+ //# sourceMappingURL=helpers-CghwwYSg.js.map