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.
- package/dist/strategy/python.js +5 -4
- package/dist/strategy/rust.js +3 -2
- package/package.json +1 -1
package/dist/strategy/python.js
CHANGED
|
@@ -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
|
}
|
package/dist/strategy/rust.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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) {
|