fix(core): update

This commit is contained in:
Philipp Kunz 2023-04-11 18:46:15 +02:00
parent 2b44caf70a
commit 3af21511c0
8 changed files with 4458 additions and 18069 deletions

View File

@ -5,7 +5,7 @@
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "isohash",
"shortDescription": "a hash package that works cross environment",
"description": "a hash package that works cross environment",
"npmPackagename": "@pushrocks/isohash",
"license": "MIT",
"projectDomain": "push.rocks"

18041
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,16 +13,15 @@
"build": "(tsbuild --web)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.60",
"@gitzone/tstest": "^1.0.69",
"@pushrocks/tapbundle": "^5.0.2",
"@types/node": "^17.0.23",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsrun": "^1.2.39",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.15.11"
},
"dependencies": {
"@pushrocks/smartenv": "^5.0.0",
"@pushrocks/smarthash": "^2.1.10"
"@pushrocks/smartenv": "^5.0.5",
"@pushrocks/smarthash": "^3.0.2"
},
"browserslist": [
"last 1 chrome versions"

4430
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/isohash',
version: '2.0.1',
description: 'a hash package that works cross environment'
}

View File

@ -1,7 +1,7 @@
import * as plugins from './isohash.plugins.js';
const hex = (buffer: ArrayBuffer) => {
const hexCodes = [];
const hexCodes: string[] = [];
const view = new DataView(buffer);
for (let i = 0; i < view.byteLength; i += 4) {
// Using getUint32 reduces the number of iterations needed (we process 4 bytes each time)
@ -30,7 +30,7 @@ export const sha256FromString = async (stringArg: string): Promise<string> => {
const result = hex(hash);
return result;
} else if (smartenv.isNode) {
const smarthashModule = await smartenv.getSafeNodeModule('@pushrocks/smarthash');
const smarthashModule: typeof import('@pushrocks/smarthash') = await smartenv.getSafeNodeModule('@pushrocks/smarthash');
const result = await smarthashModule.sha256FromString(stringArg);
return result;
}

10
tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}