Skip to content

Commit de77cc6

Browse files
fjakobsclaude
andcommitted
Fix TypeScript build errors and update to TS 5.9.3 targeting ES2022
Update TypeScript from 5.3.3 to 5.9.3 and adjust configuration to target ES2022 (highest version supported by ts-node 10.9.2). Fix compilation errors revealed by stricter type checking in TypeScript 5.9. Changes: - package.json: Upgrade typescript from ^5.3.3 to ^5.5.0 (installed 5.9.3) - All tsconfig files: Update target from ES2023 to ES2022 - tsconfig_base.json: Add skipLibCheck to avoid third-party lib errors - JobRunStatus.ts: Add declare keyword for data property override - PipelineRunStatus.ts: Add declare keyword for data property override - ConfigurationDataProvider.ts: Move components initialization to constructor to fix property initialization order errors Benefits: - ES2022 target compatible with Node.js 22 - Stricter type checking catches potential bugs - Successful build with no errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3656c9b commit de77cc6

10 files changed

Lines changed: 54 additions & 32 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"eslint-config-prettier": "^9.1.0",
4343
"eslint-plugin-no-only-tests": "^3.1.0",
4444
"ts-mockito": "^2.6.1",
45-
"typescript": "^5.3.3"
45+
"typescript": "^5.5.0"
4646
},
4747
"resolutions": {
4848
"json5": "2.2.2"

packages/databricks-vscode/eslint-local-rules/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"transpileOnly": true,
33
"compilerOptions": {
44
"module": "Node22",
5-
"target": "ES2023"
5+
"target": "ES2022"
66
}
77
}

packages/databricks-vscode/scripts/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"compilerOptions": {
33
"module": "CommonJS",
4-
"target": "ES2023",
4+
"target": "ES2022",
55
"outDir": "out",
66
"esModuleInterop": true,
77
"isolatedModules": false,
8-
"lib": ["ES2023"],
8+
"lib": ["ES2022"],
99
"sourceMap": true,
1010
"strict": true /* enable all strict type-checking options */,
1111
"forceConsistentCasingInFileNames": true,

packages/databricks-vscode/src/bundle/run/JobRunStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {WorkflowRun} from "../../sdk-extensions";
1212

1313
export class JobRunStatus extends BundleRunStatus {
1414
readonly type = "jobs";
15-
data: Run | undefined;
15+
declare data: Run | undefined;
1616
private readonly onDidCompleteEmitter = new EventEmitter<void>();
1717
onDidComplete: Event<void> = this.onDidCompleteEmitter.event;
1818

packages/databricks-vscode/src/bundle/run/PipelineRunStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function isRunning(status?: pipelines.UpdateInfoState) {
2525

2626
export class PipelineRunStatus extends BundleRunStatus {
2727
public readonly type = "pipelines";
28-
public data: pipelines.UpdateInfo | undefined;
28+
public declare data: pipelines.UpdateInfo | undefined;
2929
public events: pipelines.PipelineEvent[] | undefined;
3030

3131
private logger = logging.NamedLogger.getOrCreate(Loggers.Extension);

packages/databricks-vscode/src/test/e2e/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"allowImportingTsExtensions": true,
1313
"resolveJsonModule": true,
1414
"module": "ESNext",
15-
"target": "ES2023",
16-
"lib": ["ES2023"],
15+
"target": "ES2022",
16+
"lib": ["ES2022"],
1717
"isolatedModules": true,
1818
"sourceMap": true,
1919
"noImplicitAny": false,

packages/databricks-vscode/src/ui/configuration-view/ConfigurationDataProvider.ts

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,7 @@ export class ConfigurationDataProvider
4242
> = this._onDidChangeTreeData.event;
4343

4444
private disposables: Array<Disposable> = [];
45-
private components: Array<BaseComponent> = [
46-
new WorkspaceFolderComponent(this.workspaceFolderManager),
47-
new BundleTargetComponent(this.configModel),
48-
new AuthTypeComponent(
49-
this.connectionManager,
50-
this.configModel,
51-
this.cli
52-
),
53-
new ClusterComponent(this.connectionManager, this.configModel),
54-
new SyncDestinationComponent(
55-
this.connectionManager,
56-
this.configModel,
57-
this.codeSynchronizer
58-
),
59-
new EnvironmentComponent(
60-
this.featureManager,
61-
this.connectionManager,
62-
this.configModel
63-
),
64-
];
45+
private components: Array<BaseComponent>;
6546
constructor(
6647
private readonly connectionManager: ConnectionManager,
6748
private readonly codeSynchronizer: CodeSynchronizer,
@@ -71,6 +52,26 @@ export class ConfigurationDataProvider
7152
private readonly featureManager: FeatureManager,
7253
private readonly workspaceFolderManager: WorkspaceFolderManager
7354
) {
55+
this.components = [
56+
new WorkspaceFolderComponent(this.workspaceFolderManager),
57+
new BundleTargetComponent(this.configModel),
58+
new AuthTypeComponent(
59+
this.connectionManager,
60+
this.configModel,
61+
this.cli
62+
),
63+
new ClusterComponent(this.connectionManager, this.configModel),
64+
new SyncDestinationComponent(
65+
this.connectionManager,
66+
this.configModel,
67+
this.codeSynchronizer
68+
),
69+
new EnvironmentComponent(
70+
this.featureManager,
71+
this.connectionManager,
72+
this.configModel
73+
),
74+
];
7475
this.disposables.push(
7576
this.bundleProjectManager.onDidChangeStatus(async () => {
7677
this._onDidChangeTreeData.fire();

packages/databricks-vscode/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "../../tsconfig_base.json",
33
"compilerOptions": {
44
"outDir": "out",
5-
"lib": ["ES2023", "DOM"],
5+
"lib": ["ES2022", "DOM"],
66
"rootDir": "src"
77
},
88
"references": [{"path": "../databricks-vscode-types"}],

tsconfig_base.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
"sourceMap": true,
77
"allowJs": true,
88
"module": "CommonJS",
9-
"target": "ES2023",
10-
"lib": ["ES2023"],
9+
"target": "ES2022",
10+
"lib": ["ES2022"],
1111
"moduleResolution": "node",
1212
"esModuleInterop": true,
1313
"isolatedModules": true,
1414
"strict": true,
15+
"skipLibCheck": true,
1516
"experimentalDecorators": true,
1617
"emitDecoratorMetadata": true,
1718
"forceConsistentCasingInFileNames": true

yarn.lock

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ __metadata:
394394
eslint-config-prettier: ^9.1.0
395395
eslint-plugin-no-only-tests: ^3.1.0
396396
ts-mockito: ^2.6.1
397-
typescript: ^5.3.3
397+
typescript: ^5.5.0
398398
languageName: unknown
399399
linkType: soft
400400

@@ -10565,6 +10565,16 @@ __metadata:
1056510565
languageName: node
1056610566
linkType: hard
1056710567

10568+
"typescript@npm:^5.5.0":
10569+
version: 5.9.3
10570+
resolution: "typescript@npm:5.9.3"
10571+
bin:
10572+
tsc: bin/tsc
10573+
tsserver: bin/tsserver
10574+
checksum: 0d0ffb84f2cd072c3e164c79a2e5a1a1f4f168e84cb2882ff8967b92afe1def6c2a91f6838fb58b168428f9458c57a2ba06a6737711fdd87a256bbe83e9a217f
10575+
languageName: node
10576+
linkType: hard
10577+
1056810578
"typescript@patch:typescript@^5.3.3#~builtin<compat/typescript>":
1056910579
version: 5.3.3
1057010580
resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin<compat/typescript>::version=5.3.3&hash=7ad353"
@@ -10575,6 +10585,16 @@ __metadata:
1057510585
languageName: node
1057610586
linkType: hard
1057710587

10588+
"typescript@patch:typescript@^5.5.0#~builtin<compat/typescript>":
10589+
version: 5.9.3
10590+
resolution: "typescript@patch:typescript@npm%3A5.9.3#~builtin<compat/typescript>::version=5.9.3&hash=7ad353"
10591+
bin:
10592+
tsc: bin/tsc
10593+
tsserver: bin/tsserver
10594+
checksum: 8bb8d86819ac86a498eada254cad7fb69c5f74778506c700c2a712daeaff21d3a6f51fd0d534fe16903cb010d1b74f89437a3d02d4d0ff5ca2ba9a4660de8497
10595+
languageName: node
10596+
linkType: hard
10597+
1057810598
"uc.micro@npm:^1.0.1, uc.micro@npm:^1.0.5":
1057910599
version: 1.0.6
1058010600
resolution: "uc.micro@npm:1.0.6"

0 commit comments

Comments
 (0)