Skip to content

Commit 0ee9d28

Browse files
committed
feat: migrate stable-hash to stable-hash-x
1 parent 954321a commit 0ee9d28

File tree

3 files changed

+51
-27
lines changed

3 files changed

+51
-27
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
}
8282
},
8383
"dependencies": {
84-
"stable-hash": "^0.0.5"
84+
"stable-hash-x": "^0.1.1"
8585
},
8686
"devDependencies": {
8787
"@types/node": "^22.15.29",

pnpm-lock.yaml

Lines changed: 48 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { resolve } from 'node:path'
44
import { cwd } from 'node:process'
55
import { pathToFileURL } from 'node:url'
66
import { cloneDeep, isPlainObject, mergeWith } from 'es-toolkit'
7-
8-
import { stableHash as generateHash } from 'stable-hash'
7+
import { stableHash } from 'stable-hash-x'
98

109
export const hashCache: WeakMap<NapiResolveOptions, string> = new WeakMap<NapiResolveOptions, string>()
1110

@@ -14,7 +13,7 @@ export function hashObject(obj: NapiResolveOptions): string {
1413
return hashCache.get(obj)!
1514
}
1615

17-
const hash = generateHash(obj)
16+
const hash = stableHash(obj)
1817
hashCache.set(obj, hash)
1918
return hash
2019
}

0 commit comments

Comments
 (0)