New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bson-transpilers

Package Overview
Dependencies
Maintainers
29
Versions
503
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bson-transpilers - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

codegeneration/ruby/Generator.js

5

codegeneration/python/Visitor.js

@@ -331,7 +331,8 @@ /* eslint camelcase: 0 complexity: 0*/

if (op === '==' || op === '!=' || op === 'is' || op === 'isnot') {
skip = true;
if (this.Syntax.equality) {
return `${str}${this.Syntax.equality.template(
this.visit(arr[i - 1]), op, '')}`;
this.visit(arr[i - 1]), op, this.visit(arr[i + 1]))}`;
}
return `${str} === ${this.visit(arr[i - 1])} ${op} `;
return `${str} === ${this.visit(arr[i - 1])} ${op} ${this.visit(arr[i + 1])}`;
}

@@ -338,0 +339,0 @@ if (op === 'in' || op === 'notin') {

2

compile-symbol-table.js

@@ -62,3 +62,3 @@ /* eslint-disable no-sync */

const inputLangs = ['javascript', 'shell', 'python'];
const outputLangs = ['java', 'shell', 'python', 'csharp', 'javascript', 'object'];
const outputLangs = ['java', 'shell', 'python', 'csharp', 'javascript', 'object', 'ruby'];
if (!fs.existsSync(dir)) {

@@ -65,0 +65,0 @@ fs.mkdirSync(dir);

@@ -19,2 +19,7 @@ # Contributing to bson-transpilers

Make sure you have run the following from the root directory:
```shell
$ npm run bootstrap
```
Then compile and run tests locally with:

@@ -330,3 +335,5 @@ ```shell

```
Make sure to add your output language in the outputLanguages array at the beginning
of `run-yaml.test.js`, and to the list near the end of `functions.test.js`.
## Adding an Input Language
TODO!

@@ -29,2 +29,3 @@ const antlr4 = require('antlr4');

const getObjectGenerator = require('./codegeneration/object/Generator');
const getRubyGenerator = require('./codegeneration/ruby/Generator.js');

@@ -36,2 +37,3 @@ const javascriptjavasymbols = require('./lib/symbol-table/javascripttojava');

const javascriptobjectsymbols = require('./lib/symbol-table/javascripttoobject');
const javascriptrubysymbols = require('./lib/symbol-table/javascripttoruby');

@@ -43,2 +45,3 @@ const shelljavasymbols = require('./lib/symbol-table/shelltojava');

const shellobjectsymbols = require('./lib/symbol-table/shelltoobject');
const shellrubysymbols = require('./lib/symbol-table/shelltoruby');

@@ -50,2 +53,3 @@ const pythonjavasymbols = require('./lib/symbol-table/pythontojava');

const pythonobjectsymbols = require('./lib/symbol-table/pythontoobject');
const pythonrubysymbols = require('./lib/symbol-table/pythontoruby');

@@ -210,2 +214,8 @@ /**

javascriptobjectsymbols
),
ruby: getTranspiler(
loadJSTree,
getJavascriptVisitor(getCodeGenerationVisitor(JavascriptANTLRVisitor)),
getRubyGenerator,
javascriptrubysymbols
)

@@ -243,2 +253,8 @@ },

shellobjectsymbols
),
ruby: getTranspiler(
loadJSTree,
getShellVisitor(getJavascriptVisitor(getCodeGenerationVisitor(JavascriptANTLRVisitor))),
getRubyGenerator,
shellrubysymbols
)

@@ -276,2 +292,8 @@ },

pythonobjectsymbols
),
ruby: getTranspiler(
loadPyTree,
getPythonVisitor(getCodeGenerationVisitor(PythonANTLRVisitor)),
getRubyGenerator,
pythonrubysymbols
)

@@ -278,0 +300,0 @@ },

{
"name": "bson-transpilers",
"version": "1.4.0",
"version": "1.5.0",
"apiVersion": "0.0.1",

@@ -55,3 +55,3 @@ "productName": "BSON Transpilers",

},
"gitHead": "77166e3754e36e95c7ff7efb5a0ce5e0990b0ff7"
"gitHead": "6563679c816fa44691a53b7e27fa0cb5539e0854"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc