@stryke/hash 0.7.2 → 0.8.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.
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.hashDirectory = hashDirectory;
7
7
  exports.hashFiles = hashFiles;
8
- var _listFiles = require("@stryke/fs/files/list-files");
9
- var _readFile = require("@stryke/fs/files/read-file");
8
+ var _listFiles = require("@stryke/fs/list-files");
9
+ var _readFile = require("@stryke/fs/read-file");
10
10
  var _hash = require("./hash.cjs");
11
11
  async function hashFiles(i, s) {
12
12
  const t = {};
@@ -1,4 +1,4 @@
1
- import type { ListFilesOptions } from "@stryke/fs/files/list-files";
1
+ import type { ListFilesOptions } from "@stryke/fs/list-files";
2
2
  import type { HashOptions } from "./hash";
3
3
  export type HashFilesOptions = HashOptions & ListFilesOptions;
4
4
  /**
@@ -1 +1 @@
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/**","**/.storm/**","**/tmp/**"],hashFiles(await e(i,s),s)}
1
+ import{listFiles as e}from"@stryke/fs/list-files";import{readFile as o}from"@stryke/fs/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/**","**/.storm/**","**/tmp/**"],hashFiles(await e(i,s),s)}
package/dist/hash.cjs CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.hash = hash;
7
- var _isString = require("@stryke/types/type-checks/is-string");
7
+ var _isString = require("@stryke/type-checks/is-string");
8
8
  var _hashObject = require("./hash-object.cjs");
9
9
  var _sha = require("./sha-256.cjs");
10
10
  function hash(t, e) {
package/dist/hash.mjs CHANGED
@@ -1 +1 @@
1
- import{isString as r}from"@stryke/types/type-checks/is-string";import{hashObject as h}from"./hash-object";import{sha256base64 as a}from"./sha-256";export function hash(t,e){const s=a(r(t)?t:h(t,e)),n=e?.maxLength??32;return s.length>n?s.slice(0,n):s}
1
+ import{isString as r}from"@stryke/type-checks/is-string";import{hashObject as h}from"./hash-object";import{sha256base64 as a}from"./sha-256";export function hash(t,e){const s=a(r(t)?t:h(t,e)),n=e?.maxLength??32;return s.length>n?s.slice(0,n):s}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/hash",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "A package containing utility functions that hash data using various algorithms.",
6
6
  "repository": {
@@ -11,8 +11,8 @@
11
11
  "private": false,
12
12
  "dependencies": {
13
13
  "js-xxhash": "^4.0.0",
14
- "@stryke/fs": ">=0.9.1",
15
- "@stryke/types": ">=0.5.1"
14
+ "@stryke/fs": ">=0.10.0",
15
+ "@stryke/type-checks": ">=0.1.0"
16
16
  },
17
17
  "publishConfig": { "access": "public" },
18
18
  "devDependencies": {},