Skip to content

Commit 78a433d

Browse files
authored
chore: add engines field, compatible with Node 12+ (#6)
1 parent 5480682 commit 78a433d

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

.changeset/nice-oranges-study.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stable-hash-x": patch
3+
---
4+
5+
chore: add engines field, compatible with Node 12+

.github/workflows/pkg-pr-new.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
run: yarn build
3030

3131
- name: Publish
32-
run: yarn dlx pkg-pr-new publish # --compact
32+
run: yarn dlx pkg-pr-new publish --compact

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
!.yarn/plugins
55
!.yarn/releases
66
coverage
7+
dist
78
lib
89
node_modules
910
.vercel

.size-limit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
33
"path": "./lib/index.js",
4-
"limit": "450B"
4+
"limit": "460B"
55
}
66
]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
1414
[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/changesets/changesets)
1515

16-
A tiny and fast (450b <sup>[unpkg](https://unpkg.com/stable-hash-x@latest/lib/index.js)</sup>) lib for "stably hashing" a JavaScript value. Originally created for [SWR](https://github.com/vercel/swr) by [Shu Ding][] at [`stable-hash`](https://github.com/shuding/stable-hash), we forked it because the original one is a bit out of maintenance for a long time.
16+
A tiny and fast (460b <sup>[unpkg](https://unpkg.com/stable-hash-x@latest/lib/index.js)</sup>) lib for "stably hashing" a JavaScript value. Originally created for [SWR](https://github.com/vercel/swr) by [Shu Ding][] at [`stable-hash`](https://github.com/shuding/stable-hash), we forked it because the original one is a bit out of maintenance for a long time.
1717

1818
It's similar to `JSON.stringify(value)`, but:
1919

@@ -196,7 +196,7 @@ This function does something similar to `JSON.stringify`, but more than it. It d
196196
```js
197197
import crypto from 'node:crypto'
198198

199-
import hash from 'stable-hash-x'
199+
import { hash } from 'stable-hash-x'
200200

201201
const weakHash = hash(anyJavaScriptValueHere)
202202
const encodedHash = Buffer.from(weakHash).toString('base64')

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
],
1212
"license": "MIT",
1313
"packageManager": "[email protected]",
14+
"engines": {
15+
"node": ">=12.0.0"
16+
},
1417
"main": "./lib/index.cjs",
1518
"types": "./lib/index.d.cts",
1619
"module": "./lib/index.js",

0 commit comments

Comments
 (0)