@stryke/hash 0.6.0 → 0.7.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/dist/hash-files.cjs +2 -2
- package/dist/hash-files.mjs +1 -1
- package/package.json +2 -2
package/dist/hash-files.cjs
CHANGED
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.hashDirectory = hashDirectory;
|
|
7
7
|
exports.hashFiles = hashFiles;
|
|
8
8
|
var _listFiles = require("@stryke/fs/files/list-files");
|
|
9
|
-
var
|
|
9
|
+
var _readFile = require("@stryke/fs/files/read-file");
|
|
10
10
|
var _hash = require("./hash.cjs");
|
|
11
11
|
async function hashFiles(i, s) {
|
|
12
12
|
const t = {};
|
|
13
13
|
return await Promise.all(i.map(async r => {
|
|
14
|
-
t[r] = await (0,
|
|
14
|
+
t[r] = await (0, _readFile.readFile)(r);
|
|
15
15
|
})), (0, _hash.hash)(t, s);
|
|
16
16
|
}
|
|
17
17
|
async function hashDirectory(i, s = {}) {
|
package/dist/hash-files.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{listFiles as e}from"@stryke/fs/files/list-files";import{readFile as o}from"@stryke/fs/files/read-
|
|
1
|
+
import{listFiles as e}from"@stryke/fs/files/list-files";import{readFile as o}from"@stryke/fs/files/read-file";import{hash as n}from"./hash";export async function hashFiles(i,s){const t={};return await Promise.all(i.map(async r=>{t[r]=await o(r)})),n(t,s)}export async function hashDirectory(i,s={}){return s.ignored=s.ignored??["**/node_modules/**","**/.git/**","**/.nx/**","**/.cache/**","**/tmp/**"],hashFiles(await e(i,s),s)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/hash",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing utility functions that hash data using various algorithms.",
|
|
6
6
|
"repository": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"private": false,
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"js-xxhash": "^4.0.0",
|
|
14
|
-
"@stryke/fs": ">=0.
|
|
14
|
+
"@stryke/fs": ">=0.8.0",
|
|
15
15
|
"@stryke/types": ">=0.5.1"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": { "access": "public" },
|