mirror of
https://github.com/emn178/js-sha1.git
synced 2026-11-17 22:28:43 +08:00
- ESM builds and package `exports`. ### Fixed - Incorrect hash for strings with unpaired UTF-16 surrogates; they are now encoded as U+FFFD, the same as `TextEncoder`. - Detect browsers with a `process` polyfill (e.g. BrowserFS) and Electron renderers as non-Node.js environments. ### Changed - Replace Travis CI with GitHub Actions. - Update dev dependencies and fix security issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
76 lines
2.0 KiB
JSON
76 lines
2.0 KiB
JSON
{
|
|
"name": "js-sha1",
|
|
"version": "0.8.0",
|
|
"description": "A simple SHA1 hash function for JavaScript supports UTF-8 encoding.",
|
|
"main": "src/sha1.js",
|
|
"module": "build/sha1.mjs",
|
|
"exports": {
|
|
".": {
|
|
"types": "./index.d.ts",
|
|
"node": {
|
|
"import": "./build/sha1.node.mjs",
|
|
"require": "./src/sha1.js"
|
|
},
|
|
"import": "./build/sha1.mjs",
|
|
"require": "./src/sha1.js",
|
|
"default": "./src/sha1.js"
|
|
},
|
|
"./src/sha1.js": "./src/sha1.js",
|
|
"./build/sha1.min.js": "./build/sha1.min.js",
|
|
"./build/sha1.mjs": "./build/sha1.mjs",
|
|
"./build/sha1.min.mjs": "./build/sha1.min.mjs",
|
|
"./build/sha1.node.mjs": "./build/sha1.node.mjs",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"types": "./index.d.ts",
|
|
"devDependencies": {
|
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
"@rollup/plugin-terser": "^1.0.2",
|
|
"expect.js": "~0.3.1",
|
|
"mocha": "^12.0.3",
|
|
"nyc": "^18.0.0",
|
|
"requirejs": "^2.3.8",
|
|
"rollup": "^4.65.0",
|
|
"tiny-worker": "^2.3.0",
|
|
"uglify-js": "^3.19.3"
|
|
},
|
|
"scripts": {
|
|
"test": "npm run build && npm run test:coverage",
|
|
"test:runtime": "mocha tests/node-test.js && mocha tests/esm-test.mjs",
|
|
"test:coverage": "nyc --reporter=text --reporter=html --reporter=lcov npm run test:runtime",
|
|
"report": "nyc --reporter=html --reporter=text npm run test:runtime",
|
|
"build": "rollup -c && uglifyjs src/sha1.js -c -m eval --comments -o build/sha1.min.js",
|
|
"prepack": "npm run build"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/emn178/js-sha1.git"
|
|
},
|
|
"keywords": [
|
|
"sha",
|
|
"sha1",
|
|
"encryption",
|
|
"cryptography",
|
|
"HMAC"
|
|
],
|
|
"license": "MIT",
|
|
"author": "Chen, Yi-Cyuan <emn178@gmail.com>",
|
|
"homepage": "https://github.com/emn178/js-sha1",
|
|
"bugs": {
|
|
"url": "https://github.com/emn178/js-sha1/issues"
|
|
},
|
|
"nyc": {
|
|
"exclude": [
|
|
"tests"
|
|
]
|
|
},
|
|
"browser": {
|
|
"crypto": false,
|
|
"buffer": false
|
|
},
|
|
"overrides": {
|
|
"glob": "^14.0.2",
|
|
"minimatch": "^11.0.1"
|
|
}
|
|
}
|