-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Following the guidelines here: https://nodejs.org/api/packages.html#package-entry-points We now score 100% on skypack quality: https://docs.skypack.dev/package-authors/package-checks This shouldn't have a visible impact except for node js users who install with `--no-addons`, which will cause them to receive the Wasm hasher by default.
- Loading branch information
1 parent
c623db2
commit da16a8e
Showing
19 changed files
with
104 additions
and
115 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,33 @@ | |
"type": "git", | ||
"url": "git://github.com/nickbabcock/highwayhasher.git" | ||
}, | ||
"main": "./dist/node/cjs/index_node.js", | ||
"module": "./dist/node/es/index_node.js", | ||
"browser": { | ||
"./dist/node/cjs/index_node.js": "./dist/browser/cjs/index_browser.js", | ||
"./dist/node/es/index_node.js": "./dist/browser/es/index_browser.js" | ||
"type": "module", | ||
"main": "./dist/browser-fat/umd/index_browser_fat.js", | ||
"module": "./dist/browser-fat/es/index_browser_fat.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/browser-fat/es/main/index_browser_fat.d.ts", | ||
"node-addons": { | ||
"import": "./dist/node/es/index_node.js", | ||
"default": "./dist/node/cjs/index_node.cjs" | ||
}, | ||
"import": "./dist/browser-fat/es/index_browser_fat.js", | ||
"default": "./dist/browser-fat/cjs/index_browser_fat.js" | ||
}, | ||
"./slim": { | ||
"types": "./dist/browser-slim/es/main/index_browser_fat.d.ts", | ||
"node-addons": { | ||
"import": "./dist/node/es/index_node.js", | ||
"default": "./dist/node/cjs/index_node.cjs" | ||
}, | ||
"import": "./dist/browser-slim/es/index_browser_slim.js", | ||
"default": "./dist/browser-slim/cjs/index_browser_slim.js" | ||
}, | ||
"./sisd.wasm": "./dist/highwayhasher_wasm_bg.wasm", | ||
"./simd.wasm": "./dist/highwayhasher_wasm_simd_bg.wasm", | ||
"./package.json": "./package.json" | ||
}, | ||
"types": "./dist/browser/es/main/index_browser.d.ts", | ||
"types": "./dist/browser-fat/es/main/index_browser_fat.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
|
@@ -27,13 +47,9 @@ | |
"test": "npm run build && npm run test:inplace", | ||
"test:inplace": "npm run test:native && npm run test:types", | ||
"test:types": "tsc --noEmit tests/unit/usage.ts", | ||
"test:native": "jest", | ||
"test:native": "vitest run", | ||
"prepublishOnly": "npm test && npm run optimize && ./assets/download-releases.sh && npm run build:bundle" | ||
}, | ||
"jest": { | ||
"testRegex": "./tests/unit/.*.js$", | ||
"testEnvironment": "node" | ||
}, | ||
"keywords": [ | ||
"highwayhash", | ||
"hash", | ||
|
@@ -42,13 +58,13 @@ | |
], | ||
"author": "Nick Babcock <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@nickbabcock/plugin-wasm": "^5.2.0", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@rollup/plugin-wasm": "^5.1.2", | ||
"jest": "^27.4.4", | ||
"@types/node": "^17.0.21", | ||
"rollup": "^2.61.1", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.5.3" | ||
"typescript": "^4.5.3", | ||
"vitest": "^0.7.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type { IHash, HashCreator, HighwayLoadOptions } from "./model"; | ||
export { WasmHighwayHash, hasSimd as hasWasmSimd } from "./wasm"; | ||
export { WasmHighwayHash as HighwayHash } from "./wasm"; | ||
import wasm from "./wasm/highwayhasher_wasm_bg.wasm"; | ||
import wasmSimd from "./wasm-simd/highwayhasher_wasm_bg.wasm"; | ||
import { setWasmInit, setWasmSimdInit } from "./wasm"; | ||
|
||
// @ts-ignore | ||
setWasmInit(() => wasm()); | ||
// @ts-ignore | ||
setWasmSimdInit(() => wasmSimd()); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
export type { IHash, HashCreator, HighwayLoadOptions } from "./model"; | ||
export { WasmHighwayHash, hasSimd as hasWasmSimd } from "./wasm"; | ||
export { NativeHighwayHash as HighwayHash } from "./native"; | ||
import wasm from "./wasm/highwayhasher_wasm_bg.wasm"; | ||
import wasmSimd from "./wasm-simd/highwayhasher_wasm_bg.wasm"; | ||
import { setWasmInit, setWasmSimdInit } from "./wasm"; | ||
|
||
// @ts-ignore | ||
setWasmInit(() => wasm()); | ||
// @ts-ignore | ||
setWasmSimdInit(() => wasmSimd()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from "vite"; | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true, | ||
}, | ||
}); |