Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion src/bson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,40 @@ import { BSONSymbol } from './symbol';
import { Timestamp } from './timestamp';
export { BinaryExtended, BinaryExtendedLegacy, BinarySequence } from './binary';
export { CodeExtended } from './code';
export * from './constants';
export {
Copy link
Contributor

Choose a reason for hiding this comment

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

why did this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what introduces the tslib import, exportStar needs some actions to replicate for commonjs.

https://github.com/microsoft/tslib/blob/fcba93d415a6d84914916769ba17871902dd4598/tslib.es6.js#L114

BSON_BINARY_SUBTYPE_BYTE_ARRAY,
BSON_BINARY_SUBTYPE_DEFAULT,
BSON_BINARY_SUBTYPE_FUNCTION,
BSON_BINARY_SUBTYPE_MD5,
BSON_BINARY_SUBTYPE_USER_DEFINED,
BSON_BINARY_SUBTYPE_UUID,
BSON_BINARY_SUBTYPE_UUID_NEW,
BSON_DATA_ARRAY,
BSON_DATA_BINARY,
BSON_DATA_BOOLEAN,
BSON_DATA_CODE,
BSON_DATA_CODE_W_SCOPE,
BSON_DATA_DATE,
BSON_DATA_DBPOINTER,
BSON_DATA_DECIMAL128,
BSON_DATA_INT,
BSON_DATA_LONG,
BSON_DATA_MAX_KEY,
BSON_DATA_MIN_KEY,
BSON_DATA_NULL,
BSON_DATA_NUMBER,
BSON_DATA_OBJECT,
BSON_DATA_OID,
BSON_DATA_REGEXP,
BSON_DATA_STRING,
BSON_DATA_SYMBOL,
BSON_DATA_TIMESTAMP,
BSON_DATA_UNDEFINED,
BSON_INT32_MAX,
BSON_INT32_MIN,
BSON_INT64_MAX,
BSON_INT64_MIN
} from './constants';
export { DBRefLike } from './db_ref';
export { Decimal128Extended } from './decimal128';
export { DoubleExtended } from './double';
Expand Down
2 changes: 1 addition & 1 deletion src/long.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ export class Long {
}
/** This is an alias of {@link Long.greaterThanOrEqual} */
ge(other: string | number | Long | Timestamp): boolean {
return this.greaterThan(other);
return this.greaterThanOrEqual(other);
}

/** Tests if this Long's value is even. */
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"outDir": "lib",
// We don't make use of tslib helpers
"importHelpers": true,
"importHelpers": false,
"noEmitHelpers": false,
"noEmitOnError": true,
// make use of import type where applicable
Expand Down