@apidevtools/json-schema-ref-parser 14.2.0 → 14.2.1

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.
@@ -41,7 +41,13 @@ exports.default = {
41
41
  return js_yaml_1.default.load(data, { schema: js_yaml_2.JSON_SCHEMA });
42
42
  }
43
43
  catch (e) {
44
- throw new errors_js_1.ParserError(e?.message || "Parser Error", file.url);
44
+ try {
45
+ // fallback to non JSON_SCHEMA
46
+ return js_yaml_1.default.load(data);
47
+ }
48
+ catch (e) {
49
+ throw new errors_js_1.ParserError(e?.message || "Parser Error", file.url);
50
+ }
45
51
  }
46
52
  }
47
53
  else {
@@ -42,7 +42,12 @@ export default {
42
42
  try {
43
43
  return yaml.load(data, { schema: JSON_SCHEMA });
44
44
  } catch (e: any) {
45
- throw new ParserError(e?.message || "Parser Error", file.url);
45
+ try {
46
+ // fallback to non JSON_SCHEMA
47
+ return yaml.load(data);
48
+ } catch (e: any) {
49
+ throw new ParserError(e?.message || "Parser Error", file.url);
50
+ }
46
51
  }
47
52
  } else {
48
53
  // data is already a JavaScript value (object, array, number, null, NaN, etc.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apidevtools/json-schema-ref-parser",
3
- "version": "14.2.0",
3
+ "version": "14.2.1",
4
4
  "description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
5
5
  "scripts": {
6
6
  "prepublishOnly": "yarn build",
@@ -74,27 +74,27 @@
74
74
  },
75
75
  "devDependencies": {
76
76
  "@eslint/compat": "^1.3.2",
77
- "@eslint/js": "^9.33.0",
77
+ "@eslint/js": "^9.35.0",
78
78
  "@types/eslint": "^9.6.1",
79
79
  "@types/js-yaml": "^4.0.9",
80
80
  "@types/json-schema": "^7.0.15",
81
81
  "@types/node": "^24",
82
- "@typescript-eslint/eslint-plugin": "^8.39.1",
83
- "@typescript-eslint/parser": "^8.39.1",
82
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
83
+ "@typescript-eslint/parser": "^8.43.0",
84
84
  "@vitest/coverage-v8": "^3.2.4",
85
85
  "cross-env": "^10.0.0",
86
- "eslint": "^9.33.0",
86
+ "eslint": "^9.35.0",
87
87
  "eslint-config-prettier": "^10.1.8",
88
88
  "eslint-plugin-import": "^2.32.0",
89
89
  "eslint-plugin-prettier": "^5.5.4",
90
90
  "eslint-plugin-promise": "^7.2.1",
91
91
  "eslint-plugin-unused-imports": "^4.2.0",
92
- "globals": "^16.3.0",
92
+ "globals": "^16.4.0",
93
93
  "jsdom": "^26.1.0",
94
94
  "prettier": "^3.6.2",
95
95
  "rimraf": "^6.0.1",
96
96
  "typescript": "^5.9.2",
97
- "typescript-eslint": "^8.39.1",
97
+ "typescript-eslint": "^8.43.0",
98
98
  "vitest": "^3.2.4"
99
99
  },
100
100
  "release": {
@@ -108,5 +108,5 @@
108
108
  "@semantic-release/github"
109
109
  ]
110
110
  },
111
- "packageManager": "yarn@4.9.2"
111
+ "packageManager": "yarn@4.9.4"
112
112
  }