Skip to content

Commit 39ce982

Browse files
authored
chore(deps): update typescript to latest COMPASS-9531 (#7093)
* chore(deps): update typescript to latest * chore(scripts): add preset for typescript updates * fix(typescript): resolve a bunch of instances of TS2742: The inferred type cannot be named without internal reference * fix(compass-main): deal with misc module resolution issues * fix(settings): fix use before define by removing unused variable * fix(query-bar): do not allow to clone the placeholder DOM to make sure that event listeners stay attached * chore(query-bar): better fix for codemirror placeholder issue
1 parent b675388 commit 39ce982

File tree

81 files changed

+396
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+396
-395
lines changed

configs/mocha-config-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"identity-obj-proxy": "^3.0.0",
3434
"react-16-node-hanging-test-fix": "^1.0.0",
3535
"sinon-chai": "^3.7.0",
36-
"ts-node": "^10.9.1",
36+
"ts-node": "^10.9.2",
3737
"why-is-node-running": "^2.2.2"
3838
}
3939
}

configs/testing-library-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"depcheck": "^1.4.1",
5757
"mocha": "^10.2.0",
5858
"nyc": "^15.1.0",
59-
"typescript": "^5.0.4"
59+
"typescript": "^5.8.3"
6060
},
6161
"dependencies": {
6262
"@testing-library/react": "^12.1.5",

configs/testing-library-compass/src/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ function createWrapper(
283283
const wrapperState = {
284284
globalAppRegistry: new AppRegistry(),
285285
localAppRegistry: new AppRegistry(),
286-
preferences: new InMemoryPreferencesAccess(options.preferences),
286+
preferences: new InMemoryPreferencesAccess(
287+
options.preferences
288+
) as PreferencesAccess,
287289
track: Sinon.stub(),
288290
logger: createNoopLogger(),
289291
connectionStorage:
@@ -585,6 +587,12 @@ function createPluginWrapper<
585587
return { ref, Wrapper: ComponentWithProvider };
586588
}
587589

590+
export type RenderPluginWithConnectionsResult<
591+
T extends CompassPluginComponent<any, any, any>
592+
> = RenderWithConnectionsResult & {
593+
plugin: ReturnType<T['useActivate']>;
594+
};
595+
588596
function createPluginTestHelpers<
589597
Props,
590598
ServiceLocators extends Record<string, () => unknown>,

configs/tsconfig-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"tsconfig.react.json"
99
],
1010
"peerDependencies": {
11-
"typescript": "^5.0.4"
11+
"typescript": "^5.8.3"
1212
},
1313
"devDependencies": {
1414
"@mongodb-js/prettier-config-compass": "^1.2.8"

configs/tsconfig-compass/tsconfig.common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json",
33
"compilerOptions": {
44
"removeComments": false,
5-
"moduleResolution": "node16"
5+
"moduleResolution": "node16",
6+
"module": "node16"
67
}
78
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.react.json",
33
"compilerOptions": {
4-
"removeComments": false
4+
"removeComments": false,
5+
"moduleResolution": "node16",
6+
"module": "node16"
57
}
68
}

configs/webpack-config-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@types/html-webpack-plugin": "^3.2.9",
5353
"@types/webpack-bundle-analyzer": "^4.7.0",
5454
"depcheck": "^1.4.1",
55-
"typescript": "^5.0.4"
55+
"typescript": "^5.8.3"
5656
},
5757
"dependencies": {
5858
"@babel/core": "^7.21.4",

0 commit comments

Comments
 (0)