Skip to content

Commit

Permalink
Updated dependencies implicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor-Losev committed Apr 9, 2024
1 parent e315263 commit 9e063fa
Show file tree
Hide file tree
Showing 4 changed files with 6,042 additions and 3,372 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ documentation serve

### Compatibility

This tool should be compatible with Node.js version 14. This tool has not been tested with Node.js version 16.
This tool should be compatible with Node.js version 20.

### Package Managers

Expand Down
7 changes: 7 additions & 0 deletions docs/content/releases/3.3.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**Technical Enhancements**

* Updated dependencies implicitly.

**Bug Fixes**

* Corrected inability to run on Node.js versions above 14.
10 changes: 8 additions & 2 deletions lib/generators/openapi/OpenAPIGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,18 @@ module.exports = (() => {
fileOptions.filename = fileName;
fileOptions.fileExtension = fileExtension;

const fullPath = path.resolve(this.options.docsFolder, 'tmp');

if (fileOptions.fileExtension && supportedFileExtensions.includes(fileOptions.fileExtension)) {
await generateDocumentation.call(this, filePath, this.options.docsFolder, fileOptions).finally(() => {
fs.rmdirSync(path.resolve(this.options.docsFolder, 'tmp'), { recursive: true });
if (fs.existsSync(fullPath)) {
fs.rmdirSync(fullPath, { recursive: true });
}
});
} else {
fs.rmdirSync(path.resolve(this.options.docsFolder, 'tmp'), { recursive: true });
if (fs.existsSync(fullPath)) {
fs.rmdirSync(fullPath, { recursive: true });
}

throw new Error('The CLI supports only following file extensions: [json, yaml, yml]. Open API documentation skipped.');
}
Expand Down
Loading

0 comments on commit 9e063fa

Please sign in to comment.