zova-cli-set-front 1.2.114 → 1.2.116
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/index.js +18 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -214,7 +214,7 @@ const dependencySections = ['dependencies', 'devDependencies', 'optionalDependen
|
|
|
214
214
|
async function extractRestDependencyVersions(projectPath, deps, moduleRoots = []) {
|
|
215
215
|
const lockfilePath = path.join(projectPath, 'pnpm-lock.yaml');
|
|
216
216
|
const lockfileContent = await fse.readFile(lockfilePath, 'utf8');
|
|
217
|
-
const parsedLockfile =
|
|
217
|
+
const parsedLockfile = parseWorkspaceLockfile(lockfileContent);
|
|
218
218
|
const depsVersion = {};
|
|
219
219
|
for (const dep of deps) {
|
|
220
220
|
const rootRange = getPackageDependencyRangeFromLock(parsedLockfile, dep);
|
|
@@ -240,6 +240,23 @@ async function extractRestDependencyVersions(projectPath, deps, moduleRoots = []
|
|
|
240
240
|
}
|
|
241
241
|
return depsVersion;
|
|
242
242
|
}
|
|
243
|
+
function parseWorkspaceLockfile(content) {
|
|
244
|
+
const documents = yaml.parseAllDocuments(content);
|
|
245
|
+
for (const document of documents) {
|
|
246
|
+
if (document.errors.length) throw document.errors[0];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// pnpm 12 places the workspace lock after its package-manager/config dependency lock.
|
|
250
|
+
const document = documents.findLast(({
|
|
251
|
+
contents
|
|
252
|
+
}) => {
|
|
253
|
+
return contents !== null && !(yaml.isScalar(contents) && contents.value === null && contents.source === '');
|
|
254
|
+
});
|
|
255
|
+
if (!document || !yaml.isMap(document.contents) || !yaml.isMap(document.get('importers', true))) {
|
|
256
|
+
throw new Error('Invalid pnpm-lock.yaml: expected a workspace document with an importers mapping.');
|
|
257
|
+
}
|
|
258
|
+
return document.toJS();
|
|
259
|
+
}
|
|
243
260
|
function getPackageDependencyRangeFromLock(parsedLockfile, packageName) {
|
|
244
261
|
const importer = parsedLockfile.importers?.['.'];
|
|
245
262
|
return getImporterDependencyRange(importer, packageName);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-cli-set-front",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "1.2.116",
|
|
4
|
+
"gitHead": "c703cb481fdf9d50a4f3eb3971e7b7c20a79619d",
|
|
5
5
|
"description": "zova cli-set-front",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"framework",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
37
37
|
"@babel/plugin-transform-class-properties": "^7.28.6",
|
|
38
38
|
"@babel/plugin-transform-typescript": "^7.28.6",
|
|
39
|
-
"@cabloy/cli": "^3.1.
|
|
39
|
+
"@cabloy/cli": "^3.1.30",
|
|
40
40
|
"@cabloy/extend": "^3.2.8",
|
|
41
41
|
"@cabloy/module-info": "^2.0.3",
|
|
42
42
|
"@cabloy/openapi-typescript": "^7.9.2",
|