@lage-run/hasher
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Wed, 08 Mar 2023 17:35:15 GMT", | ||
"date": "Wed, 29 Mar 2023 20:02:22 GMT", | ||
"tag": "@lage-run/hasher_v0.2.2", | ||
"version": "0.2.2", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"author": "kchau@microsoft.com", | ||
"package": "@lage-run/hasher", | ||
"commit": "3554c6c3bc2226933a819fd1123ada422848d7d4", | ||
"comment": "moving back to fast-glob for globbing, as it was more accurate" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Wed, 08 Mar 2023 17:35:28 GMT", | ||
"tag": "@lage-run/hasher_v0.2.1", | ||
@@ -8,0 +23,0 @@ "version": "0.2.1", |
# Change Log - @lage-run/hasher | ||
This log was last generated on Wed, 08 Mar 2023 17:35:15 GMT and should not be manually modified. | ||
This log was last generated on Wed, 29 Mar 2023 20:02:22 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 0.2.2 | ||
Wed, 29 Mar 2023 20:02:22 GMT | ||
### Patches | ||
- moving back to fast-glob for globbing, as it was more accurate (kchau@microsoft.com) | ||
## 0.2.1 | ||
Wed, 08 Mar 2023 17:35:15 GMT | ||
Wed, 08 Mar 2023 17:35:28 GMT | ||
@@ -11,0 +19,0 @@ ### Patches |
@@ -87,3 +87,4 @@ "use strict"; | ||
const buildSignature = "yarn build"; | ||
const hasher = new _index.Hasher(packageRoot); | ||
const repoInfo = await (0, _index.getRepoInfo)(monorepo.root); | ||
const hasher = new _index.Hasher(packageRoot, repoInfo); | ||
const hash = await hasher.createPackageHash(buildSignature); | ||
@@ -90,0 +91,0 @@ return hash; |
import type { WorkspaceInfo } from "workspace-tools"; | ||
import type { PackageHashInfo } from "./hashOfPackage.js"; | ||
import type { RepoInfo } from "./repoInfo.js"; | ||
export interface IHasher { | ||
@@ -9,6 +10,6 @@ createPackageHash: (salt: string) => Promise<string>; | ||
private packageRoot; | ||
private repoInfo?; | ||
constructor(packageRoot: string); | ||
private repoInfo; | ||
constructor(packageRoot: string, repoInfo: RepoInfo); | ||
createPackageHash(salt: string): Promise<string>; | ||
} | ||
export * from "./repoInfo.js"; |
@@ -18,3 +18,3 @@ "use strict"; | ||
const _helpersJs = require("./helpers.js"); | ||
const _repoInfoJs = _exportStar(require("./repoInfo.js"), exports); | ||
_exportStar(require("./repoInfo.js"), exports); | ||
function _exportStar(from, to) { | ||
@@ -49,4 +49,3 @@ Object.keys(from).forEach(function(k) { | ||
async createPackageHash(salt) { | ||
const packageRoot = await (0, _helpersJs.getPackageRoot)(this.packageRoot); | ||
this.repoInfo = await (0, _repoInfoJs.getRepoInfo)(packageRoot); | ||
const packageRoot = this.packageRoot; | ||
const { workspaceInfo } = this.repoInfo; | ||
@@ -74,5 +73,6 @@ const queue = [ | ||
} | ||
constructor(packageRoot){ | ||
constructor(packageRoot, repoInfo){ | ||
this.packageRoot = packageRoot; | ||
this.repoInfo = repoInfo; | ||
} | ||
} |
{ | ||
"name": "@lage-run/hasher", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Hasher for Lage Targets", | ||
@@ -5,0 +5,0 @@ "repository": { |
112719
2587