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

[node] Add definition for Node.js v8 #17027

Merged
merged 1 commit into from Jun 16, 2017
Merged

[node] Add definition for Node.js v8 #17027

merged 1 commit into from Jun 16, 2017

Conversation

ikokostya
Copy link
Contributor

@ikokostya ikokostya commented Jun 7, 2017

List of changes:

  • Move current types/node/index.d.ts to types/node/v7/index.d.ts
  • Remove util.promisify (introduced by [types/node] Add promisify to util [wip] #16946) from v7/index.d.ts, because this function is available since Node.js v8.
  • Use types/node/index.d.ts for Node.js v8 - increase the version number in the header.
  • Change compilerOptions.lib to es6 in tsconfig.json like in types/node/v6/tsconfig.json.

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://nodejs.org/dist/latest-v8.x/docs/api/
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

@dt-bot
Copy link
Member

dt-bot commented Jun 7, 2017

types/node/index.d.ts

to authors (@DefinitelyTyped/DefinitelyTyped @parambirs @robdesideri @tellnes @WilcoBakker Microsoft TypeScript (account can't be detected)). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

types/node/v7/index.d.ts

Checklist

@ghost
Copy link

ghost commented Jun 7, 2017

See #16860.
This branch doesn't seem to make any type changes to node/index.d.ts.

@ikokostya
Copy link
Contributor Author

ikokostya commented Jun 7, 2017

@andy-ms Now users can add features to declaration for Node.js v7 which doesn't exist in Node.js v7 runtime.

There are several problems:

  • Code will be compiled with such definition, but will fail at runtime.
  • People can start to use declaration for Node.js v7 with Node.js v8 runtime. After that, removing anything related to Node.js v8 from v7 definition potentially can brake many modules.

If separated issue (#16860) for Node.js v8 exists, why pull request with util.promisify was merged?

@hinell
Copy link
Contributor

hinell commented Jun 7, 2017

@ikokostya This solution doesn't seem solve broken runtime anyway cause there are plenty modules that just referencing the latest DT/node/index.d.ts version in their dependencies meaning moving index.d.ts to separate folder won't help. Though I like idea to keep separate versions.

@ikokostya
Copy link
Contributor Author

So @yuit @andy-ms what we wait here? Could you provide TODO list of necessary changes for Node.js 8 #16860 (comment)?

@minestarks
Copy link
Contributor

@andy-ms to close the loop. I don't see a reason not to merge this. It'll keep people from adding v8 features to v7 typings. Any objections?

@minestarks minestarks merged commit 793b309 into DefinitelyTyped:master Jun 16, 2017
@magnushiie
Copy link
Contributor

It seems this has not been published to @types/node npm package yet? The latest version of that package is 7.0.31

@minestarks
Copy link
Contributor

@magnushiie check again, it's up

@magnushiie
Copy link
Contributor

Thanks!

@Flarna Flarna mentioned this pull request Jan 2, 2018
8 tasks
KSXGitHub pushed a commit to KSXGitHub/DefinitelyTyped that referenced this pull request May 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants