fix: remove sonic-boom types, and update pino to match#53559
fix: remove sonic-boom types, and update pino to match#53559JustinBeckwith wants to merge 1 commit intoDefinitelyTyped:masterfrom
Conversation
|
@JustinBeckwith Thank you for submitting this PR! This is a live comment which I will keep updated. This PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this? 2 packages in this PR (and infra files)Code ReviewsThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 23 days — it is considered nearly abandoned! Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 53559,
"author": "JustinBeckwith",
"headCommitOid": "5e589742a38376a7d57a59cfd7b7ff0b341fae7f",
"lastPushDate": "2021-06-02T18:43:17.000Z",
"lastActivityDate": "2021-10-14T21:56:03.000Z",
"hasMergeConflict": true,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": null,
"kind": "edit",
"files": [
{
"path": "notNeededPackages.json",
"kind": "infrastructure"
}
],
"owners": [],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
},
{
"name": "pino",
"kind": "edit",
"files": [
{
"path": "types/pino/index.d.ts",
"kind": "definition"
},
{
"path": "types/pino/package.json",
"kind": "package-meta-ok"
}
],
"owners": [
"psnider",
"BendingBender",
"screendriver",
"paambaati",
"alferpal",
"mortiy",
"lummish",
"raoulus",
"Cooryd",
"AdamVig",
"austin-beer",
"Pegase745"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
},
{
"name": "sonic-boom",
"kind": "add",
"files": [
{
"path": "types/sonic-boom/index.d.ts",
"kind": "definition"
},
{
"path": "types/sonic-boom/sonic-boom-tests.ts",
"kind": "test"
},
{
"path": "types/sonic-boom/tsconfig.json",
"kind": "package-meta-ok"
},
{
"path": "types/sonic-boom/tslint.json",
"kind": "package-meta-ok"
}
],
"owners": [],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "changereq",
"reviewer": "BendingBender",
"date": "2021-06-02T18:56:34.000Z"
},
{
"type": "approved",
"reviewer": "AdamVig",
"date": "2021-06-02T18:51:23.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 853294449,
"ciResult": "fail",
"ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/5e589742a38376a7d57a59cfd7b7ff0b341fae7f/checks?check_suite_id=2894884042"
} |
|
🔔 @psnider @BendingBender @screendriver @paambaati @alferpal @mortiy @lummish @raoulus @Cooryd @AdamVig @austin-beer @Pegase745 — please review this PR in the next few days. Be sure to explicitly select |
|
@JustinBeckwith The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review. |
|
PR adding this to the package allowlist is blocking this PR, and available here: microsoft/DefinitelyTyped-tools#274 |
| { | ||
| "private": true, | ||
| "dependencies": { | ||
| "sonic-boom": "^2.0.1" |
There was a problem hiding this comment.
Sorry, but this doesn't fly. Pino still uses sonic-boom@1. You'll need to depend on @types/sonic-boom@1 instead.
There was a problem hiding this comment.
@BendingBender We are currently considering merging the change to use newer sonic-boom soon: pinojs/pino#1039
The whole reason for the introduction of 2.0.0 was the embedding of TS types.
There was a problem hiding this comment.
Yeah well, you'll have to wait until a version of pino is released that depends on sonic-boom@2 and bump it here then. Until then, you should depend on @types/sonic-boom@1 as far as I understand it. That shouldn't be an issue, you can add an exclusion for this in DefinitelyTyped-tools, the same way you made it for sonic-boom.
There was a problem hiding this comment.
Having thought a bit more about it, I probably would suggest removing pino changes out of this PR altogether, and just deprecate pino typings altogether after next semver major comes out, since that will also have embedded types.
There was a problem hiding this comment.
You can't remove sonic-boom types without explicitly depending on @types/sonic-boom for pino's types. You can try it out and see the lint issue you'll get. So the way forward would be to:
- add
@types/sonic-boomto the allowlist inDefinitelyTyped-tools - make
pino's types explicitly depend on@types/sonic-boom@1 - add
sonic-boomtonotNeededPackages.jsonand remove the types
|
@JustinBeckwith One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
| import http = require("http"); | ||
| import { EventEmitter } from "events"; | ||
| import SonicBoom = require("sonic-boom"); | ||
| import SonicBoom from "sonic-boom"; |
There was a problem hiding this comment.
Wouldn't this break types for people using Pino with older sonic-boom?
There was a problem hiding this comment.
It very well may. I've generally thought the types here were optimized for folks running on the latest versions. Would it make sense to treat this as a semver major for @types/pino, setting the expectation it requires a minimum version of pino to match?
There was a problem hiding this comment.
It does look like a semver, yes.
That said, due to pinojs/pino#1037, after next semver major is out, typings for Pino itself should be deprecated.
There was a problem hiding this comment.
As far as I understand it, the stance on TypeScript version support is that all versions younger than 2 years are supported and tested. This is exactly what dts-lint is testing against. If you don't produce a lint issue with this change then it should be fine.
This is actually exactly why I insist that the definitions should depend on @types/sonic-boom until pino actually uses sonic-boom@2.
There was a problem hiding this comment.
In this case it is related not to TS version per se, but to changes in how sonic-boom 2.0.0 exports its types, which is a breaking change.
There was a problem hiding this comment.
Would it make sense to treat this as a semver major for
@types/pino
You can't make an independent semver major for an @types package. It has to stay in sync with the package it types for the major and minor versions, only the patch level may diverge from pino's version.
There was a problem hiding this comment.
That said, due to pinojs/pino#1037, after next semver major is out, typings for Pino itself should be deprecated.
Now that pinojs/pino#1037 is merged, I think it makes the most sense to wait until it's published and then remove both @types/pino and @types/sonic-boom at the same time.
There was a problem hiding this comment.
Removing pino types means that @types/pino will have to be allowed in DefinitelyTyped-tools, there are still multiple libs that depend on pino types in the DT tree. These libs will have to be changed to explicitly depend on @types/pino.
Following libs have a direct dependency on pino types:
hapi-pinokoa-pino-loggerpino-httppino-multi-streampino-pretty
Following libs depend on pino types in their tests, here either the tests have to be adapted or the explicit dependency introduced:
ari-clientexpress-pino-logger
But all in all this really sounds like the best way froward.
There was a problem hiding this comment.
I concur. Please review recent removal of mongodb types:
#54510
|
@JustinBeckwith I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Jul 2nd (in a week) if the issues aren't addressed. |
|
Can we keep this PR for a while longer? |
|
@JustinBeckwith I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Jul 26th (in a week) if the issues aren't addressed. |
|
Can we please not close this issue yet? Next Pino semver major should be released soon, then this PR could be finished. |
|
@JustinBeckwith 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! |
|
Pino 7 is at rc stage already, btw |
|
@JustinBeckwith I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Sep 11th (in a week) if the issues aren't addressed. |
|
We are getting closer to releasing pino. |
|
still on agenda |
|
@JustinBeckwith I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Oct 5th (in a week) if the issues aren't addressed. |
|
Pino final is coming, give it a bit more time |
|
@JustinBeckwith Could you please rebase this PR? Pino 7 with embedded types has finally arrived, we can proceed to drop the whole chain from pino to sonic-boom. |
|
@JustinBeckwith I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Nov 13th (in a week) if the issues aren't addressed. |
|
closing this one, as it was covered by #54756 |
Please fill in this template.
npm test <package to test>.Select one of these and delete the others:
If adding a new definition:
.d.tsfiles generated via--declarationdts-gen --dt, not by basing it on an existing project.tslint.jsonshould contain{ "extends": "dtslint/dt.json" }, and no additional rules.tsconfig.jsonshould havenoImplicitAny,noImplicitThis,strictNullChecks, andstrictFunctionTypesset totrue.If changing an existing definition:
If removing a declaration:
notNeededPackages.json.