versionary 1.7.0 → 1.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.
@@ -200,15 +200,16 @@ function packageNameFromParsed(parsed) {
200
200
  function normalizeModuleName(name) {
201
201
  return name.replace(/[-.]+/gu, "_");
202
202
  }
203
- function findAuxiliaryInitPy(cwd, parsed) {
203
+ function findAuxiliaryInitPy(cwd, parsed, versionFile) {
204
204
  const packageName = packageNameFromParsed(parsed);
205
205
  if (!packageName) {
206
206
  return null;
207
207
  }
208
208
  const moduleName = normalizeModuleName(packageName);
209
+ const packageDirectory = path.dirname(versionFile);
209
210
  const candidates = [
210
- path.join("src", moduleName, "__init__.py"),
211
- path.join(moduleName, "__init__.py"),
211
+ path.join(packageDirectory, "src", moduleName, "__init__.py"),
212
+ path.join(packageDirectory, moduleName, "__init__.py"),
212
213
  ];
213
214
  for (const candidate of candidates) {
214
215
  const absolute = path.join(cwd, candidate);
@@ -305,7 +306,7 @@ export const pythonVersionStrategy = {
305
306
  fs.writeFileSync(versionPath, updated, "utf8");
306
307
  written.push(versionFile);
307
308
  const parsed = parsePyProject(updated, versionFile);
308
- const initPy = findAuxiliaryInitPy(cwd, parsed);
309
+ const initPy = findAuxiliaryInitPy(cwd, parsed, versionFile);
309
310
  if (initPy && tryUpdateInitPyVersion(cwd, initPy, version)) {
310
311
  written.push(initPy);
311
312
  }
@@ -124,14 +124,15 @@ function ensureCargoLockUpToDate(cwd) {
124
124
  const lockfilePath = path.join(cwd, lockfile);
125
125
  const before = fs.readFileSync(lockfilePath, "utf8");
126
126
  try {
127
- execFileSync("cargo", ["generate-lockfile"], {
127
+ // Preserve locked external dependencies while updating local package versions.
128
+ execFileSync("cargo", ["update", "--workspace"], {
128
129
  cwd: path.dirname(lockfilePath),
129
130
  stdio: ["ignore", "pipe", "pipe"],
130
131
  });
131
132
  }
132
133
  catch (error) {
133
134
  const message = error instanceof Error ? error.message : String(error);
134
- throw new Error(`Failed to refresh ${lockfile} via "cargo generate-lockfile". Ensure cargo is installed and available in PATH. Details: ${message}`);
135
+ throw new Error(`Failed to refresh ${lockfile} via "cargo update --workspace". Ensure cargo is installed and available in PATH. Details: ${message}`);
135
136
  }
136
137
  const after = fs.readFileSync(lockfilePath, "utf8");
137
138
  if (after !== before) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "versionary",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Automatic release framework based on conventional commits and semantic versioning",
5
5
  "keywords": [
6
6
  "releasing",