Skip to content

chore(deps): make sure transitive dependency installed: node-fetch-h2 #702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jy-toss
Copy link

@jy-toss jy-toss commented Apr 20, 2024

Purpose

This PR fixes #518.

Background

swagger-typescript-api "requires" node-fetch-h2, which is installed via other dependencies like swagger2openapi. However, node-fetch-h2- is not specified in any of dependencies. So when I tried to install and "requires" swagger-typescript-api, my package manager couldn't find node-fetch-h2 for swagger-typescript-api.

The following shows node-fetch-h2 is not installed as deps but installed by other deps.

% date; git fetch swagger-typescript-api master
Sat Apr 20 18:01:58 KST 2024
From https://github.com/acacode/swagger-typescript-api
 * branch            master     -> FETCH_HEAD

% date; git checkout swagger-typescript-api/master
Sat Apr 20 18:02:02 KST 2024
HEAD is now at 2b6db23 Merge pull request #581 from acacode/next

% date; ag node-fetch-h2
Sat Apr 20 18:02:09 KST 2024
package-lock.json
2750:    "node_modules/node-fetch-h2": {
2752:      "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz",
2807:        "node-fetch-h2": "^2.3.0",
3757:        "node-fetch-h2": "^2.3.0",

src/util/request.js
3:const fetch = require('node-fetch-h2');

% date; npm why node-fetch-h2
Sat Apr 20 18:05:19 KST 2024
[email protected]
node_modules/node-fetch-h2
  node-fetch-h2@"^2.3.0" from [email protected]
  node_modules/oas-resolver
    oas-resolver@"^2.5.6" from [email protected]
    node_modules/oas-validator
      oas-validator@"^5.0.8" from [email protected]
      node_modules/swagger2openapi
        swagger2openapi@"7.0.8" from the root project
    oas-resolver@"^2.5.6" from [email protected]
    node_modules/swagger2openapi
      swagger2openapi@"7.0.8" from the root project
  node-fetch-h2@"^2.3.0" from [email protected]
  node_modules/swagger2openapi
    swagger2openapi@"7.0.8" from the root project

@nicky1038
Copy link
Contributor

@jy-toss Hi! Please check out this PR: #693
node-fetch-h2 is a very old version of node-fetch - it is a fork with no changes which is 250+ commits behind the original repo. I had problems with node-fetch-h2 which I described in my PR and I propose to use the latest node-fetch v2 instead.

@jy-toss
Copy link
Author

jy-toss commented Apr 20, 2024

oh great, #693 removes node-fetch-h2. I'm closing this PR.

@jy-toss jy-toss closed this Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node-fetch-h2 not installed
2 participants