-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
[crawler] Add types for crawler #48692
Conversation
@pzmarzly Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged. Status
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": 48692,
"author": "pzmarzly",
"owners": [],
"dangerLevel": "ScopedAndConfiguration",
"headCommitAbbrOid": "a9051ae",
"headCommitOid": "a9051ae4cfc02c4cf4f9e6f67f28d61ac830a1f5",
"mergeIsRequested": false,
"stalenessInDays": 1,
"lastPushDate": "2020-10-11T15:34:21.000Z",
"lastCommentDate": "2020-10-11T15:34:21.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48692/files",
"hasMergeConflict": false,
"authorIsOwner": false,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"newPackages": [
"crawler"
],
"packages": [
"crawler"
],
"files": [
{
"path": "types/crawler/crawler-tests.ts",
"kind": "test",
"package": "crawler"
},
{
"path": "types/crawler/index.d.ts",
"kind": "definition",
"package": "crawler"
},
{
"path": "types/crawler/tsconfig.json",
"kind": "package-meta",
"package": "crawler",
"suspect": "created"
},
{
"path": "types/crawler/tslint.json",
"kind": "package-meta-ok",
"package": "crawler"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"reviewersWithStaleReviews": [],
"approvalFlags": 0,
"isChangesRequested": false
} |
🔔 @pzmarzly — 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...) |
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to crawler with its source on master. Comparison details 📊
|
Nice work @pzmarzly - external types like |
I just published |
This PR adds types for crawler (npm, GitHub). Most of its development happened in the years 2014-2016. Later, @raynor85 and @wakhh published their TS augmentation, which I took and updated to get it to work on modern TS compilers.
The types are not 100% accurate:
cheerio
, in which case$
is of different type.By the way, it seems like packages that types for
request
are broken, which causes its dependents' tests to fail. For an example, runnpm test artillery
in the DT repo.Select one of these and delete the others:
If adding a new definition:
.d.ts
files generated via--declaration
dts-gen --dt
, not by basing it on an existing project.tslint.json
should be present and it shouldn't have any additional or disabling of rules. Just content as{ "extends": "dtslint/dt.json" }
.tsconfig.json
should havenoImplicitAny
,noImplicitThis
,strictNullChecks
, andstrictFunctionTypes
set totrue
.