@procedures/lib 0.2.3 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # @procedures/lib
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4d3ff39: `lib.graph` (roadmap R44) gives the dependency graph of the workspace packages. The nodes are the packages, and the edges are the dependencies with a `workspace:` specifier. The procedure finds the cycles, and gives the build levels of a graph without a cycle. It reads through `fs.readdir` and `fs.read.json`, and changes nothing.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [ddea529]
12
+ - Updated dependencies [b2a3e3a]
13
+ - Updated dependencies [a8c47f1]
14
+ - Updated dependencies [381ce3a]
15
+ - Updated dependencies [0c627f8]
16
+ - Updated dependencies [ae7f05f]
17
+ - Updated dependencies [7873940]
18
+ - Updated dependencies [a70d445]
19
+ - Updated dependencies [f23c7ad]
20
+ - Updated dependencies [3c40d2d]
21
+ - Updated dependencies [bc70357]
22
+ - Updated dependencies [4cad9ab]
23
+ - Updated dependencies [07cc998]
24
+ - Updated dependencies [a6b01a9]
25
+ - Updated dependencies [c799cdd]
26
+ - Updated dependencies [540f8d9]
27
+ - Updated dependencies [b6daaec]
28
+ - Updated dependencies [5b9264e]
29
+ - Updated dependencies [956e88b]
30
+ - Updated dependencies [ff62281]
31
+ - Updated dependencies [6e4de6c]
32
+ - Updated dependencies [14d85fe]
33
+ - Updated dependencies [d81d0ed]
34
+ - Updated dependencies [aa67cc7]
35
+ - Updated dependencies [061fa22]
36
+ - Updated dependencies [cfb9d69]
37
+ - Updated dependencies [43f7de5]
38
+ - Updated dependencies [b07bb50]
39
+ - Updated dependencies [4a3bfa1]
40
+ - Updated dependencies [bd0b626]
41
+ - Updated dependencies [95b660d]
42
+ - Updated dependencies [a6be873]
43
+ - Updated dependencies [fb30718]
44
+ - Updated dependencies [c5528e4]
45
+ - Updated dependencies [fee5d9c]
46
+ - Updated dependencies [21f7743]
47
+ - Updated dependencies [31a0b46]
48
+ - @procedures/client@0.3.0
49
+ - @procedures/fs@0.3.0
50
+ - @procedures/git@0.3.0
51
+ - @procedures/pnpm@0.3.0
52
+ - @procedures/shell@0.3.0
53
+ - @procedures/dag@0.3.0
54
+
3
55
  ## 0.2.3
4
56
 
5
57
  ### Patch Changes
package/README.md CHANGED
@@ -14,6 +14,7 @@ npm install @procedures/lib
14
14
  | `lib.new` | Make a package from the template |
15
15
  | `lib.audit` | Compare each package with the template |
16
16
  | `lib.rename` | Rename a package in each file of the workspace |
17
+ | `lib.graph` | Give the dependency graph of the workspace packages, with its cycles |
17
18
  | `ecosystem.procedures` | List the procedures of the packages |
18
19
  | `dag.traverse` | Start a procedure for each package, in the order of their dependencies |
19
20
  | `core.catch` | Start a deferred call, and give the error to a handler call |
@@ -70,6 +71,20 @@ The output also has `flagNotices`: the procedure flags whose short form is also
70
71
 
71
72
  Input: `oldName`, `newName`, `rootPath` and `dryRun`. The procedure changes the package name, the dependencies, the imports and the dynamic imports in the workspace. The output lists each change and gives a summary.
72
73
 
74
+ ## `lib.graph`
75
+
76
+ Input: `rootPath`. The procedure reads the `package.json` of each folder in `packages/` through `fs.readdir` and `fs.read.json`. It changes nothing.
77
+
78
+ - `nodes` has one item for each package: `name`, `folder`, `version` and `private`.
79
+ - `edges` has one item for each dependency with a `workspace:` specifier: `from`, `to`, `kind` and `spec`. The kinds are `dependencies`, `devDependencies`, `peerDependencies` and `optionalDependencies`.
80
+ - `cycles` lists each cycle as the names of its packages. A package that depends on itself is also a cycle. `acyclic` is true when the list is empty.
81
+ - `levels` is the build order of a graph without a cycle. The packages of level 0 depend on no workspace package. Each package of a level depends only on packages of lower levels.
82
+ - `warnings` lists the folders that the procedure cannot read, and each `workspace:` dependency on a name that is not in the workspace.
83
+
84
+ ```sh
85
+ node packages/mark/dist/cli.js lib graph
86
+ ```
87
+
73
88
  ## `ecosystem.procedures`
74
89
 
75
90
  Input: `rootPath`, `namespace` and `includeMetadata`. The output lists the procedures of the packages that have a `client.procedures` field.