Skip to content

Commit

Permalink
ULMS-3012 Updated nodejs version to v20.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkonst committed May 16, 2024
1 parent 154d0f1 commit 16ee2dc
Show file tree
Hide file tree
Showing 32 changed files with 4,561 additions and 11,389 deletions.
9 changes: 8 additions & 1 deletion .babelrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
"@babel/preset-env",
{
"modules": false,
"targets": "last 2 versions"
"targets": {
"chrome": 87,
"edge": 91,
"firefox": 84,
"ios": 11,
"opera": 87,
"safari": 11
}
}
]
],
Expand Down
17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"extends": [
"airbnb-base",
"plugin:import/recommended",
"plugin:promise/recommended",
"plugin:sonarjs/recommended",
"plugin:unicorn/recommended",
"prettier"
],
"plugins": ["import", "promise", "sonarjs", "unicorn"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": "latest",
"ecmaFeatures": {
"experimentalObjectRestSpread": true
},
"sourceType": "module"
},
"rules": {
"consistent-return": "off",
"no-console": "off",
"no-restricted-syntax": "off",
"no-plusplus": [
2,
{
"allowForLoopAfterthoughts": true
}
],
"promise/always-return": "off"
}
}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
npm run pre-commit
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.15
v20.12.2
10 changes: 5 additions & 5 deletions __tests__/basic-client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Basic client suite', () => {
(endpoint, parameters, expectedParameters) => {
const resultUrl = Client.url(`/${endpoint}`, parameters)
expect(resultUrl).toBe(`${baseUrl}/${endpoint}${expectedParameters}`)
}
},
)

it('Headers should compare with labels', () => {
Expand Down Expand Up @@ -93,7 +93,7 @@ describe('Basic client suite', () => {
expect(httpClient[method]).toBeCalledWith(baseUrl, {
headers: headersWithoutLabels,
})
}
},
)

it.each(methodsWithoutDataCases)(
Expand All @@ -105,7 +105,7 @@ describe('Basic client suite', () => {
expect(httpClient[method]).toBeCalledWith(baseUrl, {
headers: { ...headersWithoutLabels, ...ulmsLabels },
})
}
},
)

it.each(methodsWithDataCases)(
Expand All @@ -115,7 +115,7 @@ describe('Basic client suite', () => {
expect(httpClient[method]).toBeCalledWith(baseUrl, data, {
headers: headersWithoutLabels,
})
}
},
)

it.each(methodsWithDataCases)(
Expand All @@ -127,6 +127,6 @@ describe('Basic client suite', () => {
expect(httpClient[method]).toBeCalledWith(baseUrl, data, {
headers: { ...headersWithoutLabels, ...ulmsLabels },
})
}
},
)
})
2 changes: 1 addition & 1 deletion __tests__/error.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Custom errors have right titles', () => {
})
it('MQTTClientError message is valid (from error)', () => {
expect(MQTTClientError.fromError(new Error('Message')).message).toEqual(
'Message'
'Message',
)
})

Expand Down
Loading

0 comments on commit 16ee2dc

Please sign in to comment.