Skip to content

Commit 37fa446

Browse files
committed
Merge branch 'shell-api-ac-type-definitions-fork' of https://github.com/mongodb-js/mongosh into shell-api-ac-type-definitions-fork
2 parents 3b29328 + 637500e commit 37fa446

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/shell-api/bin/api-postprocess.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async function main() {
136136
);
137137

138138
const exportCode = `"use strict";
139-
module.exports = ${JSON.stringify(code)};
139+
module.exports = { api: ${JSON.stringify(code)} };
140140
`;
141141
await fs.writeFile(
142142
path.resolve(__dirname, '..', 'lib', 'api-export.js'),
@@ -145,7 +145,7 @@ module.exports = ${JSON.stringify(code)};
145145

146146
await fs.writeFile(
147147
path.resolve(__dirname, '..', 'lib', 'api-export.d.ts'),
148-
'declare const _default: string; export default _default;'
148+
'export declare const api;'
149149
);
150150
}
151151

packages/shell-api/src/mongo.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ describe('Mongo', function () {
940940
expect(coll._database._name).to.equal('db1');
941941
});
942942

943-
it('throws if name is not a valid collnection string', function () {
943+
it('throws if name is not a valid collection string', function () {
944944
expect(() => {
945945
// @ts-expect-error db is not valid, but that's the point of the test
946946
mongo.getCollection('db');

0 commit comments

Comments
 (0)