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

Enable search of local Typescript Language Service Plugins (fix #45856) #45858

Merged
merged 2 commits into from
Mar 23, 2018

Conversation

killerDJO
Copy link
Contributor

Proposed change for #45856. Added option to discover plugins in project-local node modules

@msftclas
Copy link

msftclas commented Mar 15, 2018

CLA assistant check
All CLA requirements met.

Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

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

Looking good. Just a few small changes

@@ -74,6 +76,7 @@ export class TypeScriptServiceConfiguration {
&& this.localTsdk === other.localTsdk
&& this.npmLocation === other.npmLocation
&& this.tsServerLogLevel === other.tsServerLogLevel
&& this.tsServerPluginPaths === other.tsServerPluginPaths
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be array contents comparison

@@ -106,6 +106,16 @@
"description": "%typescript.tsserver.log%",
"scope": "window"
},
"typescript.tsserver.pluginPaths": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add "isExecutable": true here. This prevents this from ever being used as a workspace setting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do you think it should be a user-only setting?
Specifying pluginPaths on workspace level can be quite useful, especially in conjunction with relative paths. In this case plugins configuration can be committed to a source control and shared between team members.
If this is this because of the security concerns, I don't believe this is a more dangerous option than ability to specify typescript.tsdk on a workspace-level.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes it is for security reasons. Tsdk asks for user confirmation before executing any code in the workspace but that flow is complicated so I don't want to duplicate it here. Instead we should just limit these this to be a user only setting

@killerDJO
Copy link
Contributor Author

@mjbvz Changes have been made according to your comments.

@killerDJO killerDJO force-pushed the master branch 3 times, most recently from f5c8e12 to 9c43780 Compare March 22, 2018 09:14
@mjbvz mjbvz merged commit d3cd393 into microsoft:master Mar 23, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 23, 2018

Thanks! On track for the March vscode release

@mjbvz mjbvz added this to the March 2018 milestone Mar 23, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 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