Skip to content

Commit 77c99b5

Browse files
committed
don't include the shell api twice
1 parent 1965782 commit 77c99b5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/mongodb-ts-autocomplete/scripts/extract-types.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/* eslint-disable no-console */
22
import { promises as fs } from 'fs';
33
import path from 'path';
4-
import { api as ShellApiText } from '@mongosh/shell-api/api';
5-
6-
function replaceImports(code: string) {
7-
// This just makes it possible to work on mql.ts because then the
8-
// IDE finds the import.
9-
return code.replace(/'bson'/g, "'/bson.ts'");
10-
}
4+
import { replaceImports } from '../src/autocompleter';
115

126
async function loadSources(sources: Record<string, string>) {
137
const result: Record<string, string> = {};
@@ -25,7 +19,6 @@ async function run() {
2519
'/mql.ts': path.join(__dirname, '..', 'src', 'fixtures', 'mql.ts'),
2620
};
2721
const files = await loadSources(input);
28-
files['/shell-api.ts'] = replaceImports(ShellApiText);
2922
const code = `
3023
const files = ${JSON.stringify(files)};
3124
export default files;

0 commit comments

Comments
 (0)