Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"type": "module",
"scripts": {
"build": "npm run clean && npm run lint && npm run compile && npm run compile-rollup-plugins && npm run compile-default-extensions && npm run compile-language-packs && npm run compile-monaco-languages",
"build": "npm run clean && npm run lint && npm run check-unsupported-decorator && npm run compile && npm run compile-rollup-plugins && npm run compile-default-extensions && npm run compile-language-packs && npm run compile-monaco-languages",
"compile": "NODE_OPTIONS=--max_old_space_size=16384 rollup --config rollup/rollup.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config.json`}' --vscode-version ${npm_package_config_vscode_version} --vscode-ref ${npm_package_config_vscode_ref} --vscode-commit ${npm_package_config_vscode_commit}",
"compile-default-extensions": "NODE_OPTIONS=--max_old_space_size=16384 rollup --config rollup/rollup.default-extensions.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-default-extensions.json`}'",
"compile-language-packs": "NODE_OPTIONS=--max_old_space_size=16384 rollup --config rollup/rollup.language-packs.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-language-packs.json`}'",
Expand All @@ -26,7 +26,8 @@
"lint": "eslint '{src/**/*.ts,rollup/*.ts,*.ts}'",
"update-vscode-dependencies": "tsx scripts/update-vscode-dependencies.ts",
"release": "tsx release.ts",
"reset:repo": "git clean -f -X -d"
"reset:repo": "git clean -f -X -d",
"check-unsupported-decorator": "tsx scripts/check-unsupported-decorator.ts"
},
"config": {
"vscode": {
Expand Down Expand Up @@ -80,6 +81,7 @@
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-dts": "^6.4.1",
"semantic-release": "25.0.3",
"ts-morph": "^28.0.0",
"tsx": "^4.21.0",
"type-fest": "^5.5.0",
"typescript": "^5.9.3",
Expand Down
29 changes: 29 additions & 0 deletions scripts/check-unsupported-decorator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Project } from 'ts-morph'

const project = new Project({ tsConfigFilePath: 'tsconfig.json' })
const sourceFile = project.getSourceFileOrThrow('src/missing-services.ts')

const issues: string[] = []

for (const cls of sourceFile.getClasses()) {
for (const prop of cls.getProperties()) {
const initText = prop.getInitializer()?.getText().trim()
const usesUnsupported = initText === 'unsupported'
const hasDecorator = prop.getDecorator('Unsupported') != null

const loc = `${cls.getName()}.${prop.getName()} (line ${prop.getStartLineNumber()})`

if (usesUnsupported && !hasDecorator) {
issues.push(`❌ ${loc}: uses \`unsupported\` but is missing the @Unsupported decorator`)
}
if (!usesUnsupported && hasDecorator) {
issues.push(`❌ ${loc}: has @Unsupported decorator but does not use \`unsupported\``)
}
}
}

if (issues.length) {
console.error(issues.join('\n'))
process.exit(1)
}
console.log('✅ All consistent')
8 changes: 1 addition & 7 deletions src/missing-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2066,11 +2066,8 @@ class ExtensionsScannerService implements IExtensionsScannerService {
return unsupported()
}
onDidChangeCache: IExtensionsScannerService['onDidChangeCache'] = Event.None
@Unsupported
scanAllExtensions: IExtensionsScannerService['scanAllExtensions'] = async () => []
@Unsupported
scanSystemExtensions: IExtensionsScannerService['scanSystemExtensions'] = async () => []
@Unsupported
scanUserExtensions: IExtensionsScannerService['scanUserExtensions'] = async () => []
@Unsupported
scanExtensionsUnderDevelopment: IExtensionsScannerService['scanExtensionsUnderDevelopment'] =
Expand Down Expand Up @@ -2725,7 +2722,6 @@ class TerminalService implements ITerminalService {
createTerminal: ITerminalService['createTerminal'] = unsupported
@Unsupported
getInstanceFromId: ITerminalService['getInstanceFromId'] = unsupported
@Unsupported
getReconnectedTerminals: ITerminalService['getReconnectedTerminals'] = () => undefined
@Unsupported
getActiveOrCreateInstance: ITerminalService['getActiveOrCreateInstance'] = unsupported
Expand Down Expand Up @@ -4100,7 +4096,6 @@ class AuthenticationService implements IAuthenticationService {
getProviderIds: IAuthenticationService['getProviderIds'] = () => []
@Unsupported
getProvider: IAuthenticationService['getProvider'] = unsupported
@Unsupported
getSessions: IAuthenticationService['getSessions'] = async () => []
@Unsupported
createSession: IAuthenticationService['createSession'] = unsupported
Expand Down Expand Up @@ -5669,7 +5664,6 @@ class McpRegistry implements IMcpRegistry {
}
@Unsupported
setSavedInput: IMcpRegistry['setSavedInput'] = unsupported
@Unsupported
getServerDefinition: IMcpRegistry['getServerDefinition'] = () =>
constObservable({
server: undefined,
Expand Down Expand Up @@ -5740,7 +5734,6 @@ class NullDefaultAccountService extends Disposable implements IDefaultAccountSer
@Unsupported
getDefaultAccountAuthenticationProvider: IDefaultAccountService['getDefaultAccountAuthenticationProvider'] =
unsupported
@Unsupported
setDefaultAccountProvider: IDefaultAccountService['setDefaultAccountProvider'] = () => {}
refresh: IDefaultAccountService['refresh'] = async () => null
@Unsupported
Expand Down Expand Up @@ -6946,6 +6939,7 @@ registerSingleton(IInlineChatHistoryService, InlineChatHistoryService, Instantia
class BrowserViewWorkbenchService implements IBrowserViewWorkbenchService {
_serviceBrand: undefined

@Unsupported
getOrCreateBrowserViewModel: IBrowserViewWorkbenchService['getOrCreateBrowserViewModel'] =
unsupported
@Unsupported
Expand Down
Loading