Skip to content

fix: use same logic to resolve typescript in banner and server #447

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

Merged
merged 1 commit into from
Nov 24, 2019

Conversation

kyliau
Copy link
Contributor

@kyliau kyliau commented Nov 22, 2019

This commit refactors version_provider.ts to resolve a node module with
any minimum version, not just major version.

The same logic is now used in server.ts and banner.ts to resolve
tsserver. This enables us to accurately report the version of the
module require-d.

@kyliau kyliau requested a review from ayazhafiz November 22, 2019 22:59
@@ -6,65 +6,134 @@
* found in the LICENSE file at https://angular.io/license
*/

import * as path from 'path';
const MIN_TS_VERSION = '3.6';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be 3.7 since that's going to be the new bundle version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's gonna be in the next PR ;) I want to separate the changes from the version upgrade.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a language service will not work with ts 3.7 because the typeArguments property has been removed from the TypeReference interface in Typescipt 3.7. Two usages of typeArguments exist in @angular/.../typescript_symbols.ts file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please see my comment here #437 (comment)
I think 3.7.2 does not contain the fix

Copy link
Contributor

@ayazhafiz ayazhafiz Nov 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging pending @andrius-pra approval since this PR doesn't deal with 3.7 yet.

This commit refactors version_provider.ts to resolve a node module with
any minimum version, not just major version.

The same logic is now used in server.ts and banner.ts to resolve
tsserver. This enables us to accurately report the version of the
module require-d.
@ayazhafiz ayazhafiz merged commit f5bf985 into angular:master Nov 24, 2019
@kyliau kyliau deleted the version-provider branch November 24, 2019 22:24
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants