Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@deepkit/bson

deepkit7.2kMIT1.0.19TypeScript support: included

Deepkit BSON parser

readme




Formerly Deepkit — renamed after European Union “no genuine use” ruling. Trademarks don't like open-source.



Discord npm CI

This is a new modular TypeScript framework for backend applications based on runtime types.

Docs

Check out the Documentation to get started.

Getting started

To create an app from scratch, you can use NPM init:

npm init @deepkit/app@latest my-deepkit-app

Community Packages

  • OpenAPI: Automatic OpenAPI doc and Swagger UI generation based on HTTP routes.
  • Serverless Adapter: Run Deepkit on top of AWS Lambda, Azure, Digital Ocean and many other clouds.
  • REST: DeepKit REST opens up a whole new declarative and extensive approach for developing REST APIs.
  • Stripe: Interacting with the Stripe API or consuming Stripe webhooks in your Deepkit applications is now easy as pie 🥧.
  • GraphQL: Create GraphQL servers using Deepkit
  • Apollo Server: Run your Deepkit GraphQL server using Apollo
  • Remix: Create Remix apps using Deepkit as the server
  • Remix Validated Form: Use Deepkit Type as form validator for Remix
  • Nx Webpack Plugin: Nx Webpack plugin for Deepkit

Examples

Contributing

If you are interested in contributing to the development, check out the Development Docs to learn more about setting up your local development environment.

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

1.0.19 (2025-09-22)

Note: Version bump only for package @deepkit/bson

1.0.18 (2025-09-22)

Note: Version bump only for package @deepkit/bson

1.0.15 (2025-06-26)

Features

  • desktop-ui: refactor to standalone/signal, update angular to v20, new website docs (#657) (a39d26c)

1.0.12 (2025-06-05)

Bug Fixes

  • bson: ensure to seek over invalid elements in parser element lookup (378a922)

1.0.11 (2025-06-02)

Features

  • bson: support deserialization of OID and all number types to string as fallback union member matcher (83020c2)

1.0.9 (2025-05-23)

Bug Fixes

  • bson: rename type to BsonEncoder (815f9a0)

Features

  • bson: add TypeEncoder to encode all BSON types (not only container types) to BSON (3f2aaf9)
  • bson: make TypeEncoder also validate on encode and on the decoded value to (d803bfb)

1.0.8 (2025-05-20)

Features

  • bson: add AutoBuffer to allow very fast buffer reuse in BSON serialization (d8cdd6b)

1.0.7 (2025-04-18)

Bug Fixes

  • bson: serialize bigint in any container as long (8a67d96)

1.0.5 (2025-04-02)

Bug Fixes

  • bson: bigint with isNaN checks (b46e228)

Features

  • bson: convert if-else branch to lookup (3589e62)

1.0.3 (2025-03-13)

Features

  • bson: new BsonStreamReader (3faa77a)

1.0.2 (2025-02-24)

Note: Version bump only for package @deepkit/bson

1.0.1 (2025-02-24)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.160 (2025-02-18)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.158 (2025-02-15)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.157 (2025-02-15)

Bug Fixes

Features

  • update to angular 19 and typescript 5.7.3, new @deepkit/angular-ssr package (#627) (52333a7)

1.0.1-alpha.156 (2025-01-30)

Bug Fixes

  • bson: initial random value of incremental counter of ObjectId (fb1263d)
  • bson: throw on invalid string data (423df6c)

Features

  • bson: decrease threshold to when TextDecoder is used to decoder utf8 (4daed1c)

1.0.1-alpha.155 (2024-10-30)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.154 (2024-09-06)

Bug Fixes

  • bson: make sure index signature keys use full utf8 encoding (d447c1d)

Features

  • rpc: make Buffer dependency optional (2f32a12)

1.0.1-alpha.153 (2024-06-06)

Bug Fixes

  • bson: make sure NaN is deserialized as 0 (7b19397)

Features

  • type: automatically assign .path to SerializationError in TemplateState.convert() errors (23781a1)

1.0.1-alpha.151 (2024-05-14)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.150 (2024-05-09)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.149 (2024-05-07)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.148 (2024-05-04)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.147 (2024-05-04)

Bug Fixes

  • type: make sure handled constructor properties are not set twice (2e82eb6)

1.0.1-alpha.146 (2024-04-17)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.145 (2024-04-08)

Bug Fixes

  • type guard handing of empty Map/Set (da4cf82)

1.0.1-alpha.143 (2024-03-17)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.142 (2024-03-06)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.141 (2024-03-05)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.140 (2024-03-02)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.139 (2024-02-29)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.138 (2024-02-27)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.137 (2024-02-26)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.135 (2024-02-16)

Features

  • rpc: reuse type cache across connections + made strictSerialization(false) less strict (1b55b08)

1.0.1-alpha.134 (2024-02-15)

Bug Fixes

  • bson: allow to serialize null to optional property (77b0020)

Features

  • rpc: allow to disable strict serialization and validation (d7a8155)

1.0.1-alpha.133 (2024-02-15)

Bug Fixes

  • bson: fix surrogate pair decoding (cb9f648)

Features

  • bson: export new wrapObjectId/wrapUUId for faster any serialization (718839b)

1.0.1-alpha.132 (2024-02-10)

Features

  • mongo: export custom command API (d82ccd1)

1.0.1-alpha.131 (2024-02-09)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.124 (2024-02-04)

Bug Fixes

  • type: handle more circular types (5f6bd12), closes #477

1.0.1-alpha.123 (2024-02-02)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.121 (2024-01-31)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.120 (2024-01-29)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.119 (2024-01-28)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.117 (2024-01-26)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.116 (2024-01-22)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.114 (2024-01-21)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.113 (2024-01-17)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.112 (2024-01-16)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.111 (2024-01-15)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.110 (2024-01-11)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.109 (2024-01-10)

Bug Fixes

1.0.1-alpha.108 (2023-11-21)

Note: Version bump only for package @deepkit/bson

1.0.1-alpha.105 (2023-10-23)

Note: Version bump only for package @deepkit/bson