Skip to content

Commit

Permalink
DD-272 Updating dependencies
Browse files Browse the repository at this point in the history
Drop Node 14, 16 and 18 and allowing only 20.x || 22.x  and updating the following dependencies:
debug ^4.3.4 -> ^4.3.7
glob ^10.4.5 -> ^11.0.0
eslint ^8.57.0 -> ^9.11.1
Adding eslint-define-config and replacing .eslintrc with eslint.config.js
Adding Husky ^9.1.6 and mpo-node-standards ^2.0.0 then adding  ./husky/pre-push
nyc ^17.0.0 -> ^17.1.0
sinon ^18.0.0 -> ^19.0.2
globals ^15.9.0
  • Loading branch information
KLV96 committed Sep 26, 2024
1 parent 0da4356 commit 556a9d1
Show file tree
Hide file tree
Showing 12 changed files with 958 additions and 643 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

25 changes: 0 additions & 25 deletions .eslintrc

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ build/Release
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
.idea/

# Users Environment Variables
.lock-wscript
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
27 changes: 27 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
languageOptions: {
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
},
ignores: ['/coverage/**'],
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^(err|req|res|next)$' }],
'no-mixed-requires': ['error', { allowCall: true }],
quotes: ['error', 'single'],
'no-trailing-spaces': 'error',
indent: 'error',
'linebreak-style': ['error', 'unix'],
semi: ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'keyword-spacing': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never' }],
'no-mixed-spaces-and-tabs': 'error',
'comma-spacing': ['error', { before: false, after: true }],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'one-var': ['error', { initialized: 'never' }],
'no-var': 'error',
},
};
2 changes: 1 addition & 1 deletion lib/formatters/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = function (options = {}) {
return function JSONFormatter(meta) {
try {
return JSON.stringify(meta, null, options.indent || 2 );
} catch (e) {
} catch {
return;
}
};
Expand Down
2 changes: 1 addition & 1 deletion lib/interpolate.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interpolate.stringify = function (obj, {maxLength, maxObjects = 10, circular = '
};
try {
return JSON.stringify(obj, replacer, indent);
} catch (e) {
} catch {
return;
}
};
Expand Down
4 changes: 2 additions & 2 deletions lib/module-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ moduleName.getStack = function () {
Error.prepareStackTrace = function (err, stack) { return stack; };
const err = new Error();
stack = err.stack;
} catch (e) { /* eslint "no-empty":0 */ }
} catch { /* eslint "no-empty":0 */ }

Error.prepareStackTrace = prepareStackTrace;
return stack;
Expand Down Expand Up @@ -58,7 +58,7 @@ moduleName.getName = function (level) {

const packageData = require(packageFile);
return packageData.name;
} catch (e) {
} catch {
return UNKNOWN;
}
};
Expand Down
2 changes: 1 addition & 1 deletion lib/transports/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class FileTransport extends StreamTransport {
try {
logfileDate = fs.statSync(this._filename).mtime;
debug('Existing log file date', logfileDate);
} catch (e) {
} catch {
debug('No existing log file');
}
return logfileDate;
Expand Down
Loading

0 comments on commit 556a9d1

Please sign in to comment.