Skip to content
Merged
2 changes: 1 addition & 1 deletion configs/mocha-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"identity-obj-proxy": "^3.0.0",
"react-16-node-hanging-test-fix": "^1.0.0",
"sinon-chai": "^3.7.0",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"why-is-node-running": "^2.2.2"
}
}
2 changes: 1 addition & 1 deletion configs/testing-library-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"depcheck": "^1.4.1",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"typescript": "^5.0.4"
"typescript": "^5.8.3"
},
"dependencies": {
"@testing-library/react": "^12.1.5",
Expand Down
10 changes: 9 additions & 1 deletion configs/testing-library-compass/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ function createWrapper(
const wrapperState = {
globalAppRegistry: new AppRegistry(),
localAppRegistry: new AppRegistry(),
preferences: new InMemoryPreferencesAccess(options.preferences),
preferences: new InMemoryPreferencesAccess(
options.preferences
) as PreferencesAccess,
Comment on lines +286 to +288
Copy link
Collaborator Author

@gribnoysup gribnoysup Jul 4, 2025

Choose a reason for hiding this comment

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

For all those TS2742 cases, sometimes it was easier (and better, we don't actually want these types to escape module boundaries in most cases) to make sure that internal interfaces are not leaking

track: Sinon.stub(),
logger: createNoopLogger(),
connectionStorage:
Expand Down Expand Up @@ -585,6 +587,12 @@ function createPluginWrapper<
return { ref, Wrapper: ComponentWithProvider };
}

export type RenderPluginWithConnectionsResult<
T extends CompassPluginComponent<any, any, any>
> = RenderWithConnectionsResult & {
plugin: ReturnType<T['useActivate']>;
};

function createPluginTestHelpers<
Props,
ServiceLocators extends Record<string, () => unknown>,
Expand Down
2 changes: 1 addition & 1 deletion configs/tsconfig-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tsconfig.react.json"
],
"peerDependencies": {
"typescript": "^5.0.4"
"typescript": "^5.8.3"
},
"devDependencies": {
"@mongodb-js/prettier-config-compass": "^1.2.8"
Expand Down
3 changes: 2 additions & 1 deletion configs/tsconfig-compass/tsconfig.common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json",
"compilerOptions": {
"removeComments": false,
"moduleResolution": "node16"
"moduleResolution": "node16",
"module": "node16"
}
}
4 changes: 3 additions & 1 deletion configs/tsconfig-compass/tsconfig.react.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.react.json",
"compilerOptions": {
"removeComments": false
"removeComments": false,
"moduleResolution": "node16",
"module": "node16"
}
}
2 changes: 1 addition & 1 deletion configs/webpack-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@types/html-webpack-plugin": "^3.2.9",
"@types/webpack-bundle-analyzer": "^4.7.0",
"depcheck": "^1.4.1",
"typescript": "^5.0.4"
"typescript": "^5.8.3"
},
"dependencies": {
"@babel/core": "^7.21.4",
Expand Down
Loading