@redocly/openapi-core
Advanced tools
Comparing version 1.0.0-beta.41 to 1.0.0-beta.42
@@ -71,3 +71,4 @@ "use strict"; | ||
const ignoreFile = path.join(dir, exports.IGNORE_FILE); | ||
if (fs.existsSync(ignoreFile)) { | ||
/* no crash when using it on the client */ | ||
if (fs.hasOwnProperty('existsSync') && fs.existsSync(ignoreFile)) { | ||
// TODO: parse errors | ||
@@ -74,0 +75,0 @@ this.ignore = yaml.safeLoad(fs.readFileSync(ignoreFile, 'utf-8')) || {}; |
@@ -9,3 +9,3 @@ export type { BundleOutputFormat } from './utils'; | ||
export { Stats } from './rules/other/stats'; | ||
export { loadConfig, Config, LintConfig, IGNORE_FILE } from './config/config'; | ||
export { loadConfig, Config, LintConfig, RawConfig, IGNORE_FILE } from './config/config'; | ||
export { RedoclyClient } from './redocly'; | ||
@@ -12,0 +12,0 @@ export { Source, BaseResolver, Document, resolveDocument, ResolveError, YamlParseError } from './resolve'; |
@@ -17,3 +17,2 @@ "use strict"; | ||
const yaml = require("js-yaml"); | ||
const { readFile } = fs.promises; | ||
const ref_utils_1 = require("./ref-utils"); | ||
@@ -100,3 +99,3 @@ const yaml_ast_parser_1 = require("yaml-ast-parser"); | ||
else { | ||
return new Source(absoluteRef, yield readFile(absoluteRef, 'utf-8')); | ||
return new Source(absoluteRef, yield fs.promises.readFile(absoluteRef, 'utf-8')); | ||
} | ||
@@ -103,0 +102,0 @@ } |
{ | ||
"name": "@redocly/openapi-core", | ||
"version": "1.0.0-beta.41", | ||
"version": "1.0.0-beta.42", | ||
"description": "", | ||
@@ -48,2 +48,2 @@ "main": "lib/index.js", | ||
} | ||
} | ||
} |
@@ -192,3 +192,4 @@ import * as fs from 'fs'; | ||
if (fs.existsSync(ignoreFile)) { | ||
/* no crash when using it on the client */ | ||
if (fs.hasOwnProperty('existsSync') && fs.existsSync(ignoreFile)) { | ||
// TODO: parse errors | ||
@@ -405,3 +406,2 @@ this.ignore = yaml.safeLoad(fs.readFileSync(ignoreFile, 'utf-8')) as Record< | ||
} | ||
let rawConfig: RawConfig = {}; | ||
@@ -417,3 +417,2 @@ // let resolvedPlugins: Plugin[] = []; | ||
} | ||
if (customExtends !== undefined) { | ||
@@ -438,3 +437,2 @@ rawConfig.lint = rawConfig.lint || {}; | ||
} | ||
return new Config(rawConfig, configPath); | ||
@@ -441,0 +439,0 @@ } |
@@ -10,3 +10,3 @@ export type { BundleOutputFormat } from './utils'; | ||
export { loadConfig, Config, LintConfig, IGNORE_FILE } from './config/config'; | ||
export { loadConfig, Config, LintConfig, RawConfig, IGNORE_FILE } from './config/config'; | ||
export { RedoclyClient } from './redocly'; | ||
@@ -13,0 +13,0 @@ export { Source, BaseResolver, Document, resolveDocument, ResolveError, YamlParseError } from './resolve'; |
@@ -5,3 +5,2 @@ import * as fs from 'fs'; | ||
import * as yaml from 'js-yaml'; | ||
const { readFile } = fs.promises; | ||
import { OasRef } from './typings/openapi'; | ||
@@ -105,3 +104,3 @@ import { isRef, joinPointer, escapePointer, parseRef, isAbsoluteUrl } from './ref-utils'; | ||
} else { | ||
return new Source(absoluteRef, await readFile(absoluteRef, 'utf-8')); | ||
return new Source(absoluteRef, await fs.promises.readFile(absoluteRef, 'utf-8')); | ||
} | ||
@@ -108,0 +107,0 @@ } catch (error) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1882114