node-modules-tools 0.6.7 → 0.6.9
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -54,7 +54,7 @@ declare function getPackageManager(options: BaseOptions): Promise<AgentName>;
|
|
|
54
54
|
*
|
|
55
55
|
* This function will automatically detect the package manager in the current project, and list the dependencies of the packages.
|
|
56
56
|
*/
|
|
57
|
-
declare function listPackageDependenciesRaw(manager: AgentName, options: ListPackageDependenciesOptions): Promise<
|
|
57
|
+
declare function listPackageDependenciesRaw(manager: AgentName, options: ListPackageDependenciesOptions): Promise<ListPackageDependenciesBaseResult>;
|
|
58
58
|
|
|
59
59
|
declare function listPackageDependencies(options: ListPackageDependenciesOptions): Promise<ListPackageDependenciesResult>;
|
|
60
60
|
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ declare function getPackageManager(options: BaseOptions): Promise<AgentName>;
|
|
|
54
54
|
*
|
|
55
55
|
* This function will automatically detect the package manager in the current project, and list the dependencies of the packages.
|
|
56
56
|
*/
|
|
57
|
-
declare function listPackageDependenciesRaw(manager: AgentName, options: ListPackageDependenciesOptions): Promise<
|
|
57
|
+
declare function listPackageDependenciesRaw(manager: AgentName, options: ListPackageDependenciesOptions): Promise<ListPackageDependenciesBaseResult>;
|
|
58
58
|
|
|
59
59
|
declare function listPackageDependencies(options: ListPackageDependenciesOptions): Promise<ListPackageDependenciesResult>;
|
|
60
60
|
|
package/dist/index.mjs
CHANGED
|
@@ -51,7 +51,7 @@ function populateRawResult(input) {
|
|
|
51
51
|
result.packages.get(dep)?.dependents.add(pkg.spec);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function resolveFlatDependencies(pkg) {
|
|
55
55
|
const postTasks = [];
|
|
56
56
|
function traverseDependencies(node, seen = /* @__PURE__ */ new Set()) {
|
|
57
57
|
for (const dep of node.dependencies) {
|
|
@@ -100,7 +100,7 @@ function populateRawResult(input) {
|
|
|
100
100
|
task();
|
|
101
101
|
}
|
|
102
102
|
for (const pkg of result.packages.values())
|
|
103
|
-
|
|
103
|
+
resolveFlatDependencies(pkg);
|
|
104
104
|
return result;
|
|
105
105
|
}
|
|
106
106
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-modules-tools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.9",
|
|
5
5
|
"description": "Tools for inspecting node_modules",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"js-yaml": "^4.1.0",
|
|
31
31
|
"p-limit": "^6.2.0",
|
|
32
|
-
"package-manager-detector": "^1.
|
|
32
|
+
"package-manager-detector": "^1.3.0",
|
|
33
33
|
"pathe": "^2.0.3",
|
|
34
34
|
"pkg-types": "^2.1.0",
|
|
35
35
|
"publint": "^0.3.12",
|
|
36
|
-
"semver": "^7.7.
|
|
36
|
+
"semver": "^7.7.2",
|
|
37
37
|
"tinyexec": "^1.0.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@pnpm/list": "^1000.0.
|
|
41
|
-
"@pnpm/types": "^1000.
|
|
40
|
+
"@pnpm/list": "^1000.0.17",
|
|
41
|
+
"@pnpm/types": "^1000.6.0",
|
|
42
42
|
"@types/js-yaml": "^4.0.9",
|
|
43
43
|
"@types/stream-json": "^1.7.8",
|
|
44
44
|
"stream-json": "^1.9.1",
|