Skip to content

chore: use typescript project references #6675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ config/*/.npmrc
.sbom
.logs
.evergreen/logs

# Typescript incremental build info
*.tsbuildinfo
2 changes: 1 addition & 1 deletion packages/compass-components/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = {
extends: ['@mongodb-js/eslint-config-compass'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig-lint.json'],
project: ['./tsconfig.json'],
},
};
1 change: 0 additions & 1 deletion packages/compass-components/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
lib
11 changes: 5 additions & 6 deletions packages/compass-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
"version": "1.34.0",
"description": "React Components used in Compass",
"license": "SSPL",
"main": "lib/index.js",
"main": "dist/index.js",
"compass:main": "src/index.ts",
"compass:exports": {
".": "./src/index.ts"
},
"types": "./lib/index.d.ts",
"types": "./dist/index.d.ts",
"files": [
"lib"
"dist"
],
"scripts": {
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"clean": "node -e \"fs.rmSync('lib', { recursive: true, force: true })\" || true",
"precompile": "npm run clean",
"compile": "tsc -p tsconfig.json",
"clean": "tsc --build --clean",
"compile": "tsc --build",
"eslint": "eslint",
"prettier": "prettier",
"lint": "npm run eslint . && npm run prettier -- --check .",
Expand Down
5 changes: 0 additions & 5 deletions packages/compass-components/tsconfig-lint.json

This file was deleted.

8 changes: 5 additions & 3 deletions packages/compass-components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"extends": "@mongodb-js/tsconfig-compass/tsconfig.react.json",
"compilerOptions": {
"outDir": "lib"
"composite": true,
"outDir": "dist",
"rootDir": "src"
},
"include": ["src/**/*"],
"exclude": ["./src/**/*.spec.*", "./src/**/*.test.*"]
"include": ["src"],
"exclude": ["src/**/*.spec.*", "./src/**/*.test.*"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ import { Binary } from 'bson';

import ConnectionForm from '../../../';
import { getNextKmsProviderName } from './kms-provider-content';
import { FileInputBackendProvider } from '@mongodb-js/compass-components';
import { createJSDomFileInputDummyBackend } from '@mongodb-js/compass-components/lib/components/file-input';
import {
FileInputBackendProvider,
createJSDomFileInputDummyBackend,
} from '@mongodb-js/compass-components';

const openAdvancedTab = async (
tabId: 'general' | 'authentication' | 'tls' | 'proxy' | 'advanced' | 'csfle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import type { SSHConnectionOptions } from '../../../utils/connection-ssh-handler
import SSHTunnelIdentity from './ssh-tunnel-identity';
import type { ConnectionFormError } from '../../../utils/validation';
import { errorMessageByFieldName } from '../../../utils/validation';
import { FileInputBackendProvider } from '@mongodb-js/compass-components';
import { createJSDomFileInputDummyBackend } from '@mongodb-js/compass-components/lib/components/file-input';
import {
FileInputBackendProvider,
createJSDomFileInputDummyBackend,
} from '@mongodb-js/compass-components';

const formFields: {
key: keyof SSHConnectionOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import sinon from 'sinon';
import ConnectionStringUrl from 'mongodb-connection-string-url';

import SSLTab, { getTLSOptionForConnectionString } from './tls-ssl-tab';
import { FileInputBackendProvider } from '@mongodb-js/compass-components';
import { createJSDomFileInputDummyBackend } from '@mongodb-js/compass-components/lib/components/file-input';
import {
FileInputBackendProvider,
createJSDomFileInputDummyBackend,
} from '@mongodb-js/compass-components';

describe('SchemaInput', function () {
let updateConnectionFormFieldSpy: sinon.SinonSpy;
Expand Down