node-modules-tools 0.6.10 → 1.1.0

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.
@@ -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.CNJ4umjk.mjs';
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.Dnbbfhc0.mjs';
2
2
  import 'pkg-types';
3
3
  import 'publint';
@@ -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.CNJ4umjk.js';
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.Dnbbfhc0.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.CNJ4umjk.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.CNJ4umjk.mjs';
2
+ import { P as PackageNodeRaw, a as PackageNodeBase, b as PackageNode } from './shared/node-modules-tools.Dnbbfhc0.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.Dnbbfhc0.mjs';
4
4
  export { PackageJson } from 'pkg-types';
5
5
  export { Message as PublintMessage } from 'publint';
6
6
  export { NormalizedFunding, PackageNodeLike, ParsedFunding, ParsedLicense, constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgLicense, normalizePkgRepository, parseAuthor, parseFunding } from './utils.mjs';
@@ -66,4 +66,5 @@ declare function listPackageDependencies(options: ListPackageDependenciesOptions
66
66
  */
67
67
  declare function resolvePackage(_packageManager: AgentName, pkg: PackageNodeBase, _options: BaseOptions): Promise<PackageNode>;
68
68
 
69
- export { type BaseOptions, type ListPackageDependenciesBaseResult, type ListPackageDependenciesOptions, type ListPackageDependenciesRawResult, type ListPackageDependenciesResult, PackageNode, PackageNodeBase, PackageNodeRaw, getPackageManager, listPackageDependencies, listPackageDependenciesRaw, resolvePackage };
69
+ export { PackageNode, PackageNodeBase, PackageNodeRaw, getPackageManager, listPackageDependencies, listPackageDependenciesRaw, resolvePackage };
70
+ export type { BaseOptions, ListPackageDependenciesBaseResult, ListPackageDependenciesOptions, ListPackageDependenciesRawResult, ListPackageDependenciesResult };
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.CNJ4umjk.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.CNJ4umjk.js';
2
+ import { P as PackageNodeRaw, a as PackageNodeBase, b as PackageNode } from './shared/node-modules-tools.Dnbbfhc0.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.Dnbbfhc0.js';
4
4
  export { PackageJson } from 'pkg-types';
5
5
  export { Message as PublintMessage } from 'publint';
6
6
  export { NormalizedFunding, PackageNodeLike, ParsedFunding, ParsedLicense, constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgLicense, normalizePkgRepository, parseAuthor, parseFunding } from './utils.js';
@@ -66,4 +66,5 @@ declare function listPackageDependencies(options: ListPackageDependenciesOptions
66
66
  */
67
67
  declare function resolvePackage(_packageManager: AgentName, pkg: PackageNodeBase, _options: BaseOptions): Promise<PackageNode>;
68
68
 
69
- export { type BaseOptions, type ListPackageDependenciesBaseResult, type ListPackageDependenciesOptions, type ListPackageDependenciesRawResult, type ListPackageDependenciesResult, PackageNode, PackageNodeBase, PackageNodeRaw, getPackageManager, listPackageDependencies, listPackageDependenciesRaw, resolvePackage };
69
+ export { PackageNode, PackageNodeBase, PackageNodeRaw, getPackageManager, listPackageDependencies, listPackageDependenciesRaw, resolvePackage };
70
+ export type { BaseOptions, ListPackageDependenciesBaseResult, ListPackageDependenciesOptions, ListPackageDependenciesRawResult, ListPackageDependenciesResult };
@@ -66,6 +66,7 @@ interface PackageNode extends PackageNodeBase {
66
66
  interface NpmMeta {
67
67
  publishedAt: number;
68
68
  deprecated?: string;
69
+ provenance?: 'trustedPublisher' | boolean;
69
70
  }
70
71
  /**
71
72
  * Npm meta of the latest version of a certain package
@@ -90,4 +91,5 @@ declare const CLUSTER_DEP_PROD = "dep:prod";
90
91
  declare const CLUSTER_DEP_DEV = "dep:dev";
91
92
  declare const CLUSTER_DEP_OPTIONAL = "dep:optional";
92
93
 
93
- export { CLUSTER_DEP_PROD as C, type FileCategory as F, type NpmMeta as N, type PackageNodeRaw as P, type PackageNodeBase as a, type PackageNode as b, PackageModuleTypes as c, CLUSTER_DEP_DEV as d, CLUSTER_DEP_OPTIONAL as e, type PackageModuleTypeSimple as f, type PackageModuleType as g, type NpmMetaLatest as h, type PackageInstallSizeInfo as i };
94
+ export { CLUSTER_DEP_PROD as C, PackageModuleTypes as c, CLUSTER_DEP_DEV as d, CLUSTER_DEP_OPTIONAL as e };
95
+ export type { FileCategory as F, NpmMeta as N, PackageNodeRaw as P, PackageNodeBase as a, PackageNode as b, PackageModuleTypeSimple as f, PackageModuleType as g, NpmMetaLatest as h, PackageInstallSizeInfo as i };
@@ -66,6 +66,7 @@ interface PackageNode extends PackageNodeBase {
66
66
  interface NpmMeta {
67
67
  publishedAt: number;
68
68
  deprecated?: string;
69
+ provenance?: 'trustedPublisher' | boolean;
69
70
  }
70
71
  /**
71
72
  * Npm meta of the latest version of a certain package
@@ -90,4 +91,5 @@ declare const CLUSTER_DEP_PROD = "dep:prod";
90
91
  declare const CLUSTER_DEP_DEV = "dep:dev";
91
92
  declare const CLUSTER_DEP_OPTIONAL = "dep:optional";
92
93
 
93
- export { CLUSTER_DEP_PROD as C, type FileCategory as F, type NpmMeta as N, type PackageNodeRaw as P, type PackageNodeBase as a, type PackageNode as b, PackageModuleTypes as c, CLUSTER_DEP_DEV as d, CLUSTER_DEP_OPTIONAL as e, type PackageModuleTypeSimple as f, type PackageModuleType as g, type NpmMetaLatest as h, type PackageInstallSizeInfo as i };
94
+ export { CLUSTER_DEP_PROD as C, PackageModuleTypes as c, CLUSTER_DEP_DEV as d, CLUSTER_DEP_OPTIONAL as e };
95
+ export type { FileCategory as F, NpmMeta as N, PackageNodeRaw as P, PackageNodeBase as a, PackageNode as b, PackageModuleTypeSimple as f, PackageModuleType as g, NpmMetaLatest as h, PackageInstallSizeInfo as i };
package/dist/utils.d.mts CHANGED
@@ -43,4 +43,5 @@ declare function normalizePkgRepository(json: PackageJson): {
43
43
  org: string | undefined;
44
44
  } | undefined;
45
45
 
46
- export { type NormalizedFunding, type PackageNodeLike, type ParsedFunding, type ParsedLicense, constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgLicense, normalizePkgRepository, parseAuthor, parseFunding };
46
+ export { constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgLicense, normalizePkgRepository, parseAuthor, parseFunding };
47
+ export type { NormalizedFunding, PackageNodeLike, ParsedFunding, ParsedLicense };
package/dist/utils.d.ts CHANGED
@@ -43,4 +43,5 @@ declare function normalizePkgRepository(json: PackageJson): {
43
43
  org: string | undefined;
44
44
  } | undefined;
45
45
 
46
- export { type NormalizedFunding, type PackageNodeLike, type ParsedFunding, type ParsedLicense, constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgLicense, normalizePkgRepository, parseAuthor, parseFunding };
46
+ export { constructPackageFilter, constructPackageFilters, normalizePkgAuthors, normalizePkgFundings, normalizePkgLicense, normalizePkgRepository, parseAuthor, parseFunding };
47
+ export type { NormalizedFunding, PackageNodeLike, ParsedFunding, ParsedLicense };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-modules-tools",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "1.1.0",
5
5
  "description": "Tools for inspecting node_modules",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -31,18 +31,18 @@
31
31
  "p-limit": "^6.2.0",
32
32
  "package-manager-detector": "^1.3.0",
33
33
  "pathe": "^2.0.3",
34
- "pkg-types": "^2.1.0",
34
+ "pkg-types": "^2.2.0",
35
35
  "publint": "^0.3.12",
36
36
  "semver": "^7.7.2",
37
37
  "tinyexec": "^1.0.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@pnpm/list": "^1000.0.19",
41
- "@pnpm/types": "^1000.6.0",
40
+ "@pnpm/list": "^1000.0.22",
41
+ "@pnpm/types": "^1000.7.0",
42
42
  "@types/js-yaml": "^4.0.9",
43
43
  "@types/stream-json": "^1.7.8",
44
44
  "stream-json": "^1.9.1",
45
- "unbuild": "^3.5.0"
45
+ "unbuild": "^3.6.0"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "unbuild",