Skip to content

fix: req-real-ip Request type#70868

Closed
lacherogwu wants to merge 8 commits intoDefinitelyTyped:masterfrom
lacherogwu:feature/req-real-ip
Closed

fix: req-real-ip Request type#70868
lacherogwu wants to merge 8 commits intoDefinitelyTyped:masterfrom
lacherogwu:feature/req-real-ip

Conversation

@lacherogwu
Copy link
Copy Markdown
Contributor

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

Context

I have noticed that the types do not match if I pass a request object of a lib such as Fastify/Express so I added only the necessary parts.

@lacherogwu lacherogwu changed the title fix: Request type fix: req-real-ip Request type Oct 11, 2024
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Oct 11, 2024

@lacherogwu Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ❌ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by type definition owners, DT maintainers or others

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 70868,
  "author": "lacherogwu",
  "headCommitOid": "8a5e63abc2b0b9cf5248acb8cffaad5bb27f9a50",
  "mergeBaseOid": "7d37486ac2997c2baaf472a1cbd57137429895a0",
  "lastPushDate": "2024-10-11T09:11:38.000Z",
  "lastActivityDate": "2024-10-21T08:10:03.000Z",
  "hasMergeConflict": true,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "req-real-ip",
      "kind": "edit",
      "files": [
        {
          "path": "types/req-real-ip/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/req-real-ip/req-real-ip-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "lacherogwu"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 2406983118,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. New Definition This PR creates a new definition package. labels Oct 11, 2024
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @lacherogwu — you're the only owner, but it would still be good if you find someone to review this PR in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)

@typescript-bot
Copy link
Copy Markdown
Contributor

@lacherogwu Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day!

@typescript-bot typescript-bot added Author is Owner The author of this PR is a listed owner of the package. No Other Owners This DT module only has one owner, so we can't have someone verify the change. and removed Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. New Definition This PR creates a new definition package. labels Oct 11, 2024
@hkleungai
Copy link
Copy Markdown
Contributor

hkleungai commented Oct 16, 2024

Hi @lacherogwu, I think req-real-ip is not a valid npm package. Due to how DT works, I think this newly added package breaks my other PR on @types/node update. See the log.

Error in req-real-ip
Error: Package @types/req-real-ip is not marked as non-npm, but no implementation package was found on npm. If these types are not for an npm package, please add "nonNpm": true to the package.json. Otherwise, ensure the name of this package matches the name of the npm package.
at combineErrorsAndWarnings (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/.pnpm/@DefinitelyTyped+dtslint@0.2.23_typescript@5.7.0-dev.20241016/node_modules/@definitelytyped/dtslint/src/index.ts:259:26)
at runTests (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/.pnpm/@DefinitelyTyped+dtslint@0.2.23_typescript@5.7.0-dev.20241016/node_modules/@definitelytyped/dtslint/src/index.ts:250:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
 ELIFECYCLE  Command failed with exit code 1.

Would you mind fixing it by adding "nonNpm": true into the package.json?

I think such fix is quite critical, coz this package at this moment essentially blocks any PR modifying @types/node from having a successful CI build.

@jakebailey
Copy link
Copy Markdown
Member

I said this on #70756 (comment) but I have no idea what happened to this package; where did it go? Did you unpublish it? We need to mark the package as not being on npm, or just delete it. It's not clear to me how the PR was accepted if the package didn't exist.

@jakebailey
Copy link
Copy Markdown
Member

npm info req-real-ip confirms that this was unpublished.

@jakebailey jakebailey mentioned this pull request Oct 18, 2024
@jakebailey
Copy link
Copy Markdown
Member

I deleted this package in #70948. We can revert if the package comes back to npm.

@typescript-bot typescript-bot added the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Oct 18, 2024
@typescript-bot
Copy link
Copy Markdown
Contributor

@lacherogwu Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day!

@lacherogwu
Copy link
Copy Markdown
Contributor Author

lacherogwu commented Oct 21, 2024

I recommend to delete the package from NPM https://www.npmjs.com/package/@types/req-real-ip, the author of the npm package unpublished it

I have republish the package on NPM https://www.npmjs.com/package/req-real-ip?activeTab=readme
with types, so you can remove the @types/req-real-ip

@jakebailey
Copy link
Copy Markdown
Member

Now I'm even more confused. This was your package all along? Why did you send types to DT in the first place?

I don't think it's worth bringing the DT package back just to delete it again; the real package will override the DT package, and the DT package will just remain undownloaded by anyone.

(In any case, this PR itself is no longer a candidate for merging, so, closing it)

@jakebailey jakebailey closed this Oct 21, 2024
@lacherogwu
Copy link
Copy Markdown
Contributor Author

Now I'm even more confused. This was your package all along? Why did you send types to DT in the first place?

I don't think it's worth bringing the DT package back just to delete it again; the real package will override the DT package, and the DT package will just remain undownloaded by anyone.

(In any case, this PR itself is no longer a candidate for merging, so, closing it)

No it wasn't my packages, if was some dude's package and he suddenly unpublish it, so I re-published it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author is Owner The author of this PR is a listed owner of the package. Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. No Other Owners This DT module only has one owner, so we can't have someone verify the change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants