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
[NodeJS] Support 'typesVersions' in node/v6 through node/v9 #34678
Conversation
ed91dcc
to
7dcd98a
Compare
@rbuckton Thank you for submitting this PR! Because this is a new definition, a DefinitelyTyped maintainer will be reviewing this PR in the next few days once the Travis CI build passes. In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day! |
@rbuckton The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@rbuckton with the size of node typings growing continuously, are there any plans to purge the EOL versions <= 6 (end of april) or even move them into a standard TS lib? |
@rbuckton The diff with master is quite complicated in that run. aframe shows up as partly deleted, which is what causes the error, but three (which aframe depends on) shows up as added. This makes me think that the branch must be fairly old (pre-March 27). I think that the notNeededPackages code I added recently gets confused when a popular package, with dependents, gets removed, causing dependents to add a package.json. I would merge from master as a workaround. |
3d08fb8
to
f2fca64
Compare
@rbuckton The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
27c165e
to
8f24a46
Compare
@rbuckton The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
8f24a46
to
78c7f3c
Compare
@sandersn: Thanks, rebasing with latest master seems to have fixed the issue. |
Since the bot things this is a new definition, I'll notify the reviewers manually: 🔔 @microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @btoueg @BrunoScheufler @smac89 @tellnes @Touffy @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @matthieusieben @mohsen1 @n-e @octo-sniffle @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @jeremiergz @samuela @kuehlein @j-oliveras @bhongy - please review this PR in the next few days. Be sure to explicitly select |
Node.Js 9 is EOL since 2018-06-30, long before Node.Js 6 (2019-04-30). Therefore I don't think changes v9 are needed. |
@Flarna I think we should remove them, the node team doesn't maintain them and neither should we, people can always augment their typings. |
The split of Node v8 and Node v9 typings has less to do with maintainability, and more to do with supporting the This has more to do with ensuring that the next release of TypeScript does not result in major breaks for anyone still using Node v9, as module augmentations cannot address the issue this is meant to solve. An augmentation cannot address the "Duplicate identifier" error that would result from having conflicting |
@rbuckton I think our comments were a little off-topic and we weren't arguing the actual changes made here but rather making a note that we should remove them to avoid future churn :) |
Hopefully the changes we've made to the Node definitions for |
But why not v6 and v4 then? It's more likely that users are still on v6/v4 then on v9 as they were LTS versions. |
@Flarna or others, can you take a look? I'd like to merge this if possible as changes continue to be made to the v6 and v8 definitions. |
interface Error { | ||
stack?: string; | ||
} | ||
// NOTE: Augmentations for TypeScript 3.1 and later should use individual files for overrides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually 3.2 (also applicable to other versions)
@@ -2,7 +2,7 @@ | |||
"compilerOptions": { | |||
"module": "commonjs", | |||
"lib": [ | |||
"es5" | |||
"es6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change? I can remember about some complains that node typings don't work with lib es5, usually because of missing forward declarations. if es6 is used here this is not detected by tests
interface IteratorResult<T> { } | ||
interface AsyncIterableIterator<T> {} | ||
interface SymbolConstructor { | ||
readonly iterator: symbol; | ||
readonly asyncIterator: symbol; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you removed asyncIterator
per accident here? For whatever reason it's only present in v6 so maybe it's anyway wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it intentionally. It seemed out of place and I verified that it does not, in fact, exist in Node v6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked on every single line but it seems correct to me
A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
I just published |
I just published |
I just published |
I just published |
Isn't this needed in I am getting following at
|
@sharikovvladislav Try latest node 10 type definitions. |
Latest for 10 is Thank you for the fast response. |
At least the split for typescript versions is included there. |
Thank you. That helped. |
Similar to the recent change to split NodeJS v11 and v10 to support
"typesVersions"
, this does the same for NodeJS v9 and v8. This change will be necessary to continue to support Node v8 and v9 once microsoft/TypeScript#30790 has merged.