Skip to content

Commit

Permalink
chore: upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
vanthome committed Nov 13, 2024
1 parent e593fda commit a6a76e5
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 600 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.cjs

This file was deleted.

22 changes: 22 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// @ts-check

import eslint from '@eslint/js';
import { RuleTester } from 'eslint';
import tseslint from 'typescript-eslint';

const rules = tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
);

rules.push(
{
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"prefer-rest-params": "off",
}
}
);

export default rules;
784 changes: 205 additions & 579 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"dev": "cross-env NODE_ENV=development nodemon --watch './src/**/*.ts' --exec node --loader ts-node/esm ./src/start.ts",
"start": "node lib/start.cjs",
"test": "vitest",
"lint": "eslint"
"lint": "eslint src"
},
"dependencies": {
"@restorecommerce/grpc-client": "2.2.5",
"@restorecommerce/logger": "1.3.2",
"@restorecommerce/rc-grpc-clients": "5.1.38",
"@restorecommerce/rc-grpc-clients": "5.1.42",
"@restorecommerce/service-config": "1.0.16",
"ldapjs": "^3.0.7",
"nconf": "^0.12.1"
Expand All @@ -39,20 +39,17 @@
"@semantic-release-plus/docker": "^3.1.3",
"@types/ldapjs": "^3.0.6",
"@types/nconf": "0.10.7",
"@typescript-eslint/eslint-plugin": "8.13.0",
"@typescript-eslint/eslint-plugin-tslint": "^7.0.2",
"@typescript-eslint/parser": "8.13.0",
"@vitest/coverage-v8": "2.1.4",
"@typescript-eslint/parser": "8.14.0",
"@vitest/coverage-v8": "2.1.5",
"cross-env": "^7.0.3",
"esbuild": "0.24.0",
"eslint": "9.14.0",
"eslint-plugin-prefer-arrow-functions": "3.4.1",
"nodemon": "3.1.7",
"npm-run-all": "^4.1.5",
"rimraf": "6.0.1",
"ts-node": "^10.9.2",
"typescript": "5.6.3",
"vitest": "2.1.4"
"typescript": "^5.6.3",
"vitest": "2.1.5"
},
"engines": {
"node": ">= 22.0.0"
Expand Down
4 changes: 2 additions & 2 deletions src/external.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const getUsers = async (ctx: Context, name?: string): Promise<any[]> => {
}

// Some servers just want one of these
for (let idAttribute of ['entryuuid', 'nsuniqueid', 'objectguid', 'guid', 'ipauniqueid']) {
for (const idAttribute of ['entryuuid', 'nsuniqueid', 'objectguid', 'guid', 'ipauniqueid']) {
attributes[idAttribute] = user.payload.id;
}

Expand Down Expand Up @@ -103,7 +103,7 @@ export const getGroups = async (ctx: Context, name?: string): Promise<any[]> =>
});

// Some servers just want one of these
for (let idAttribute of ['entryuuid', 'nsuniqueid', 'objectguid', 'guid', 'ipauniqueid']) {
for (const idAttribute of ['entryuuid', 'nsuniqueid', 'objectguid', 'guid', 'ipauniqueid']) {
attributes[idAttribute] = role.payload.id;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ldap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const mountPaths = (ctx: Context) => {
*/
const bind = (ctx: Context) => {
ctx.server.bind(ctx.cfg.get('ldap:base_dn'), async (req: any, res: any, next: any) => {
let dn = (req.dn instanceof ldapjs.DN) ? req.dn : ldapjs.parseDN(req.dn);
const dn = (req.dn instanceof ldapjs.DN) ? req.dn : ldapjs.parseDN(req.dn);
if (await testCredentials(ctx, dn, req.credentials)) {
res.end();
return next();
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const serializeKeys = <T>(obj: T): T => {
...obj
};

for (let key of Object.keys(out)) {
for (const key of Object.keys(out)) {
if (typeof out[key] === 'object') {
if (Array.isArray(out[key])) {
if (!(out[key].length > 0 && typeof out[key][0] !== 'object')) {
Expand Down

0 comments on commit a6a76e5

Please sign in to comment.