File tree Expand file tree Collapse file tree 6 files changed +33
-30
lines changed Expand file tree Collapse file tree 6 files changed +33
-30
lines changed Original file line number Diff line number Diff line change 81
81
" static-method" ,
82
82
" abstract-method" ,
83
83
" protected-method" ,
84
- " private -method" ,
85
- " public -method"
84
+ " public -method" ,
85
+ " private -method"
86
86
],
87
87
"interfaces" : { "order" : " alphabetically" },
88
88
"typeLiterals" : { "order" : " alphabetically" }
Original file line number Diff line number Diff line change 4
4
" main"
5
5
],
6
6
"plugins" : [
7
- " @semantic-release/commit-analyzer" ,
7
+ [" @semantic-release/commit-analyzer" , {
8
+ "releaseRules" : [{ "scope" : " !core" , "release" : false }]
9
+ }],
8
10
" @semantic-release/release-notes-generator" ,
9
11
" semantic-release-yarn" ,
10
12
" @semantic-release/github"
Original file line number Diff line number Diff line change 22
22
"engines" : {
23
23
"node" : " >=16"
24
24
},
25
+ "packageManager" : " yarn@3.6.1" ,
25
26
"scripts" : {
26
27
"build" : " tsc -p tsconfig.prod.json" ,
27
28
"check" : " yarn compile && yarn test --forbid-only" ,
Original file line number Diff line number Diff line change @@ -95,18 +95,6 @@ export class Assertion<T> {
95
95
return this . normalized ( ) ;
96
96
}
97
97
98
- private proxyInverter ( isInverted : boolean ) : ProxyHandler < this> [ "get" ] {
99
- return ( target , p ) => {
100
- const key = isKeyOf ( target , p ) ? p : undefined ;
101
-
102
- if ( key === "inverted" ) {
103
- return isInverted ;
104
- }
105
-
106
- return key ? target [ key ] : undefined ;
107
- } ;
108
- }
109
-
110
98
/**
111
99
* Check if the value matches the given predicate.
112
100
*
@@ -535,4 +523,16 @@ export class Assertion<T> {
535
523
message : `Expected <${ prettify ( this . actual ) } > to be of type "${ typeName } "` ,
536
524
} ) ;
537
525
}
526
+
527
+ private proxyInverter ( isInverted : boolean ) : ProxyHandler < this> [ "get" ] {
528
+ return ( target , p ) => {
529
+ const key = isKeyOf ( target , p ) ? p : undefined ;
530
+
531
+ if ( key === "inverted" ) {
532
+ return isInverted ;
533
+ }
534
+
535
+ return key ? target [ key ] : undefined ;
536
+ } ;
537
+ }
538
538
}
Original file line number Diff line number Diff line change @@ -28,15 +28,6 @@ export class FunctionAssertion<T extends AnyFunction> extends Assertion<T> {
28
28
super ( actual ) ;
29
29
}
30
30
31
- private captureError < X > ( ) : X | typeof NoThrow {
32
- try {
33
- this . actual ( ) ;
34
- return NoThrow ;
35
- } catch ( error ) {
36
- return error as X ;
37
- }
38
- }
39
-
40
31
/**
41
32
* Check if the function throws when called. Optionally, you can check that
42
33
* the thrown error is strictly equal to an `Error` instance by passing it as
@@ -192,4 +183,13 @@ export class FunctionAssertion<T extends AnyFunction> extends Assertion<T> {
192
183
? new typeFactory . Factory ( captured )
193
184
: new Assertion ( captured ) as A ;
194
185
}
186
+
187
+ private captureError < X > ( ) : X | typeof NoThrow {
188
+ try {
189
+ this . actual ( ) ;
190
+ return NoThrow ;
191
+ } catch ( error ) {
192
+ return error as X ;
193
+ }
194
+ }
195
195
}
Original file line number Diff line number Diff line change @@ -17,12 +17,6 @@ export class ObjectAssertion<T extends Struct> extends Assertion<T> {
17
17
super ( actual ) ;
18
18
}
19
19
20
- private hasOwnProp ( prop : PropertyKey | undefined ) : boolean {
21
- return prop !== undefined
22
- ? Object . prototype . hasOwnProperty . call ( this . actual , prop )
23
- : false ;
24
- }
25
-
26
20
/**
27
21
* Check if the object is empty. That is, when the object doesn't have any
28
22
* properties.
@@ -458,4 +452,10 @@ export class ObjectAssertion<T extends Struct> extends Assertion<T> {
458
452
invertedError,
459
453
} ) ;
460
454
}
455
+
456
+ private hasOwnProp ( prop : PropertyKey | undefined ) : boolean {
457
+ return prop !== undefined
458
+ ? Object . prototype . hasOwnProperty . call ( this . actual , prop )
459
+ : false ;
460
+ }
461
461
}
You can’t perform that action at this time.
0 commit comments