File tree 7 files changed +21
-15
lines changed
7 files changed +21
-15
lines changed Original file line number Diff line number Diff line change 20
20
cache : " pnpm"
21
21
- run : pnpm install
22
22
- run : pnpm lint
23
- - run : pnpm typecheck
23
+ - run : pnpm test:types
24
24
- run : pnpm build
25
25
- run : pnpm vitest --coverage
26
26
- uses : codecov/codecov-action@v5
Original file line number Diff line number Diff line change 27
27
"prepack" : " unbuild" ,
28
28
"release" : " pnpm test && changelogen --release --push && pnpm publish" ,
29
29
"benchmark" : " node benchmark/object-hash.mjs" ,
30
- "test" : " pnpm lint && vitest run && pnpm typecheck " ,
31
- "typecheck " : " tsc --noEmit"
30
+ "test" : " pnpm lint && vitest run && pnpm test:types " ,
31
+ "test:types " : " tsc --noEmit"
32
32
},
33
33
"devDependencies" : {
34
34
"@types/node" : " ^22.10.5" ,
Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ export class SHA256 extends Hasher {
35
35
/**
36
36
* Resets the internal state of the hash object to initial values.
37
37
*/
38
- reset ( ) {
38
+ override reset ( ) {
39
39
super . reset ( ) ;
40
40
this . _hash = new WordArray ( [ ...H ] ) ;
41
41
}
42
42
43
- _doProcessBlock ( M : number [ ] , offset : number ) {
43
+ override _doProcessBlock ( M : number [ ] , offset : number ) {
44
44
// Shortcut
45
45
const H = this . _hash . words ;
46
46
@@ -116,7 +116,7 @@ export class SHA256 extends Hasher {
116
116
* @param {string } messageUpdate - Additional message content to include in the hash.
117
117
* @returns {WordArray } The finalised hash as a WordArray.
118
118
*/
119
- finalize ( messageUpdate : string ) : WordArray {
119
+ override finalize ( messageUpdate : string ) : WordArray {
120
120
super . finalize ( messageUpdate ) ;
121
121
122
122
const nBitsTotal = this . _nDataBytes * 8 ;
Original file line number Diff line number Diff line change 1
- import { objectHash , HashOptions } from "./object-hash" ;
1
+ import { objectHash , type HashOptions } from "./object-hash" ;
2
2
import { sha256base64 } from "../crypto/sha256" ;
3
3
4
4
/**
Original file line number Diff line number Diff line change 1
- import { objectHash , HashOptions } from "../hash/object-hash" ;
1
+ import { objectHash , type HashOptions } from "../hash/object-hash" ;
2
2
3
3
/**
4
4
* Calculates the difference between two objects and returns a list of differences.
Original file line number Diff line number Diff line change 1
- import { objectHash , HashOptions } from "../hash/object-hash" ;
1
+ import { objectHash , type HashOptions } from "../hash/object-hash" ;
2
2
/**
3
3
* Compare two objects using reference equality and stable deep hashing.
4
4
* @param {any } object1 First object
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
3
"target" : " ESNext" ,
4
- "module" : " ESNext " ,
5
- "moduleResolution " : " Node " ,
4
+ "module" : " preserve " ,
5
+ "moduleDetection " : " force " ,
6
6
"esModuleInterop" : true ,
7
- "types" : [" node" ],
8
- "strict" : true
9
- },
10
- "include" : [" src" ]
7
+ "allowSyntheticDefaultImports" : true ,
8
+ "allowJs" : true ,
9
+ "resolveJsonModule" : true ,
10
+ "strict" : true ,
11
+ "isolatedModules" : true ,
12
+ "verbatimModuleSyntax" : true ,
13
+ "forceConsistentCasingInFileNames" : true ,
14
+ "noImplicitOverride" : true ,
15
+ "noEmit" : true
16
+ }
11
17
}
You can’t perform that action at this time.
0 commit comments