node-modules-tools 0.5.4 → 0.5.5
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/constants.d.mts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +7 -1
- package/dist/shared/{node-modules-tools.Bnm4jx4C.d.mts → node-modules-tools.rYmxZoRW.d.mts} +2 -0
- package/dist/shared/{node-modules-tools.Bnm4jx4C.d.ts → node-modules-tools.rYmxZoRW.d.ts} +2 -0
- package/package.json +1 -1
package/dist/constants.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, c as PackageModuleTypes } from './shared/node-modules-tools.
|
|
1
|
+
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, c as PackageModuleTypes } from './shared/node-modules-tools.rYmxZoRW.mjs';
|
|
2
2
|
import 'pkg-types';
|
|
3
3
|
import 'publint';
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, c as PackageModuleTypes } from './shared/node-modules-tools.
|
|
1
|
+
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, c as PackageModuleTypes } from './shared/node-modules-tools.rYmxZoRW.js';
|
|
2
2
|
import 'pkg-types';
|
|
3
3
|
import 'publint';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentName } from 'package-manager-detector';
|
|
2
|
-
import { P as PackageNodeRaw, a as PackageNodeBase, b as PackageNode } from './shared/node-modules-tools.
|
|
3
|
-
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, F as FileCategory, N as NpmMeta, h as NpmMetaLatest, i as PackageInstallSizeInfo, g as PackageModuleType, f as PackageModuleTypeSimple, c as PackageModuleTypes } from './shared/node-modules-tools.
|
|
2
|
+
import { P as PackageNodeRaw, a as PackageNodeBase, b as PackageNode } from './shared/node-modules-tools.rYmxZoRW.mjs';
|
|
3
|
+
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, F as FileCategory, N as NpmMeta, h as NpmMetaLatest, i as PackageInstallSizeInfo, g as PackageModuleType, f as PackageModuleTypeSimple, c as PackageModuleTypes } from './shared/node-modules-tools.rYmxZoRW.mjs';
|
|
4
4
|
export { PackageJson } from 'pkg-types';
|
|
5
5
|
export { Message as PublintMessage } from 'publint';
|
|
6
6
|
export { NormalizedFunding, PackageNodeLike, ParsedFunding, constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgRepository, parseAuthor, parseFunding } from './utils.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentName } from 'package-manager-detector';
|
|
2
|
-
import { P as PackageNodeRaw, a as PackageNodeBase, b as PackageNode } from './shared/node-modules-tools.
|
|
3
|
-
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, F as FileCategory, N as NpmMeta, h as NpmMetaLatest, i as PackageInstallSizeInfo, g as PackageModuleType, f as PackageModuleTypeSimple, c as PackageModuleTypes } from './shared/node-modules-tools.
|
|
2
|
+
import { P as PackageNodeRaw, a as PackageNodeBase, b as PackageNode } from './shared/node-modules-tools.rYmxZoRW.js';
|
|
3
|
+
export { d as CLUSTER_DEP_DEV, e as CLUSTER_DEP_OPTIONAL, C as CLUSTER_DEP_PROD, F as FileCategory, N as NpmMeta, h as NpmMetaLatest, i as PackageInstallSizeInfo, g as PackageModuleType, f as PackageModuleTypeSimple, c as PackageModuleTypes } from './shared/node-modules-tools.rYmxZoRW.js';
|
|
4
4
|
export { PackageJson } from 'pkg-types';
|
|
5
5
|
export { Message as PublintMessage } from 'publint';
|
|
6
6
|
export { NormalizedFunding, PackageNodeLike, ParsedFunding, constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgRepository, parseAuthor, parseFunding } from './utils.js';
|
package/dist/index.mjs
CHANGED
|
@@ -63,8 +63,14 @@ function populateRawResult(input) {
|
|
|
63
63
|
depNode.flatClusters.add(cluster);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
if (depNode.depth > level)
|
|
66
|
+
if (depNode.depth > level) {
|
|
67
67
|
depNode.depth = level;
|
|
68
|
+
depNode.shallowestDependent?.clear();
|
|
69
|
+
}
|
|
70
|
+
if (depNode.depth === level) {
|
|
71
|
+
depNode.shallowestDependent ||= /* @__PURE__ */ new Set();
|
|
72
|
+
depNode.shallowestDependent.add(node.spec);
|
|
73
|
+
}
|
|
68
74
|
if (seen.has(depNode))
|
|
69
75
|
continue;
|
|
70
76
|
pkg.flatDependencies.add(dep);
|
|
@@ -41,6 +41,8 @@ interface PackageNodeBase extends PackageNodeRaw {
|
|
|
41
41
|
dependents: Set<string>;
|
|
42
42
|
/** The lowest depth of this package */
|
|
43
43
|
depth: number;
|
|
44
|
+
/** The shallowest dependent of this package */
|
|
45
|
+
shallowestDependent: Set<string> | undefined;
|
|
44
46
|
/** All nested dependencies of this package */
|
|
45
47
|
flatDependencies: Set<string>;
|
|
46
48
|
/** All nested dependents of this package */
|
|
@@ -41,6 +41,8 @@ interface PackageNodeBase extends PackageNodeRaw {
|
|
|
41
41
|
dependents: Set<string>;
|
|
42
42
|
/** The lowest depth of this package */
|
|
43
43
|
depth: number;
|
|
44
|
+
/** The shallowest dependent of this package */
|
|
45
|
+
shallowestDependent: Set<string> | undefined;
|
|
44
46
|
/** All nested dependencies of this package */
|
|
45
47
|
flatDependencies: Set<string>;
|
|
46
48
|
/** All nested dependents of this package */
|