swagger-jsdoc
Advanced tools
Comparing version 6.0.4 to 6.0.5
## Change Log | ||
### v6.0.2 (2021/01/29 11:01 +00:00) | ||
### v6.0.5 (2021/02/15 15:50 +00:00) | ||
- [#247](https://github.com/Surnet/swagger-jsdoc/pull/247) feat: support cjs and update docs (#247) (@kalinchernev) | ||
### v6.0.3 (2021/02/15 08:40 +00:00) | ||
- [#245](https://github.com/Surnet/swagger-jsdoc/pull/245) fix yaml formatting (#245) (@kalinchernev) | ||
### v6.0.2 (2021/01/29 11:02 +00:00) | ||
- [87e51e9](https://github.com/Surnet/swagger-jsdoc/commit/87e51e9688aa75994d38735369cf210a65813159) chore: prepare v6.0.2 (@kalinchernev) | ||
- [#241](https://github.com/Surnet/swagger-jsdoc/pull/241) Issue with error message when using deprecated "apis" key (#241) (@CleyFaye) | ||
@@ -6,0 +15,0 @@ |
{ | ||
"name": "swagger-jsdoc", | ||
"description": "Generates swagger doc based on JSDoc", | ||
"version": "6.0.4", | ||
"version": "6.0.5", | ||
"engines": { | ||
@@ -6,0 +6,0 @@ "node": ">=12.0.0" |
@@ -8,7 +8,2 @@ # swagger-jsdoc | ||
``` | ||
Please be aware that 6.x of the library does not yet support ESM. | ||
Please use commonjs export style and rename your definition files with `.cjs`. | ||
``` | ||
## Getting started | ||
@@ -40,2 +35,12 @@ | ||
## Node.js version requirements, CommonJS and ESM | ||
`swagger-jsdoc` 6.x requires Node.js 12.x and above. When using the CLI, the library will attempt to load the definition file in several formats: `.js`, `.cjs`, `.yaml` (or `.yml`) and `.json`. | ||
The example above follows the CommonJS format, which will work when you do not have `"type": "module"` in your `package.json`. | ||
However, if you're using ESM and have `"type": "module"`, then please change the extension to `.cjs`. | ||
Definition files in `.js` and ESM will be supported in `swagger-jsdoc` 7.x. | ||
## Installation | ||
@@ -42,0 +47,0 @@ |
@@ -117,2 +117,3 @@ const fs = require('fs'); | ||
const LOADERS = { | ||
'.js': loadCjs, // on purpose, to allow throwing by nodejs and .cjs suggestion | ||
'.cjs': loadCjs, | ||
@@ -119,0 +120,0 @@ '.json': loadJson, |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
69102
465
0
69