Comparing version 4.6.2 to 4.6.3
@@ -25,3 +25,3 @@ { | ||
], | ||
"version": "4.6.2" | ||
"version": "4.6.3" | ||
} |
154
bson.d.ts
import { Buffer } from 'buffer'; | ||
/** | ||
* A class representation of the BSON Binary type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -73,2 +75,3 @@ export declare class Binary { | ||
} | ||
/** @public */ | ||
@@ -81,2 +84,3 @@ export declare interface BinaryExtended { | ||
} | ||
/** @public */ | ||
@@ -87,4 +91,6 @@ export declare interface BinaryExtendedLegacy { | ||
} | ||
/** @public */ | ||
export declare type BinarySequence = Uint8Array | Buffer | number[]; | ||
/** | ||
@@ -126,44 +132,81 @@ * BSON default export | ||
export default BSON; | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_BYTE_ARRAY */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_COLUMN */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_DEFAULT */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_ENCRYPTED */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_FUNCTION */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_MD5 */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_USER_DEFINED */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_UUID */ | ||
/* Excluded from this release type: BSON_BINARY_SUBTYPE_UUID_NEW */ | ||
/* Excluded from this release type: BSON_DATA_ARRAY */ | ||
/* Excluded from this release type: BSON_DATA_BINARY */ | ||
/* Excluded from this release type: BSON_DATA_BOOLEAN */ | ||
/* Excluded from this release type: BSON_DATA_CODE */ | ||
/* Excluded from this release type: BSON_DATA_CODE_W_SCOPE */ | ||
/* Excluded from this release type: BSON_DATA_DATE */ | ||
/* Excluded from this release type: BSON_DATA_DBPOINTER */ | ||
/* Excluded from this release type: BSON_DATA_DECIMAL128 */ | ||
/* Excluded from this release type: BSON_DATA_INT */ | ||
/* Excluded from this release type: BSON_DATA_LONG */ | ||
/* Excluded from this release type: BSON_DATA_MAX_KEY */ | ||
/* Excluded from this release type: BSON_DATA_MIN_KEY */ | ||
/* Excluded from this release type: BSON_DATA_NULL */ | ||
/* Excluded from this release type: BSON_DATA_NUMBER */ | ||
/* Excluded from this release type: BSON_DATA_OBJECT */ | ||
/* Excluded from this release type: BSON_DATA_OID */ | ||
/* Excluded from this release type: BSON_DATA_REGEXP */ | ||
/* Excluded from this release type: BSON_DATA_STRING */ | ||
/* Excluded from this release type: BSON_DATA_SYMBOL */ | ||
/* Excluded from this release type: BSON_DATA_TIMESTAMP */ | ||
/* Excluded from this release type: BSON_DATA_UNDEFINED */ | ||
/* Excluded from this release type: BSON_INT32_MAX */ | ||
/* Excluded from this release type: BSON_INT32_MIN */ | ||
/* Excluded from this release type: BSON_INT64_MAX */ | ||
/* Excluded from this release type: BSON_INT64_MIN */ | ||
/** @public */ | ||
export declare class BSONError extends Error { | ||
constructor(message: string); | ||
readonly name: string; | ||
get name(): string; | ||
} | ||
/** | ||
* A class representation of the BSON RegExp type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -180,3 +223,6 @@ export declare class BSONRegExp { | ||
static parseOptions(options?: string): string; | ||
/* Excluded from this release type: toExtendedJSON */ | ||
/* Excluded from this release type: fromExtendedJSON */ | ||
} | ||
/** @public */ | ||
@@ -189,2 +235,3 @@ export declare interface BSONRegExpExtended { | ||
} | ||
/** @public */ | ||
@@ -195,5 +242,7 @@ export declare interface BSONRegExpExtendedLegacy { | ||
} | ||
/** | ||
* A class representation of the BSON Symbol type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -212,3 +261,6 @@ export declare class BSONSymbol { | ||
toJSON(): string; | ||
/* Excluded from this release type: toExtendedJSON */ | ||
/* Excluded from this release type: fromExtendedJSON */ | ||
} | ||
/** @public */ | ||
@@ -218,7 +270,9 @@ export declare interface BSONSymbolExtended { | ||
} | ||
/** @public */ | ||
export declare class BSONTypeError extends TypeError { | ||
constructor(message: string); | ||
readonly name: string; | ||
get name(): string; | ||
} | ||
/** | ||
@@ -232,7 +286,10 @@ * Calculate the bson size for a passed in Javascript object. | ||
export declare function calculateObjectSize(object: Document, options?: CalculateObjectSizeOptions): number; | ||
/** @public */ | ||
export declare type CalculateObjectSizeOptions = Pick<SerializeOptions, 'serializeFunctions' | 'ignoreUndefined'>; | ||
/** | ||
* A class representation of the BSON Code type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -256,2 +313,3 @@ export declare class Code { | ||
} | ||
/** @public */ | ||
@@ -262,5 +320,7 @@ export declare interface CodeExtended { | ||
} | ||
/** | ||
* A class representation of the BSON DBRef type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -286,2 +346,3 @@ export declare class DBRef { | ||
} | ||
/** @public */ | ||
@@ -293,5 +354,7 @@ export declare interface DBRefLike { | ||
} | ||
/** | ||
* A class representation of the BSON Decimal128 type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -319,2 +382,3 @@ export declare class Decimal128 { | ||
} | ||
/** @public */ | ||
@@ -324,2 +388,3 @@ export declare interface Decimal128Extended { | ||
} | ||
/** | ||
@@ -333,2 +398,3 @@ * Deserialize data as BSON. | ||
export declare function deserialize(buffer: Buffer | ArrayBufferView | ArrayBuffer, options?: DeserializeOptions): Document; | ||
/** @public */ | ||
@@ -380,2 +446,3 @@ export declare interface DeserializeOptions { | ||
} | ||
/** | ||
@@ -394,2 +461,3 @@ * Deserialize stream data as BSON documents. | ||
export declare function deserializeStream(data: Buffer | ArrayBufferView | ArrayBuffer, startIndex: number, numberOfDocuments: number, documents: Document[], docStartIndex: number, options: DeserializeOptions): number; | ||
/** @public */ | ||
@@ -399,5 +467,7 @@ export declare interface Document { | ||
} | ||
/** | ||
* A class representation of the BSON Double type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -425,2 +495,3 @@ export declare class Double { | ||
} | ||
/** @public */ | ||
@@ -430,2 +501,3 @@ export declare interface DoubleExtended { | ||
} | ||
/** | ||
@@ -505,7 +577,10 @@ * EJSON parse / stringify API | ||
} | ||
/** @public */ | ||
export declare type EJSONOptions = EJSON.Options; | ||
/** | ||
* A class representation of a BSON Int32 type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -533,2 +608,3 @@ export declare class Int32 { | ||
} | ||
/** @public */ | ||
@@ -538,7 +614,11 @@ export declare interface Int32Extended { | ||
} | ||
declare const kId: unique symbol; | ||
declare const kId_2: unique symbol; | ||
/** | ||
* A class representing a 64-bit integer | ||
* @public | ||
* @category BSONType | ||
* @remarks | ||
@@ -855,2 +935,3 @@ * The internal representation of a long is the two given signed, 32-bit values. | ||
} | ||
/** @public */ | ||
@@ -860,2 +941,3 @@ export declare interface LongExtended { | ||
} | ||
/** @public */ | ||
@@ -865,10 +947,14 @@ export declare type LongWithoutOverrides = new (low: unknown, high?: number, unsigned?: boolean) => { | ||
}; | ||
/** @public */ | ||
export declare const LongWithoutOverridesClass: LongWithoutOverrides; | ||
/** @public */ | ||
declare let Map_2: MapConstructor; | ||
export { Map_2 as Map }; | ||
export { Map_2 as Map } | ||
/** | ||
* A class representation of the BSON MaxKey type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -882,2 +968,3 @@ export declare class MaxKey { | ||
} | ||
/** @public */ | ||
@@ -887,5 +974,7 @@ export declare interface MaxKeyExtended { | ||
} | ||
/** | ||
* A class representation of the BSON MinKey type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -899,2 +988,3 @@ export declare class MinKey { | ||
} | ||
/** @public */ | ||
@@ -904,5 +994,7 @@ export declare interface MinKeyExtended { | ||
} | ||
/** | ||
* A class representation of the BSON ObjectId type. | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -921,12 +1013,14 @@ declare class ObjectId { | ||
constructor(inputId?: string | number | ObjectId | ObjectIdLike | Buffer | Uint8Array); | ||
/* | ||
* The ObjectId bytes | ||
* @readonly | ||
*/ | ||
id: Buffer; | ||
/* | ||
* The generation time of this ObjectId instance | ||
* @deprecated Please use getTimestamp / createFromTime which returns an int32 epoch | ||
*/ | ||
generationTime: number; | ||
/** | ||
* The ObjectId bytes | ||
* @readonly | ||
*/ | ||
get id(): Buffer; | ||
set id(value: Buffer); | ||
/** | ||
* The generation time of this ObjectId instance | ||
* @deprecated Please use getTimestamp / createFromTime which returns an int32 epoch | ||
*/ | ||
get generationTime(): number; | ||
set generationTime(value: number); | ||
/** Returns the ObjectId id as a 24 character hex string representation */ | ||
@@ -980,4 +1074,5 @@ toHexString(): string; | ||
} | ||
export { ObjectId as ObjectID }; | ||
export { ObjectId }; | ||
export { ObjectId as ObjectID } | ||
export { ObjectId } | ||
/** @public */ | ||
@@ -987,2 +1082,3 @@ export declare interface ObjectIdExtended { | ||
} | ||
/** @public */ | ||
@@ -994,2 +1090,3 @@ export declare interface ObjectIdLike { | ||
} | ||
/** | ||
@@ -1003,2 +1100,3 @@ * Serialize a Javascript object. | ||
export declare function serialize(object: Document, options?: SerializeOptions): Buffer; | ||
/** @public */ | ||
@@ -1016,2 +1114,3 @@ export declare interface SerializeOptions { | ||
} | ||
/** | ||
@@ -1027,2 +1126,3 @@ * Serialize a Javascript object using a predefined Buffer and index into the buffer, | ||
export declare function serializeWithBufferAndIndex(object: Document, finalBuffer: Buffer, options?: SerializeOptions): number; | ||
/** | ||
@@ -1035,3 +1135,7 @@ * Sets the size of the internal serialization buffer. | ||
export declare function setInternalBufferSize(size: number): void; | ||
/** @public */ | ||
/** | ||
* @public | ||
* @category BSONType | ||
* */ | ||
export declare class Timestamp extends LongWithoutOverridesClass { | ||
@@ -1082,2 +1186,3 @@ _bsontype: 'Timestamp'; | ||
} | ||
/** @public */ | ||
@@ -1090,4 +1195,6 @@ export declare interface TimestampExtended { | ||
} | ||
/** @public */ | ||
export declare type TimestampOverrides = '_bsontype' | 'toExtendedJSON' | 'fromExtendedJSON' | 'inspect'; | ||
/** | ||
@@ -1108,8 +1215,9 @@ * A class representation of the BSON UUID type. | ||
constructor(input?: string | Buffer | UUID); | ||
/* | ||
* The UUID bytes | ||
* @readonly | ||
*/ | ||
id: Buffer; | ||
/** | ||
* The UUID bytes | ||
* @readonly | ||
*/ | ||
get id(): Buffer; | ||
set id(value: Buffer); | ||
/** | ||
* Generate a 16 byte uuid v4 buffer used in UUIDs | ||
@@ -1157,2 +1265,3 @@ */ | ||
} | ||
/** @public */ | ||
@@ -1162,2 +1271,3 @@ export declare type UUIDExtended = { | ||
}; | ||
export {}; | ||
export { } |
@@ -12,2 +12,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -14,0 +15,0 @@ var Binary = /** @class */ (function () { |
@@ -7,2 +7,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -9,0 +10,0 @@ var Code = /** @class */ (function () { |
@@ -16,2 +16,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -18,0 +19,0 @@ var DBRef = /** @class */ (function () { |
@@ -100,2 +100,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -102,0 +103,0 @@ var Decimal128 = /** @class */ (function () { |
@@ -7,2 +7,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -9,0 +10,0 @@ var Double = /** @class */ (function () { |
@@ -7,2 +7,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -9,0 +10,0 @@ var Int32 = /** @class */ (function () { |
@@ -29,2 +29,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
* @remarks | ||
@@ -31,0 +32,0 @@ * The internal representation of a long is the two given signed, 32-bit values. |
@@ -7,2 +7,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -9,0 +10,0 @@ var MaxKey = /** @class */ (function () { |
@@ -7,2 +7,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -9,0 +10,0 @@ var MinKey = /** @class */ (function () { |
@@ -16,2 +16,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -18,0 +19,0 @@ var ObjectId = /** @class */ (function () { |
@@ -11,2 +11,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -13,0 +14,0 @@ var BSONRegExp = /** @class */ (function () { |
@@ -7,2 +7,3 @@ "use strict"; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -9,0 +10,0 @@ var BSONSymbol = /** @class */ (function () { |
@@ -23,3 +23,6 @@ "use strict"; | ||
exports.LongWithoutOverridesClass = long_1.Long; | ||
/** @public */ | ||
/** | ||
* @public | ||
* @category BSONType | ||
* */ | ||
var Timestamp = /** @class */ (function (_super) { | ||
@@ -26,0 +29,0 @@ __extends(Timestamp, _super); |
@@ -14,2 +14,3 @@ { | ||
"bson.d.ts", | ||
"bson-ts34.d.ts", | ||
"etc/prepare.js", | ||
@@ -19,3 +20,10 @@ "bower.json" | ||
"types": "bson.d.ts", | ||
"version": "4.6.2", | ||
"typesVersions": { | ||
"<=4.0.2": { | ||
"bson.d.ts": [ | ||
"bson.ts34.d.ts" | ||
] | ||
} | ||
}, | ||
"version": "4.6.3", | ||
"author": { | ||
@@ -46,3 +54,3 @@ "name": "The MongoDB NodeJS Team", | ||
"chai": "^4.2.0", | ||
"downlevel-dts": "^0.7.0", | ||
"downlevel-dts": "^0.9.0", | ||
"eslint": "^7.7.0", | ||
@@ -105,3 +113,3 @@ "eslint-config-prettier": "^6.11.0", | ||
"build:ts": "tsc", | ||
"build:dts": "npm run build:ts && api-extractor run --typescript-compiler-folder node_modules/typescript --local && rimraf 'lib/**/*.d.ts*' && downlevel-dts bson.d.ts bson.d.ts", | ||
"build:dts": "npm run build:ts && api-extractor run --typescript-compiler-folder node_modules/typescript --local && rimraf 'lib/**/*.d.ts*' && downlevel-dts bson.d.ts bson-ts34.d.ts", | ||
"build:bundle": "rollup -c rollup.config.js", | ||
@@ -108,0 +116,0 @@ "build": "npm run build:dts && npm run build:bundle", |
@@ -28,2 +28,3 @@ import { Buffer } from 'buffer'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -30,0 +31,0 @@ export class Binary { |
@@ -12,2 +12,3 @@ import type { Document } from './bson'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -14,0 +15,0 @@ export class Code { |
@@ -26,2 +26,3 @@ import type { Document } from './bson'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -28,0 +29,0 @@ export class DBRef { |
@@ -121,2 +121,3 @@ import { Buffer } from 'buffer'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -123,0 +124,0 @@ export class Decimal128 { |
@@ -11,2 +11,3 @@ import type { EJSONOptions } from './extended_json'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -13,0 +14,0 @@ export class Double { |
@@ -11,2 +11,3 @@ import type { EJSONOptions } from './extended_json'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -13,0 +14,0 @@ export class Int32 { |
@@ -61,2 +61,3 @@ import type { EJSONOptions } from './extended_json'; | ||
* @public | ||
* @category BSONType | ||
* @remarks | ||
@@ -63,0 +64,0 @@ * The internal representation of a long is the two given signed, 32-bit values. |
@@ -9,2 +9,3 @@ /** @public */ | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -11,0 +12,0 @@ export class MaxKey { |
@@ -9,2 +9,3 @@ /** @public */ | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -11,0 +12,0 @@ export class MinKey { |
@@ -29,2 +29,3 @@ import { Buffer } from 'buffer'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -31,0 +32,0 @@ export class ObjectId { |
@@ -25,2 +25,3 @@ import { BSONError, BSONTypeError } from './error'; | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -27,0 +28,0 @@ export class BSONRegExp { |
@@ -9,2 +9,3 @@ /** @public */ | ||
* @public | ||
* @category BSONType | ||
*/ | ||
@@ -11,0 +12,0 @@ export class BSONSymbol { |
@@ -22,3 +22,6 @@ import { Long } from './long'; | ||
/** @public */ | ||
/** | ||
* @public | ||
* @category BSONType | ||
* */ | ||
export class Timestamp extends LongWithoutOverridesClass { | ||
@@ -25,0 +28,0 @@ _bsontype!: 'Timestamp'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2936535
99
40933
15