Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Conversation

@tschaffter
Copy link
Collaborator

@tschaffter tschaffter commented May 12, 2021

Fixes #75
Fixes #56

Changelogs

  • Update npm and github-actions dependencies
  • Remove deprecated dependency mocha-webpack (last updated 3 years ago)
    • Our only mocha test no longer run successfully after updating webpack
    • This breaks the npm script npm run test, which should be fixed in a separated PR (need to find an alternative to mocha-webpack)
  • Made early preparation for future release 0.3.0

@tschaffter tschaffter self-assigned this May 12, 2021
@tschaffter
Copy link
Collaborator Author

$ ncu -u
Upgrading /home/tschaffter/dev2/tschaffter/gh-openapi-docs/package.json
[====================] 36/36 100%

 @babel/runtime                     ^7.6.3  →   ^7.14.0
 @redocly/openapi-cli                0.8.4  →   0.12.16
 chalk                               2.4.2  →     4.1.1
 is-ci                              ^2.0.0  →    ^3.0.0
 loader-utils                       ^1.4.0  →    ^2.0.0
 lodash                           ^4.17.19  →  ^4.17.21
 oas-linter                         ^3.0.2  →    ^3.2.1
 oas-resolver                       ^2.2.7  →    ^2.5.4
 oas-validator                      ^3.3.3  →    ^5.0.5
 redoc-cli                          ^0.9.7  →   ^0.11.4
 shelljs                            ^0.7.0  →    ^0.8.4
 swagger-ui-dist                    3.24.0  →    3.48.0
 update-notifier                     3.0.1  →     5.1.0
 yargs-parser                      ^19.0.4  →   ^20.2.7
 @babel/cli                        ^7.10.1  →  ^7.13.16
 @babel/compat-data                ^7.10.1  →   ^7.14.0
 @babel/core                       ^7.10.2  →   ^7.14.0
 @babel/node                       ^7.10.1  →  ^7.13.13
 @babel/plugin-transform-runtime    ^7.8.3  →  ^7.13.15
 @babel/preset-env                  ^7.8.7  →   ^7.14.1
 @babel/register                    ^7.9.0  →  ^7.13.16
 babel-loader                       ^8.0.6  →    ^8.2.2
 cross-env                          ^7.0.2  →    ^7.0.3
 mocha                              ^7.1.1  →    ^8.4.0
 nyc                               ^15.0.1  →   ^15.1.0
 pkg                                ^4.4.4  →    ^5.1.0
 webpack                           ^4.42.0  →   ^5.37.0
 webpack-cli                       ^3.3.11  →    ^4.7.0
 webpack-node-externals             ^1.7.2  →    ^3.0.0

Run npm install to install new versions.

After ncu -u and npm install, there are still a few messages about deprecated dependencies:

$ npm install
npm WARN deprecated @babel/[email protected]: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/mocha-webpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of mocha@>=4 <=5 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/redoc-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1264 packages from 491 contributors and audited 1266 packages in 22.551s

98 packages are looking for funding
  run `npm fund` for details

found 17 vulnerabilities (1 low, 2 moderate, 13 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

@tschaffter
Copy link
Collaborator Author

The output seems correctly generated now that I have created .spec-docs.json.

$ node ./dist/bundle.js
Preparing docs for API spec at 'test/test-spec/combined/openapi.yaml' (75-update-dependencies)

Cloning 'gh-pages' branch into '/home/tschaffter/dev2/tschaffter/gh-openapi-docs/.ghpages-tmp'
Cloning into '.'...
cp: no such file or directory: preview

Branch folder:
/home/tschaffter/dev2/tschaffter/gh-openapi-docs/preview/75-update-dependencies/

API spec (root) location:
/home/tschaffter/dev2/tschaffter/gh-openapi-docs/test/test-spec/combined/openapi.yaml

Bundling API spec...

Storing bundled 'openapi.json' and 'openapi.yaml' in:
/home/tschaffter/dev2/tschaffter/gh-openapi-docs/preview/75-update-dependencies/

Generating standalone ReDoc HTML:
/home/tschaffter/dev2/tschaffter/gh-openapi-docs/preview/75-update-dependencies/docs/index.html

Done (in 2s.)

Output:

$ ls -alR preview/75-update-dependencies/
preview/75-update-dependencies/:
total 36
drwxr-xr-x 3 tschaffter tschaffter  4096 May 11 21:48 .
drwxr-xr-x 3 tschaffter tschaffter  4096 May 11 21:43 ..
drwxr-xr-x 2 tschaffter tschaffter  4096 May 11 21:48 docs
-rw-r--r-- 1 tschaffter tschaffter 10892 May 11 21:48 openapi.json
-rw-r--r-- 1 tschaffter tschaffter  8603 May 11 21:48 openapi.yaml

preview/75-update-dependencies/docs:
total 1308
drwxr-xr-x 2 tschaffter tschaffter    4096 May 11 21:48 .
drwxr-xr-x 3 tschaffter tschaffter    4096 May 11 21:48 ..
-rw-r--r-- 1 tschaffter tschaffter 1329941 May 11 21:48 index.html

TODO

Investigate why running the tool without the config file - which I think is optional? - does not generate files.

Note: This is likely because the the tool didn't know where to find the file openapi.yaml. Yet the tool didn't report an error and the output of echo $? after running the tool is 0, which indicates that the tool exited successfully. Probably linked to #60.

@tschaffter tschaffter requested a review from jb-adams May 12, 2021 04:59
@tschaffter tschaffter enabled auto-merge (squash) May 12, 2021 04:59
@tschaffter tschaffter disabled auto-merge May 12, 2021 04:59
@tschaffter tschaffter marked this pull request as draft August 12, 2021 02:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update dependencies and configure Dependabot nodejs version must be > 12 instead of >8

1 participant