@preship/core 2.0.1 → 2.0.2
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 +26 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -392,7 +392,11 @@ function detectFramework(packageJsonPath) {
|
|
|
392
392
|
...pkg.devDependencies || {}
|
|
393
393
|
};
|
|
394
394
|
if (allDeps["next"]) return "nextjs";
|
|
395
|
+
if (allDeps["nuxt"]) return "nuxtjs";
|
|
395
396
|
if (allDeps["react"]) return "react";
|
|
397
|
+
if (allDeps["vue"]) return "vue";
|
|
398
|
+
if (allDeps["@angular/core"]) return "angular";
|
|
399
|
+
if (allDeps["svelte"] || allDeps["@sveltejs/kit"]) return "svelte";
|
|
396
400
|
if (allDeps["express"]) return "express";
|
|
397
401
|
if (allDeps["fastify"]) return "fastify";
|
|
398
402
|
if (allDeps["@nestjs/core"] || allDeps["nestjs"]) return "nestjs";
|
|
@@ -481,7 +485,13 @@ function parseV2Packages(packages, directDeps, directDevDeps) {
|
|
|
481
485
|
if (key === "") continue;
|
|
482
486
|
if (!key.startsWith("node_modules/")) continue;
|
|
483
487
|
const parts = key.split("node_modules/");
|
|
484
|
-
|
|
488
|
+
let name = parts[parts.length - 1];
|
|
489
|
+
if (entry.resolved && typeof entry.resolved === "string") {
|
|
490
|
+
const realName = extractPackageNameFromResolved(entry.resolved);
|
|
491
|
+
if (realName && realName !== name) {
|
|
492
|
+
name = realName;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
485
495
|
if (!name || !entry.version) continue;
|
|
486
496
|
const dedupKey = `${name}@${entry.version}`;
|
|
487
497
|
if (seen.has(dedupKey)) continue;
|
|
@@ -497,6 +507,21 @@ function parseV2Packages(packages, directDeps, directDevDeps) {
|
|
|
497
507
|
}
|
|
498
508
|
return results;
|
|
499
509
|
}
|
|
510
|
+
function extractPackageNameFromResolved(resolved) {
|
|
511
|
+
const scopedMatch = resolved.match(
|
|
512
|
+
/registry\.npmjs\.org\/(@[^/]+\/[^/]+)\/-\//
|
|
513
|
+
);
|
|
514
|
+
if (scopedMatch) {
|
|
515
|
+
return scopedMatch[1];
|
|
516
|
+
}
|
|
517
|
+
const regularMatch = resolved.match(
|
|
518
|
+
/registry\.npmjs\.org\/([^@/][^/]*)\/-\//
|
|
519
|
+
);
|
|
520
|
+
if (regularMatch) {
|
|
521
|
+
return regularMatch[1];
|
|
522
|
+
}
|
|
523
|
+
return null;
|
|
524
|
+
}
|
|
500
525
|
function parseV1Dependencies(dependencies, directDeps, directDevDeps) {
|
|
501
526
|
const results = [];
|
|
502
527
|
function walk(deps) {
|
package/package.json
CHANGED