-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
75 lines (75 loc) · 3.12 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"name": "highwayhasher",
"version": "0.4.4",
"description": "HighwayHash implementation for both node and browsers",
"repository": {
"type": "git",
"url": "git://github.com/nickbabcock/highwayhasher.git"
},
"sideEffects": false,
"type": "module",
"main": "./dist/browser-fat/umd/index_browser_fat.js",
"module": "./dist/browser-fat/es/index_browser_fat.js",
"exports": {
".": {
"types": "./dist/types/main/index_browser_fat.d.ts",
"node-addons": {
"types": "./dist/types/main/index_node.d.ts",
"default": "./dist/node/index_node.cjs"
},
"import": "./dist/browser-fat/es/index_browser_fat.js",
"default": "./dist/browser-fat/cjs/index_browser_fat.cjs"
},
"./slim": {
"types": "./dist/types/main/index_browser_slim.d.ts",
"node-addons": {
"types": "./dist/types/main/index_node.d.ts",
"default": "./dist/node/index_node.cjs"
},
"import": "./dist/browser-slim/es/index_browser_slim.js",
"default": "./dist/browser-slim/cjs/index_browser_slim.cjs"
},
"./sisd.wasm": "./dist/highwayhasher_wasm_bg.wasm",
"./simd.wasm": "./dist/highwayhasher_wasm_simd_bg.wasm",
"./package.json": "./package.json"
},
"types": "./dist/types/main/index_browser_fat.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "rm -rf dist/ && npm run build:wasm && npm run build:wasm-simd && npm run build:native && npm run build:bundle",
"build:native": "bash ./assets/build-native.sh",
"build:wasm": "wasm-pack build -t web --out-dir ../main/wasm src/wasm",
"build:wasm-simd": "RUSTFLAGS='-C target-feature=+simd128' npm run build:wasm-simd-ci",
"build:wasm-simd-ci": "wasm-pack build -t web --out-name highwayhasher_wasm_simd --out-dir ../main/wasm-simd src/wasm",
"build:bundle": "rollup -c --bundleConfigAsCjs",
"compressed-size": "npm run build && find dist -iname '*.js' -exec npx terser@latest --compress --mangle --output {} -- {} \\;",
"optimize": "wasm-opt -Os src/main/wasm/highwayhasher_wasm_bg.wasm -o tmp.wasm && mv tmp.wasm src/main/wasm/highwayhasher_wasm_bg.wasm && wasm-opt --enable-simd -Os src/main/wasm-simd/highwayhasher_wasm_simd_bg.wasm -o tmp.wasm && mv tmp.wasm src/main/wasm-simd/highwayhasher_wasm_simd_bg.wasm",
"test": "npm run build && npm run test:inplace",
"test:inplace": "npm run test:native && npm run test:browser && npm run test:types",
"test:types": "tsc",
"test:native": "vitest run --config vite.node.config.ts",
"test:browser": "vitest run --browser.name=firefox --browser.provider=playwright --browser.headless",
"prepublishOnly": "npm test && npm run optimize && ./assets/download-releases.sh && npm run build:bundle"
},
"keywords": [
"highwayhash",
"hash",
"crypto",
"wasm"
],
"author": "Nick Babcock <[email protected]>",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-typescript": "12.1.2",
"@rollup/plugin-wasm": "6.2.2",
"@types/node": "22.10.2",
"@vitest/browser": "2.1.8",
"playwright": "1.49.1",
"rollup": "4.29.1",
"tslib": "2.8.1",
"typescript": "5.7.2",
"vitest": "2.1.8"
}
}