@apidevtools/json-schema-ref-parser 9.0.8 → 9.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { JSONSchema4, JSONSchema4Type, JSONSchema6, JSONSchema6Type } from "json-schema";
1
+ import { JSONSchema4, JSONSchema4Type, JSONSchema6, JSONSchema6Type, JSONSchema7, JSONSchema7Type } from "json-schema";
2
2
 
3
3
  export = $RefParser;
4
4
 
@@ -173,7 +173,7 @@ declare class $RefParser {
173
173
  // eslint-disable-next-line no-redeclare
174
174
  declare namespace $RefParser {
175
175
 
176
- export type JSONSchema = JSONSchema4 | JSONSchema6;
176
+ export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
177
177
  export type SchemaCallback = (err: Error | null, schema?: JSONSchema) => any;
178
178
  export type $RefsCallback = (err: Error | null, $refs?: $Refs) => any;
179
179
 
@@ -208,7 +208,7 @@ declare namespace $RefParser {
208
208
  file?: Partial<ResolverOptions> | boolean;
209
209
  http?: HTTPResolverOptions | boolean;
210
210
  } & {
211
- [key: string]: Partial<ResolverOptions> | boolean;
211
+ [key: string]: Partial<ResolverOptions> | HTTPResolverOptions | boolean | undefined;
212
212
  };
213
213
 
214
214
  /**
@@ -284,7 +284,7 @@ declare namespace $RefParser {
284
284
  read(
285
285
  file: FileInfo,
286
286
  callback?: (error: Error | null, data: string | null) => any
287
- ): string | Buffer | Promise<string | Buffer>;
287
+ ): string | Buffer | JSONSchema | Promise<string | Buffer | JSONSchema>;
288
288
  }
289
289
 
290
290
  export interface ParserOptions {
@@ -395,7 +395,7 @@ declare namespace $RefParser {
395
395
  *
396
396
  * @param $ref The JSON Reference path, optionally with a JSON Pointer in the hash
397
397
  */
398
- public get($ref: string): JSONSchema4Type | JSONSchema6Type
398
+ public get($ref: string): JSONSchema4Type | JSONSchema6Type | JSONSchema7Type
399
399
 
400
400
  /**
401
401
  * Sets the value at the given path in the schema. If the property, or any of its parents, don't exist, they will be created.
@@ -403,7 +403,7 @@ declare namespace $RefParser {
403
403
  * @param $ref The JSON Reference path, optionally with a JSON Pointer in the hash
404
404
  * @param value The value to assign. Can be anything (object, string, number, etc.)
405
405
  */
406
- public set($ref: string, value: JSONSchema4Type | JSONSchema6Type): void
406
+ public set($ref: string, value: JSONSchema4Type | JSONSchema6Type | JSONSchema7Type): void
407
407
  }
408
408
 
409
409
  export type JSONParserErrorType = "EUNKNOWN" | "EPARSER" | "EUNMATCHEDPARSER" | "ERESOLVER" | "EUNMATCHEDRESOLVER" | "EMISSINGPOINTER" | "EINVALIDPOINTER";
@@ -45,7 +45,7 @@ module.exports = {
45
45
 
46
46
  if (typeof data === "string") {
47
47
  try {
48
- return yaml.safeLoad(data);
48
+ return yaml.load(data);
49
49
  }
50
50
  catch (e) {
51
51
  throw new ParserError(e.message, file.url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apidevtools/json-schema-ref-parser",
3
- "version": "9.0.8",
3
+ "version": "9.0.9",
4
4
  "description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
5
5
  "keywords": [
6
6
  "json",
@@ -76,9 +76,12 @@
76
76
  "@jsdevtools/ono": "^7.1.3",
77
77
  "@types/json-schema": "^7.0.6",
78
78
  "call-me-maybe": "^1.0.1",
79
- "js-yaml": "^3.13.1"
79
+ "js-yaml": "^4.1.0"
80
80
  },
81
81
  "release": {
82
+ "branches": [
83
+ "main"
84
+ ],
82
85
  "plugins": [
83
86
  "@semantic-release/commit-analyzer",
84
87
  "@semantic-release/release-notes-generator",