Skip to content

Commit

Permalink
fix(schema|types): adds 'checksum' attribute to the module schema (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Apr 30, 2023
1 parent 79feaf4 commit deb7266
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema/cruise-result.schema.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/schema/cruise-result.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@
"instability": {
"type": "number",
"description": "number of dependents/ (number of dependents + number of dependencies)A measure for how stable the module is; ranging between 0 (completely stable module) to 1 (completely instable module). Derived from Uncle Bob's instability metric - but applied to a single module instead of to a group of them. This attribute is only present when dependency-cruiser was asked to calculate metrics."
},
"checksum": {
"type": "string",
"description": "checksum of the contents of the module. This attribute is currently only available when the cruise was executed with caching and the cache strategy is 'content'."
}
}
},
Expand Down
7 changes: 7 additions & 0 deletions tools/schema/modules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ export default {
"to a group of them. This attribute is only present when dependency-cruiser " +
"was asked to calculate metrics.",
},
checksum: {
type: "string",
description:
"checksum of the contents of the module. This attribute is currently " +
"only available when the cruise was executed with caching and the cache " +
"strategy is 'content'.",
},
},
},
ReachableType: {
Expand Down
6 changes: 6 additions & 0 deletions types/cruise-result.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ export interface IModule {
* was asked to calculate metrics.
*/
instability?: number;
/**
* checksum of the contents of the module. This attribute is currently only
* available when the cruise was executed with caching and the cache strategy
* is 'content'.
*/
checksum?: string;
}

export interface IDependency {
Expand Down

0 comments on commit deb7266

Please sign in to comment.