The Wayback Machine - https://web.archive.org/web/20201023163932/https://github.com/angular/angular-cli/pull/17653
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

refactor: use node v12 types, matching WORKSPACE version #17653

Open
wants to merge 1 commit into
base: master
from

Conversation

@jkrems
Copy link

@jkrems jkrems commented May 6, 2020

The WORKSPACE was updated to use node 12 in #16976 but the type checking was still using the types for node 12. The newer typings are a bit more precise but also bring in a return type overload for fs.stat (due to {bigint: true}).

This updates existing references to node 10 to node 12, moves to the latest typings packages, selects node v12 types, and fixes type errors that arise from those changes.

For the error argument type change in node/host.ts I went for a union of the previous (wrong) type and the newly fixed type. Technically err can never be undefined but this way it's still safe to pull this code into contexts that may be using outdated versions of @types/node. A nice future cleanup would be remove the question mark on those err? arguments.

@googlebot googlebot added the cla: yes label May 6, 2020
@jkrems jkrems force-pushed the jkrems:node-v12 branch from e81d12e to 395d1af May 6, 2020
@jkrems jkrems force-pushed the jkrems:node-v12 branch from 395d1af to aa3961a May 6, 2020
@jkrems
Copy link
Author

@jkrems jkrems commented May 6, 2020

Does the build failure here mean that we'd need to land the new types in both the main repo and this one at the same time?

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.