File tree Expand file tree Collapse file tree 6 files changed +24
-35
lines changed Expand file tree Collapse file tree 6 files changed +24
-35
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = require ( '@chubbyts/chubbyts-eslint/dist/eslintrc' ) . default ;
Original file line number Diff line number Diff line change @@ -3,29 +3,15 @@ name: CI
3
3
on :
4
4
push :
5
5
pull_request :
6
+ branches :
7
+ - master
6
8
schedule :
7
9
- cron : ' 0 0 * * *'
8
10
9
11
jobs :
10
- node14 :
11
- name : Node 14
12
- runs-on : ubuntu-20.04
13
- steps :
14
- - name : checkout
15
- uses : actions/checkout@v3
16
- - name : checkout node
17
- uses : actions/setup-node@v3
18
- with :
19
- node-version : ' 14'
20
- - run : npm install
21
- - run : npm run cs
22
- - run : npm test -- --coverage --no-cache
23
- - run : npm run infection
24
- env :
25
- STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
26
12
node16 :
27
13
name : Node 16
28
- runs-on : ubuntu-20 .04
14
+ runs-on : ubuntu-22 .04
29
15
steps :
30
16
- name : checkout
31
17
uses : actions/checkout@v3
@@ -34,14 +20,10 @@ jobs:
34
20
with :
35
21
node-version : ' 16'
36
22
- run : npm install
37
- - run : npm run cs
38
- - run : npm test -- --coverage --no-cache
39
- - run : npm run infection
40
- env :
41
- STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
23
+ - run : npm test
42
24
node18 :
43
25
name : Node 18
44
- runs-on : ubuntu-20 .04
26
+ runs-on : ubuntu-22 .04
45
27
steps :
46
28
- name : checkout
47
29
uses : actions/checkout@v3
50
32
with :
51
33
node-version : ' 18'
52
34
- run : npm install
35
+ - run : npm run lint
53
36
- run : npm run cs
54
37
- run : npm test -- --coverage --no-cache
55
38
- run : npm run infection
Original file line number Diff line number Diff line change @@ -23,14 +23,14 @@ It converts any throwable into an Error.
23
23
24
24
## Requirements
25
25
26
- * node: 14
26
+ * node: 16
27
27
28
28
## Installation
29
29
30
30
Through [ NPM] ( https://www.npmjs.com ) as [ @chubbyts/chubbyts-throwable-to-error ] [ 1 ] .
31
31
32
32
``` ts
33
- npm i @chubbyts / chubbyts - throwable - to - error @^ 1.0 . 1
33
+ npm i @chubbyts / chubbyts - throwable - to - error @^ 1.1 . 0
34
34
```
35
35
36
36
## Usage
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @chubbyts/chubbyts-throwable-to-error" ,
3
- "version" : " 1.0.1 " ,
3
+ "version" : " 1.1.0 " ,
4
4
"description" : " It converts any throwable into an Error." ,
5
5
"keywords" : [
6
6
" chubbyts" ,
13
13
"scripts" : {
14
14
"cs-fix" : " prettier --write src tests" ,
15
15
"cs" : " prettier --check src tests" ,
16
+ "lint-fix" : " eslint src tests --fix" ,
17
+ "lint" : " eslint src tests" ,
16
18
"test" : " jest" ,
17
19
"infection" : " stryker run" ,
18
20
"build" : " rm -Rf dist && tsc" ,
40
42
" dist"
41
43
],
42
44
"engines" : {
43
- "node" : " >=14 "
45
+ "node" : " >=16 "
44
46
},
45
47
"dependencies" : {},
46
48
"devDependencies" : {
47
- "@stryker-mutator/core" : " ^6.4.1" ,
48
- "@stryker-mutator/jest-runner" : " ^6.4.1" ,
49
- "@types/jest" : " ^29.5.0" ,
50
- "@types/node" : " ^18.15.3" ,
49
+ "@chubbyts/chubbyts-eslint" : " ^1.1.1" ,
50
+ "@stryker-mutator/core" : " ^6.4.2" ,
51
+ "@stryker-mutator/jest-runner" : " ^6.4.2" ,
52
+ "@types/jest" : " ^29.5.1" ,
53
+ "@types/node" : " ^20.1.1" ,
51
54
"jest" : " ^29.5.0" ,
52
- "prettier" : " ^2.8.4 " ,
53
- "ts-jest" : " ^29.0.5 " ,
54
- "typescript" : " ^4.9.5 "
55
+ "prettier" : " ^2.8.8 " ,
56
+ "ts-jest" : " ^29.1.0 " ,
57
+ "typescript" : " ^5.0.4 "
55
58
},
56
59
"publishConfig" : {
57
60
"access" : " public"
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ export const throwableToError = (e: unknown): Error => {
4
4
}
5
5
6
6
const error = new Error ( typeof e === 'object' ? `${ JSON . stringify ( e ) } ` : `${ String ( e ) } ` ) ;
7
+ // eslint-disable-next-line functional/immutable-data
7
8
error . name = typeof e ;
9
+ // eslint-disable-next-line functional/immutable-data
8
10
error . stack = undefined ;
9
11
10
12
return error ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ describe('throwableToError', () => {
27
27
e : new Array ( 'example' ) ,
28
28
error : { name : 'object' , message : '["example"]' } ,
29
29
} ,
30
- ] ) ( ` converts $e to error` , ( { e, error } ) => {
30
+ ] ) ( ' converts $e to error' , ( { e, error } ) => {
31
31
expect ( throwableToError ( e ) ) . toMatchObject ( error ) ;
32
32
} ) ;
33
33
} ) ;
You can’t perform that action at this time.
0 commit comments