{"library":"bson-transpilers","type":"library","category":null,"description":"Source-to-source compiler for BSON document expressions, converting between shell input and multiple output languages (Java, C#, Node.js, Python, Ruby, Go). Current stable version is 3.3.5. Developed by MongoDB for Compass, it uses ANTLR for parsing. The shell output is disabled and only intended for legacy mongo shell, not mongosh. Python support was removed but remains in an older commit. The library supports both Query and Pipeline modes, and can generate import statements automatically. It is the primary tool for converting MongoDB shell syntax to driver code in different languages, with error codes and line/column details for syntax errors.","language":"javascript","status":"active","version":"3.3.5","tags":["javascript"],"last_verified":"Fri May 01","install":[{"cmd":"npm install bson-transpilers","imports":["const transpiler = require('bson-transpilers');","const result = transpiler.shell.java.compile(code);","const imports = transpiler.shell.java.getImports('Query', true);","} catch (error) { console.log(error.code, error.line, error.column); }"]},{"cmd":"yarn add bson-transpilers","imports":[]},{"cmd":"pnpm add bson-transpilers","imports":[]}],"homepage":null,"github":"https://github.com/mongodb-js/compass","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/bson-transpilers","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}