Skip to content

Comments

Switch remaining settings to use js/ts prefix#297076

Merged
mjbvz merged 2 commits intomicrosoft:mainfrom
mjbvz:dev/mjbvz/loose-whippet
Feb 23, 2026
Merged

Switch remaining settings to use js/ts prefix#297076
mjbvz merged 2 commits intomicrosoft:mainfrom
mjbvz:dev/mjbvz/loose-whippet

Conversation

@mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Feb 23, 2026

Fixes #292934

Also renames some of the server settings to have a more consistent naming scheme. This is going to be annoying but is the best time to do this since we are already changing the full setting id

For microsoft#292934

Also renames some of the server settings to have a more consistent naming scheme. This is going to be annoying but is the best time to do this since we are already changing the full setting id
Copilot AI review requested due to automatic review settings February 23, 2026 19:21
@mjbvz mjbvz enabled auto-merge February 23, 2026 19:21
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR continues the TypeScript/JavaScript settings migration by introducing/using unified js/ts.* setting IDs (with legacy fallbacks) and updating related UX (messages, deprecations, and setting contributions) in the built-in typescript-language-features extension.

Changes:

  • Switch additional codepaths to read/write unified js/ts.* settings via readUnifiedConfig / UnifiedConfigValue, with fallbacks to legacy typescript.* / javascript.*.
  • Add new js/ts.* settings contributions and mark legacy settings as deprecated in the extension’s package.json/package.nls.json.
  • Update user-facing messaging and a few command/config flows to reference the new unified setting IDs.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
extensions/typescript-language-features/src/ui/typingsStatus.ts Switch ATA failure flow to unified config + update message to new setting id
extensions/typescript-language-features/src/typescriptServiceClient.ts Update TS Server logging prompt to reference js/ts.tsserver.log
extensions/typescript-language-features/src/tsServer/versionManager.ts Write/read TypeScript version selection and tsgo flag via unified config
extensions/typescript-language-features/src/task/taskProvider.ts Read tsc.autoDetect via unified config fallback
extensions/typescript-language-features/src/logging/logLevelMonitor.ts Monitor log level via UnifiedConfigValue and update unified setting when disabling
extensions/typescript-language-features/src/languageProvider.ts Simplify diagnostics handling (removes per-setting filtering in this path)
extensions/typescript-language-features/src/languageFeatures/util/dependentRegistration.ts Remove legacy global-config condition helper; add unified-config condition helper
extensions/typescript-language-features/src/languageFeatures/updatePathsOnRename.ts Write update-imports setting under unified config section
extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts Keep reading unstable prefs from legacy per-language config as fallback
extensions/typescript-language-features/src/languageFeatures/completions.ts Read import-statement suggestion setting via unified config fallback
extensions/typescript-language-features/src/filesystems/ata.ts Gate ATA support using unified config condition
extensions/typescript-language-features/src/extension.ts Use unified config condition for tsgo feature gating
extensions/typescript-language-features/src/configuration/configuration.ts Move more service configuration reads to readUnifiedConfig
extensions/typescript-language-features/src/configuration/configuration.electron.ts Prefer unified tsdk.path/tsserver.node.path during inspect-based reads
extensions/typescript-language-features/src/commands/useTsgo.ts Toggle tsgo setting using unified config section + legacy-aware scope selection
extensions/typescript-language-features/package.nls.json Add unified deprecation messages and new unified-setting strings
extensions/typescript-language-features/package.json Contribute new js/ts.* settings and deprecate legacy setting IDs
Comments suppressed due to low confidence (2)

extensions/typescript-language-features/src/configuration/configuration.electron.ts:81

  • Same issue as above for the global case: the truthiness check on unifiedInspect?.globalValue will ignore an explicitly configured empty-string value and fall back to the legacy setting. Use an undefined check / typeof ... === 'string' without relying on truthiness.
		const unifiedInspect = configuration.inspect('js/ts.tsserver.node.path');
		const inspect = (unifiedInspect?.globalValue && typeof unifiedInspect.globalValue === 'string')
			? unifiedInspect
			: configuration.inspect('typescript.tsserver.nodePath');

extensions/typescript-language-features/package.json:200

  • tags has special semantics for settings (e.g. showing the “experimental” badge). These settings previously used tags: ["experimental"], but the PR changes them to keywords, which likely drops the experimental tagging in the Settings UI. Consider keeping tags: ["experimental"] (and optionally also add keywords for search).
          "js/ts.experimental.useTsgo": {
            "type": "boolean",
            "default": false,
            "markdownDescription": "%typescript.useTsgo%",
            "scope": "window",
            "order": 2,
            "keywords": [
              "TypeScript",
              "experimental"
            ]
          },
          "typescript.experimental.useTsgo": {
            "type": "boolean",
            "default": false,
            "markdownDescription": "%typescript.useTsgo%",
            "markdownDeprecationMessage": "%typescript.useTsgo.unifiedDeprecationMessage%",
            "scope": "window",
            "order": 2,
            "keywords": [
              "experimental"
            ]
          },

Comment on lines +2402 to 2420
"js/ts.tsserver.automaticTypeAcquisition.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "%configuration.automaticTypeAcquisition.enabled%",
"scope": "window",
"keywords": [
"TypeScript",
"usesOnlineServices"
]
},
"typescript.disableAutomaticTypeAcquisition": {
"type": "boolean",
"default": false,
"markdownDescription": "%typescript.disableAutomaticTypeAcquisition%",
"markdownDeprecationMessage": "%typescript.disableAutomaticTypeAcquisition.unifiedDeprecationMessage%",
"scope": "window",
"tags": [
"keywords": [
"usesOnlineServices"
]
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

tags is used for special classifications such as usesOnlineServices. Switching this to keywords likely removes the usesOnlineServices tag from the Settings UI and related policy/visibility behavior. Keep tags: ["usesOnlineServices"] for these settings (you can still add keywords separately if needed).

This issue also appears on line 179 of the same file.

Copilot uses AI. Check for mistakes.
Comment on lines +163 to +171
"js/ts.tsdk.path": {
"type": "string",
"markdownDescription": "%typescript.tsdk.desc%",
"scope": "window",
"order": 1,
"keywords": [
"TypeScript"
]
},
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

js/ts.tsdk.path reuses %typescript.tsdk.desc%, but that description text explicitly refers to typescript.tsdk. This will be confusing/misleading when shown for the new unified setting. Consider adding a new description string (or updating the existing one) that refers to js/ts.tsdk.path (and optionally mentions the legacy key as deprecated).

Copilot uses AI. Check for mistakes.
import { getPackageInfo } from './utils/packageInfo';
import * as temp from './utils/temp.electron';
import { conditionalRegistration, requireGlobalConfiguration, requireHasVsCodeExtension } from './languageFeatures/util/dependentRegistration';
import { conditionalRegistration, requireGlobalUnifiedConfig, requireHasVsCodeExtension } from './languageFeatures/util/dependentRegistration';
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

requireGlobalConfiguration is imported here but is no longer exported from languageFeatures/util/dependentRegistration (it was removed in this PR). This will cause a compile error. Remove the unused import or reintroduce the export if it’s still needed.

Suggested change
import { conditionalRegistration, requireGlobalUnifiedConfig, requireHasVsCodeExtension } from './languageFeatures/util/dependentRegistration';
import { conditionalRegistration } from './languageFeatures/util/dependentRegistration';

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +58
const unifiedInspect = configuration.inspect('js/ts.tsserver.node.path');
const inspect = (unifiedInspect?.workspaceValue && typeof unifiedInspect.workspaceValue === 'string')
? unifiedInspect
: configuration.inspect('typescript.tsserver.nodePath');
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The unified config selection uses a truthiness check (unifiedInspect?.workspaceValue && ...). If the user explicitly sets the unified value to an empty string, this will incorrectly fall back to the legacy setting. Prefer checking for typeof unifiedInspect?.workspaceValue === 'string' (or !== undefined) instead of truthiness when deciding which inspect result to use.

This issue also appears on line 78 of the same file.

Copilot uses AI. Check for mistakes.
Comment on lines +2626 to +2628
"configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval",
"configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval",
"configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

enumDescriptions entries here are not localized placeholders (they’re missing the surrounding %...%). As-is, the settings UI will show the raw key strings instead of the translated descriptions. Update these to reference the existing NLS keys (and ensure the dynamicPriorityPolling key name matches the one in package.nls.json).

Suggested change
"configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval",
"configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval",
"configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling"
"%configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval%",
"%configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval%",
"%configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling%"

Copilot uses AI. Check for mistakes.
@mjbvz mjbvz merged commit 704be49 into microsoft:main Feb 23, 2026
17 of 18 checks passed
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.

Clean up JS/TS language specific setting settings

2 participants