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

Change includePackageJsonAutoImports options #103732

Merged
merged 1 commit into from Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions extensions/typescript-language-features/package.json
Expand Up @@ -689,16 +689,16 @@
"typescript.preferences.includePackageJsonAutoImports": {
"type": "string",
"enum": [
"all",
"exclude-dev",
"none"
"auto",
"on",
"off"
],
"enumDescriptions": [
"%typescript.preferences.includePackageJsonAutoImports.all%",
"%typescript.preferences.includePackageJsonAutoImports.excludeDev%",
"%typescript.preferences.includePackageJsonAutoImports.none%"
"%typescript.preferences.includePackageJsonAutoImports.auto%",
"%typescript.preferences.includePackageJsonAutoImports.on%",
"%typescript.preferences.includePackageJsonAutoImports.off%"
],
"default": "exclude-dev",
"default": "auto",
"markdownDescription": "%typescript.preferences.includePackageJsonAutoImports%",
"scope": "window"
},
Expand Down
8 changes: 4 additions & 4 deletions extensions/typescript-language-features/package.nls.json
Expand Up @@ -76,10 +76,10 @@
"typescript.preferences.importModuleSpecifierEnding.minimal": "Shorten `./component/index.js` to `./component`.",
"typescript.preferences.importModuleSpecifierEnding.index": "Shorten `./component/index.js` to `./component/index`.",
"typescript.preferences.importModuleSpecifierEnding.js": "Do not shorten path endings; include the `.js` extension.",
"typescript.preferences.includePackageJsonAutoImports": "Enable/disable processing `package.json` dependencies for available auto imports.",
"typescript.preferences.includePackageJsonAutoImports.all": "Include all listed dependencies.",
"typescript.preferences.includePackageJsonAutoImports.excludeDev": "Exclude devDependencies.",
"typescript.preferences.includePackageJsonAutoImports.none": "Disable package.json dependency processing.",
"typescript.preferences.includePackageJsonAutoImports": "Enable/disable searching `package.json` dependencies for available auto imports.",
"typescript.preferences.includePackageJsonAutoImports.auto": "Search dependencies based on estimated performance impact.",
"typescript.preferences.includePackageJsonAutoImports.on": "Always search dependencies.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a quick question, will this also search dev dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I decided to remove that functionality unless/until there’s high demand for it. Since lots of devDependencies go unimported and creating auto import providers that contain lots of dependencies have an associated startup performance penalty, the setting was a perf trap door without enough room to explain all the considerations of enabling it.

"typescript.preferences.includePackageJsonAutoImports.off": "Never search dependencies.",
"typescript.updateImportsOnFileMove.enabled": "Enable/disable automatic updating of import paths when you rename or move a file in VS Code. Requires using TypeScript 2.9 or newer in the workspace.",
"typescript.updateImportsOnFileMove.enabled.prompt": "Prompt on each rename.",
"typescript.updateImportsOnFileMove.enabled.always": "Always update paths automatically.",
Expand Down