Skip to content

Commit

Permalink
feat: upgrade project dependencies (#862)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: the library is set to use Node 18 and above, deprecating support for Node 16. Also, some libraries were replaced that might be in use by your project with previous versions.

Co-authored-by: Yaniv Franco <yaniv.franco@transmitsecurity.com>
Co-authored-by: Baruch Odem <baruchiro@gmail.com>
  • Loading branch information
3 people committed Jul 11, 2024
1 parent 3b9301a commit de0e614
Show file tree
Hide file tree
Showing 51 changed files with 7,069 additions and 21,475 deletions.
100 changes: 58 additions & 42 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
module.exports = {
root: true,
"rules": {
"import/prefer-default-export": 0,
"no-nested-ternary": 0,
"class-methods-use-this": 0,
"arrow-body-style": 0,
"no-shadow": 0,
"no-await-in-loop": 0,
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
rules: {
'import/prefer-default-export': 0,
'no-multiple-empty-lines': 0,
'no-nested-ternary': 0,
'class-methods-use-this': 0,
'arrow-body-style': 0,
'no-shadow': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
"operator-linebreak": ["error", "after"],
"max-len": ["error", 120, 2, {
"ignoreUrls": true,
"ignoreComments": true,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignorePattern": "^(async )?function "
'operator-linebreak': ['error', 'after'],
'max-len': ['error', 120, 2, {
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignorePattern: '^(async )?function ',
}],
"linebreak-style": process.platform === "win32"? 0: 2,
"quote-props": ["error", "consistent-as-needed"],
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/member-delimiter-style": [ "error", {
'linebreak-style': process.platform === 'win32' ? 0 : 2,
'quote-props': ['error', 'consistent-as-needed'],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/restrict-template-expressions': ['error', {
allowNever: true,
}],
'@typescript-eslint/consistent-type-imports': ['error', {
fixStyle: 'inline-type-imports',
}],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'semi',
requireLast: true,
Expand All @@ -37,24 +50,27 @@ module.exports = {
delimiter: 'comma',
requireLast: false,
},
}]
}],
},
"globals": {
"document": true,
"window": true,
"fetch": true,
"Headers": true
globals: {
document: true,
window: true,
fetch: true,
Headers: true,
},
"env": {
"jest": true
env: {
jest: true,
},
parserOptions: {
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
extends: ['airbnb-typescript/base',
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"]
}
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/errors',
],

};
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.19.0
v18.19.0
17 changes: 8 additions & 9 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
/** @type {import('jest').Config} */
const config = {
preset: 'ts-jest/presets/js-with-babel',
clearMocks: true,
coverageDirectory: 'coverage',
rootDir: './src',
transform: {
'^.+\\.ts$': 'ts-jest'
'^.+\\.ts$': ['ts-jest', {
babelConfig: true,
}],
},
setupFiles: [
setupFilesAfterEnv: [
'./tests/jest-setup.ts',
],
testEnvironment: 'node',
globals: {
'ts-jest': {
babelConfig: true,
}
},
};

module.exports = config;
Loading

0 comments on commit de0e614

Please sign in to comment.