Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update devdeps (major) #145

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

40 changes: 40 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import jest from "eslint-plugin-jest";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
jest,
},

languageOptions: {
globals: {
...globals.node,
...jest.environments.globals.globals,
},

parser: tsParser,
ecmaVersion: 2018,
sourceType: "module",
},

rules: {},
}];
43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"author": "mi-xu",
"contributors": [
"Mircea Nistor <[email protected]>"
"Mircea Nistor"
],
"license": "ISC",
"dependencies": {
Expand All @@ -43,33 +43,34 @@
"url": "https://github.com/decentralized-identity/did-jwt-vc.git"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@noble/curves": "1.2.0",
"@babel/core": "7.26.7",
"@babel/preset-env": "7.26.7",
"@babel/preset-typescript": "7.26.0",
"@noble/curves": "1.8.1",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@types/elliptic": "6.4.16",
"@types/faker": "6.6.9",
"@types/jest": "29.5.7",
"@types/node": "20.8.10",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"@types/elliptic": "6.4.18",
"@types/faker": "6.6.11",
"@types/jest": "29.5.14",
"@types/node": "22.12.0",
"@typescript-eslint/eslint-plugin": "8.22.0",
"@typescript-eslint/parser": "8.22.0",
"cross-env": "7.0.3",
"eslint": "8.53.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-jest": "27.6.0",
"eslint-plugin-prettier": "5.0.1",
"ethr-did": "3.0.13",
"eslint": "9.19.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-jest": "28.11.0",
"eslint-plugin-prettier": "5.2.3",
"ethr-did": "3.0.25",
"faker": "6.6.6",
"jest": "29.7.0",
"microbundle": "0.15.1",
"prettier": "3.0.3",
"semantic-release": "22.0.7",
"ts-jest": "29.1.1",
"typescript": "5.2.2"
"prettier": "3.4.2",
"semantic-release": "24.2.1",
"ts-jest": "29.2.5",
"typescript": "5.7.3"
},
"engines": {
"node": ">=18"
}
},
"packageManager": "[email protected]"
}
36 changes: 18 additions & 18 deletions src/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ function deepCopy<T>(source: T): T {
return Array.isArray(source)
? source.map((item) => deepCopy(item))
: source instanceof Date
? new Date(source.getTime())
: source && typeof source === 'object'
? Object.getOwnPropertyNames(source).reduce(
(o, prop) => {
Object.defineProperty(
o,
prop,
Object.getOwnPropertyDescriptor(source, prop) as NonNullable<PropertyDescriptor>
? new Date(source.getTime())
: source && typeof source === 'object'
? Object.getOwnPropertyNames(source).reduce(
(o, prop) => {
Object.defineProperty(
o,
prop,
Object.getOwnPropertyDescriptor(source, prop) as NonNullable<PropertyDescriptor>
)
o[prop] = deepCopy(source[prop as keyof T])
return o
},
Object.create(Object.getPrototypeOf(source))
)
o[prop] = deepCopy(source[prop as keyof T])
return o
},
Object.create(Object.getPrototypeOf(source))
)
: (source as T)
: (source as T)
}

export function notEmpty<TValue>(value: TValue | null | undefined): value is TValue {
Expand Down Expand Up @@ -181,7 +181,7 @@ function normalizeJwtCredential(input: JWT, removeOriginalFields = true): Verifi
let decoded
try {
decoded = decodeJWT(input)
} catch (e) {
} catch {
throw new TypeError('unknown credential format')
}
return {
Expand Down Expand Up @@ -213,7 +213,7 @@ export function normalizeCredential(
let parsed: Record<string, unknown>
try {
parsed = JSON.parse(input)
} catch (e) {
} catch {
throw new TypeError('unknown credential format')
}
return normalizeCredential(parsed, removeOriginalFields)
Expand Down Expand Up @@ -431,7 +431,7 @@ function normalizeJwtPresentation(input: JWT, removeOriginalFields = true): Veri
let decoded
try {
decoded = decodeJWT(input)
} catch (e) {
} catch {
throw new TypeError('unknown presentation format')
}
return {
Expand Down Expand Up @@ -462,7 +462,7 @@ export function normalizePresentation(
let parsed: Record<string, unknown>
try {
parsed = JSON.parse(input)
} catch (e) {
} catch {
throw new TypeError('unknown presentation format')
}
return normalizePresentation(parsed, removeOriginalFields)
Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ export interface CreateCredentialOptions extends Partial<JWTOptions> {
* Represents the Verification Options that can be passed to the verifyCredential method.
* These options are forwarded to the lower level verification code
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export interface VerifyCredentialOptions extends JWTVerifyOptions {
/**
* When transforming the result of the verification into a W3C VerifiableCredential, this property dictates whether
Expand Down
Loading