Skip to content
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

Missing types for other packages used by Probot #759

Closed
wolfy1339 opened this issue Nov 5, 2018 · 11 comments
Closed

Missing types for other packages used by Probot #759

wolfy1339 opened this issue Nov 5, 2018 · 11 comments
Labels

Comments

@wolfy1339
Copy link
Contributor

wolfy1339 commented Nov 5, 2018

Bug Report

Current Behavior
All TypeScript types located in src/@types/ are missing from final build, and any used as they are marked as devDependencies and cause errors when using Probot in a TS application

// Your code here
import { Application } from 'probot';
export = (app: Application) => {
  app.log('There is a bug')
}

Expected behavior/code
For the npm module to have the required types, and the package.json list the @types/* packages in dependencies

Environment

  • Probot version(s): [e.g. v6.0.0] any version written in TS
  • Node/npm version: [e.g. Node 8/npm 5] Node 10
  • OS: [e.g. OSX 10.13.4, Windows 10] Windows 10

Possible Solution
Add a script to copy those files to the final output folder and mark the required @types/* packages as dependencies

Additional context/Screenshots
Encompases #675

@stale
Copy link

stale bot commented Feb 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 7, 2019
@wolfy1339
Copy link
Contributor Author

Not stale

@stale stale bot removed the wontfix label Feb 13, 2019
@gr2m
Copy link
Contributor

gr2m commented Feb 14, 2019

Would this be fixed if we add the src/@types folder to

probot/package.json

Lines 20 to 25 in bcc3203

"files": [
"lib",
"bin",
"static",
"views"
],

An alternative would be to list the @types in dependencies with a relative path instead of a version as the value. But I think we’ll have to add package.json files in order to make that work?

@wolfy1339
Copy link
Contributor Author

wolfy1339 commented Feb 14, 2019 via email

@stale
Copy link

stale bot commented Apr 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 15, 2019
@wolfy1339
Copy link
Contributor Author

wolfy1339 commented Apr 16, 2019 via email

@stale stale bot removed the wontfix label Apr 16, 2019
@stale
Copy link

stale bot commented Jun 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 15, 2019
@gr2m gr2m added the pinned label Jun 15, 2019
@stale stale bot removed the wontfix label Jun 15, 2019
@luishdz1010
Copy link

Any workarounds?

@MaximDevoir
Copy link
Contributor

MaximDevoir commented Jan 31, 2020

I was able to reproduce this issue when using Probot@v7 but was unable to reproduce the issue with the latest version of Probot (currently v9).

Thanks to @wolfy1339 and his many contributions, Probot now has much better type information than when this issue was created.

@luishdz1010 I don't think there are any known workarounds at the moment. To get access to the latest type information from Probot, you'll have to migrate Probot to v9 (requires Node 10, see the 7 -> 9 migration guide - we can safely skip Probot 8. For those who are using Probot v6, here's the 6 -> 7 migration guide).

This issue appears to have been fixed with the release of v9. What do you think @wolfy1339?

@KnisterPeter
Copy link
Contributor

KnisterPeter commented Jun 4, 2020

Currently (v9.x) we needed to add these typings to our own typings since they are reexported by the types of probot but only devDependencies:

  • @types/bunyan
  • @types/express
  • @types/ioredis

Also: There are no typings for promise-events.

KnisterPeter added a commit to KnisterPeter/probot that referenced this issue Jun 4, 2020
These typings are used and reexported by probot and therefore are
dependencies which need to be installed by users as well.

Relates to probot#759
gr2m pushed a commit that referenced this issue Jun 4, 2020
These typings are used and reexported by probot and therefore are
dependencies which need to be installed by users as well.

Relates to #759
@gr2m
Copy link
Contributor

gr2m commented Dec 8, 2020

I think this should all be resolved now. Please let me know if there is anything left

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants