@nodesecure/tree-walker 1.2.0 → 1.3.1

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/README.md CHANGED
@@ -1,128 +1,128 @@
1
- <p align="center"><h1 align="center">
2
- @nodesecure/tree-walker
3
- </h1>
4
-
5
- <p align="center">
6
- Fetch and walk the dependency tree of a given manifest
7
- </p>
8
-
9
- ## Requirements
10
- - [Node.js](https://nodejs.org/en/) v20 or higher
11
-
12
- ## Getting Started
13
-
14
- This package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com).
15
-
16
- ```bash
17
- $ npm i @nodesecure/tree-walker
18
- # or
19
- $ yarn add @nodesecure/tree-walker
20
- ```
21
-
22
- ## Usage example
23
-
24
- ```ts
25
- import os from "node:os";
26
-
27
- import pacote from "pacote";
28
- import { npm } from "@nodesecure/tree-walker";
29
-
30
- const manifest = await pacote.manifest("some-package@1.0.0", {
31
- cache: `${os.homedir()}/.npm`
32
- });
33
-
34
- const treeWalker = new npm.TreeWalker();
35
-
36
- for await (const dependency of treeWalker.walk(manifest)) {
37
- console.log(dependency);
38
- }
39
- ```
40
-
41
- > [!NOTE]
42
- > This package has been designed to be used by the Scanner package/workspace.
43
-
44
- ## API
45
-
46
- ### npm.TreeWalker
47
-
48
- #### constructor(options?: TreeWalkerOptions)
49
-
50
- ```ts
51
- import pacote from "pacote";
52
- import Arborist from "@npmcli/arborist";
53
-
54
- interface LocalDependencyTreeLoaderProvider {
55
- load(
56
- location: string,
57
- registry?: string
58
- ): Promise<Arborist.Node>;
59
- }
60
-
61
- interface PacoteProviderApi {
62
- manifest(
63
- spec: string,
64
- opts?: pacote.Options
65
- ): Promise<pacote.AbbreviatedManifest & pacote.ManifestResult>;
66
- }
67
-
68
- interface TreeWalkerOptions {
69
- registry?: string;
70
- providers?: {
71
- pacote?: PacoteProviderApi;
72
- localTreeLoader?: LocalDependencyTreeLoaderProvider;
73
- }
74
- }
75
- ```
76
-
77
- #### *walk(manifest: PackageJSON | ManifestVersion, options: WalkOptions): AsyncIterableIterator< DependencyJSON >
78
-
79
- The `walk` method processes package metadata from a given **package.json file** or a **Manifest** result from the [pacote](https://www.npmjs.com/package/pacote) library.
80
-
81
- The `options` parameter is described by the following TypeScript interface:
82
-
83
- ```ts
84
- interface WalkOptions {
85
- /**
86
- * Specifies the maximum depth to traverse for each root dependency.
87
- * For example, a value of 2 would mean only traversing dependencies and their immediate dependencies.
88
- *
89
- * @default Infinity
90
- */
91
- maxDepth?: number;
92
-
93
- /**
94
- * Includes development dependencies in the walk.
95
- * Note that enabling this option can significantly increase processing time.
96
- *
97
- * @default false
98
- */
99
- includeDevDeps?: boolean;
100
-
101
- /**
102
- * Enables the use of Arborist for rapidly walking over the dependency tree.
103
- * When enabled, it triggers different methods based on the presence of `node_modules`:
104
- * - `loadActual()` if `node_modules` is available.
105
- * - `loadVirtual()` otherwise.
106
- *
107
- * When disabled, it will iterate on all dependencies by using pacote
108
- */
109
- packageLock?: {
110
- /**
111
- * Fetches all manifests for additional metadata.
112
- * This option is useful only when `usePackageLock` is enabled.
113
- *
114
- * @default false
115
- */
116
- fetchManifest?: boolean;
117
-
118
- /**
119
- * Specifies the location of the manifest file for Arborist.
120
- * This is typically the path to the `package.json` file.
121
- */
122
- location: string;
123
- };
124
- }
125
- ```
126
-
127
- ## License
128
- MIT
1
+ <p align="center"><h1 align="center">
2
+ @nodesecure/tree-walker
3
+ </h1>
4
+
5
+ <p align="center">
6
+ Fetch and walk the dependency tree of a given manifest
7
+ </p>
8
+
9
+ ## Requirements
10
+ - [Node.js](https://nodejs.org/en/) v20 or higher
11
+
12
+ ## Getting Started
13
+
14
+ This package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com).
15
+
16
+ ```bash
17
+ $ npm i @nodesecure/tree-walker
18
+ # or
19
+ $ yarn add @nodesecure/tree-walker
20
+ ```
21
+
22
+ ## Usage example
23
+
24
+ ```ts
25
+ import os from "node:os";
26
+
27
+ import pacote from "pacote";
28
+ import { npm } from "@nodesecure/tree-walker";
29
+
30
+ const manifest = await pacote.manifest("some-package@1.0.0", {
31
+ cache: `${os.homedir()}/.npm`
32
+ });
33
+
34
+ const treeWalker = new npm.TreeWalker();
35
+
36
+ for await (const dependency of treeWalker.walk(manifest)) {
37
+ console.log(dependency);
38
+ }
39
+ ```
40
+
41
+ > [!NOTE]
42
+ > This package has been designed to be used by the Scanner package/workspace.
43
+
44
+ ## API
45
+
46
+ ### npm.TreeWalker
47
+
48
+ #### constructor(options?: TreeWalkerOptions)
49
+
50
+ ```ts
51
+ import pacote from "pacote";
52
+ import Arborist from "@npmcli/arborist";
53
+
54
+ interface LocalDependencyTreeLoaderProvider {
55
+ load(
56
+ location: string,
57
+ registry?: string
58
+ ): Promise<Arborist.Node>;
59
+ }
60
+
61
+ interface PacoteProviderApi {
62
+ manifest(
63
+ spec: string,
64
+ opts?: pacote.Options
65
+ ): Promise<pacote.AbbreviatedManifest & pacote.ManifestResult>;
66
+ }
67
+
68
+ interface TreeWalkerOptions {
69
+ registry?: string;
70
+ providers?: {
71
+ pacote?: PacoteProviderApi;
72
+ localTreeLoader?: LocalDependencyTreeLoaderProvider;
73
+ }
74
+ }
75
+ ```
76
+
77
+ #### *walk(manifest: PackageJSON | ManifestVersion, options: WalkOptions): AsyncIterableIterator< DependencyJSON >
78
+
79
+ The `walk` method processes package metadata from a given **package.json file** or a **Manifest** result from the [pacote](https://www.npmjs.com/package/pacote) library.
80
+
81
+ The `options` parameter is described by the following TypeScript interface:
82
+
83
+ ```ts
84
+ interface WalkOptions {
85
+ /**
86
+ * Specifies the maximum depth to traverse for each root dependency.
87
+ * For example, a value of 2 would mean only traversing dependencies and their immediate dependencies.
88
+ *
89
+ * @default Infinity
90
+ */
91
+ maxDepth?: number;
92
+
93
+ /**
94
+ * Includes development dependencies in the walk.
95
+ * Note that enabling this option can significantly increase processing time.
96
+ *
97
+ * @default false
98
+ */
99
+ includeDevDeps?: boolean;
100
+
101
+ /**
102
+ * Enables the use of Arborist for rapidly walking over the dependency tree.
103
+ * When enabled, it triggers different methods based on the presence of `node_modules`:
104
+ * - `loadActual()` if `node_modules` is available.
105
+ * - `loadVirtual()` otherwise.
106
+ *
107
+ * When disabled, it will iterate on all dependencies by using pacote
108
+ */
109
+ packageLock?: {
110
+ /**
111
+ * Fetches all manifests for additional metadata.
112
+ * This option is useful only when `usePackageLock` is enabled.
113
+ *
114
+ * @default false
115
+ */
116
+ fetchManifest?: boolean;
117
+
118
+ /**
119
+ * Specifies the location of the manifest file for Arborist.
120
+ * This is typically the path to the `package.json` file.
121
+ */
122
+ location: string;
123
+ };
124
+ }
125
+ ```
126
+
127
+ ## License
128
+ MIT
@@ -1,14 +1,16 @@
1
- import type { Warning, WarningDefault } from "@nodesecure/js-x-ray";
1
+ import type { Warning } from "@nodesecure/js-x-ray";
2
+ import type { PackageModuleType } from "@nodesecure/mama";
2
3
  export type NpmSpec = `${string}@${string}`;
3
4
  export interface DependencyJSON {
4
5
  id: number;
6
+ type: PackageModuleType;
5
7
  name: string;
6
8
  version: string;
7
9
  usedBy: Record<string, string>;
8
10
  isDevDependency: boolean;
9
11
  existOnRemoteRegistry: boolean;
10
12
  flags: string[];
11
- warnings: Warning<WarningDefault>[];
13
+ warnings: Warning[];
12
14
  alias: Record<string, string>;
13
15
  dependencyCount: number;
14
16
  gitUrl: string | null;
@@ -25,7 +27,7 @@ export declare class Dependency {
25
27
  existOnRemoteRegistry: boolean;
26
28
  dependencyCount: number;
27
29
  gitUrl: null | string;
28
- warnings: Warning<WarningDefault>[];
30
+ warnings: Warning[];
29
31
  alias: Record<string, string>;
30
32
  constructor(name: string, version: string, options?: DependencyOptions);
31
33
  addChildren(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"Dependency.class.d.ts","sourceRoot":"","sources":["../src/Dependency.class.ts"],"names":[],"mappings":"AACA,OAA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IACZ,qBAAqB,UAAQ;IAC7B,eAAe,SAAK;IACpB,MAAM,EAAE,IAAI,GAAG,MAAM,CAAQ;IAC7B,QAAQ,EAAE,OAAO,EAAE,CAAM;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;gBAMxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,iBAAsB;IAcjC,WAAW;IAIX,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,IAAI,KAAK,aAER;IAED,IAAI,MAAM;;MAET;IAED,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,UAAO;IAc1C,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM;IASlB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,cAAc;CAoBvD"}
@@ -56,6 +56,7 @@ export class Dependency {
56
56
  }
57
57
  return {
58
58
  id: typeof customId === "number" ? customId : Dependency.currentId++,
59
+ type: "cjs",
59
60
  name: this.name,
60
61
  version: this.version,
61
62
  usedBy: this.parent,
@@ -1 +1 @@
1
- {"version":3,"file":"Dependency.class.js","sourceRoot":"","sources":["../src/Dependency.class.ts"],"names":[],"mappings":"AAuBA,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC;IAEd,IAAI,CAAS;IACb,OAAO,CAAS;IAChB,GAAG,GAAG,KAAK,CAAC;IACZ,qBAAqB,GAAG,IAAI,CAAC;IAC7B,eAAe,GAAG,CAAC,CAAC;IACpB,MAAM,GAAkB,IAAI,CAAC;IAC7B,QAAQ,GAA8B,EAAE,CAAC;IACzC,KAAK,GAA2B,EAAE,CAAC;IAE1C,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IAC3B,OAAO,GAAsB,IAAI,CAAC;IAElC,YACE,IAAY,EACZ,OAAe,EACf,UAA6B,EAAE;QAE/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OA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O,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;YAClD,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,GAAY;QAChB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACzB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QACpB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mBAAmB,CAAC,QAAiB;QACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9B,CAAC;QAED,OAAO;YACL,EAAE,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE;YACpE,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,eAAe,EAAE,IAAI,CAAC,GAAG;YACzB,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;YACjD,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC"}
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
- {
2
- "name": "@nodesecure/tree-walker",
3
- "version": "1.2.0",
4
- "description": "NodeSecure tree walker",
5
- "type": "module",
6
- "exports": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "scripts": {
9
- "build": "tsc -b",
10
- "prepublishOnly": "npm run build",
11
- "test-only": "tsx --test ./test/**/*.spec.ts",
12
- "test": "c8 -r html npm run test-only"
13
- },
14
- "files": [
15
- "dist"
16
- ],
17
- "keywords": [
18
- "NodeSecure",
19
- "tree",
20
- "walker"
21
- ],
22
- "author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
23
- "license": "MIT",
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://github.com/NodeSecure/scanner.git"
27
- },
28
- "bugs": {
29
- "url": "https://github.com/NodeSecure/scanner/issues"
30
- },
31
- "homepage": "https://github.com/NodeSecure/tree/master/workspaces/tree-walker#readme",
32
- "dependencies": {
33
- "@nodesecure/js-x-ray": "^8.1.0",
34
- "@nodesecure/npm-registry-sdk": "^3.0.0",
35
- "@nodesecure/npm-types": "^1.1.0",
36
- "@npmcli/arborist": "^9.0.2",
37
- "combine-async-iterators": "^3.0.0",
38
- "itertools": "^2.3.1",
39
- "npm-pick-manifest": "^10.0.0",
40
- "pacote": "^21.0.0",
41
- "semver": "^7.6.0"
42
- },
43
- "devDependencies": {
44
- "@types/npmcli__arborist": "^6.3.0"
45
- }
46
- }
1
+ {
2
+ "name": "@nodesecure/tree-walker",
3
+ "version": "1.3.1",
4
+ "description": "NodeSecure tree walker",
5
+ "type": "module",
6
+ "exports": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc -b",
10
+ "prepublishOnly": "npm run build",
11
+ "test-only": "tsx --test ./test/**/*.spec.ts",
12
+ "test": "c8 -r html npm run test-only"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "keywords": [
18
+ "NodeSecure",
19
+ "tree",
20
+ "walker"
21
+ ],
22
+ "author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
23
+ "license": "MIT",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/NodeSecure/scanner.git"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/NodeSecure/scanner/issues"
30
+ },
31
+ "homepage": "https://github.com/NodeSecure/tree/master/workspaces/tree-walker#readme",
32
+ "dependencies": {
33
+ "@nodesecure/js-x-ray": "^9.2.0",
34
+ "@nodesecure/npm-registry-sdk": "^3.0.0",
35
+ "@nodesecure/npm-types": "^1.1.0",
36
+ "@npmcli/arborist": "^9.0.2",
37
+ "combine-async-iterators": "^3.0.0",
38
+ "itertools": "^2.3.1",
39
+ "npm-pick-manifest": "^10.0.0",
40
+ "pacote": "^21.0.0",
41
+ "semver": "^7.6.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/npmcli__arborist": "^6.3.0"
45
+ }
46
+ }