@wise/wds-codemods 1.0.0-experimental-88f6022 → 1.0.0-experimental-ca46d81
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/{helpers-RWhTD5Is.js → helpers-CghwwYSg.js} +3 -6
- package/dist/{helpers-RWhTD5Is.js.map → helpers-CghwwYSg.js.map} +1 -1
- package/dist/index.js +29 -24
- package/dist/index.js.map +1 -1
- package/dist/transforms/button/transformer.js +1 -1
- package/package.json +2 -4
- package/dist/transformer-BxHkGbvJ.js +0 -344
- package/dist/transformer-BxHkGbvJ.js.map +0 -1
- package/dist/transforms/list-item/config.json +0 -6
- package/dist/transforms/list-item/transformer.js +0 -4
|
@@ -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
|
|
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
|
|
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-
|
|
2002
|
+
//# sourceMappingURL=helpers-CghwwYSg.js.map
|