@scalar/openapi-parser
Advanced tools
Comparing version 0.10.7 to 0.10.8
# @scalar/openapi-parser | ||
## 0.10.8 | ||
### Patch Changes | ||
- e350f23: chore: code style | ||
## 0.10.7 | ||
@@ -4,0 +10,0 @@ |
@@ -128,6 +128,3 @@ import type { OpenAPI } from '@scalar/openapi-types'; | ||
*/ | ||
export type CommandChain<T extends Task[]> = T extends [ | ||
infer First, | ||
...infer Rest | ||
] ? First extends Task ? Rest extends Task[] ? Merge<Commands[First['name']]['result'], CommandChain<Rest>> : never : never : EmptyCommandChainResult; | ||
export type CommandChain<T extends Task[]> = T extends [infer First, ...infer Rest] ? First extends Task ? Rest extends Task[] ? Merge<Commands[First['name']]['result'], CommandChain<Rest>> : never : never : EmptyCommandChainResult; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -9,3 +9,2 @@ import { getErrors, isRequiredError, isAnyOfError, isEnumError, getSiblings, notUndefined, concatAll, getChildren } from './utils.js'; | ||
/* eslint-disable no-param-reassign */ | ||
const JSON_POINTERS_REGEX = /\/[\w_-]+(\/\d+)?/g; | ||
@@ -16,5 +15,3 @@ // Make a tree of errors from ajv errors array | ||
ajvErrors.forEach((ajvError) => { | ||
const instancePath = typeof ajvError.instancePath !== 'undefined' | ||
? ajvError.instancePath | ||
: ajvError.dataPath; | ||
const instancePath = typeof ajvError.instancePath !== 'undefined' ? ajvError.instancePath : ajvError.dataPath; | ||
// `dataPath === ''` is root | ||
@@ -21,0 +18,0 @@ const paths = instancePath === '' ? [''] : instancePath.match(JSON_POINTERS_REGEX); |
@@ -6,7 +6,3 @@ // import { codeFrameColumns } from '@babel/code-frame'; | ||
class BaseValidationError { | ||
// eslint-disable-next-line default-param-last | ||
constructor( | ||
options = { isIdentifierLocation: false }, | ||
{ data, schema, jsonAst, jsonRaw }, | ||
) { | ||
constructor(options = { isIdentifierLocation: false }, { data, schema, jsonAst, jsonRaw }) { | ||
this.options = options; | ||
@@ -23,11 +19,7 @@ this.data = data; | ||
get instancePath() { | ||
return typeof this.options.instancePath !== 'undefined' | ||
? this.options.instancePath | ||
: this.options.dataPath | ||
return typeof this.options.instancePath !== 'undefined' ? this.options.instancePath : this.options.dataPath | ||
} | ||
getError() { | ||
throw new Error( | ||
`Implement the 'getError' method inside ${this.constructor.name}!`, | ||
) | ||
throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`) | ||
} | ||
@@ -34,0 +26,0 @@ } |
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "0.10.7", | ||
"version": "0.10.8", | ||
"engines": { | ||
@@ -68,5 +68,5 @@ "node": ">=18" | ||
"tinybench": "^2.8.0", | ||
"@scalar/build-tooling": "0.1.13", | ||
"@scalar/types": "0.0.33", | ||
"@scalar/openapi-types": "0.1.7" | ||
"@scalar/openapi-types": "0.1.8", | ||
"@scalar/build-tooling": "0.1.14", | ||
"@scalar/types": "0.0.34" | ||
}, | ||
@@ -73,0 +73,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2010208
28415