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

krl-compiler

Package Overview
Dependencies
Maintainers
2
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krl-compiler - npm Package Compare versions

Comparing version 0.35.4 to 0.40.0

17

package.json
{
"name": "krl-compiler",
"version": "0.35.4",
"version": "0.40.0",
"description": "KRL compiler",

@@ -14,4 +14,4 @@ "main": "src/index.js",

"scripts": {
"start": "onchange -i src/ test-rulesets/ -- npm test -s",
"lint": "eslint src/ && echo lint-ok",
"start": "onchange -i src/ ../../test-rulesets/ -- npm test -s",
"lint": "../../node_modules/.bin/eslint src/ && echo lint-ok",
"test": "npm run lint -s && node src/tests.js"

@@ -21,3 +21,3 @@ },

"type": "git",
"url": "git+https://github.com/Picolab/node-krl-compiler.git"
"url": "git+https://github.com/Picolab/pico-engine.git"
},

@@ -32,11 +32,10 @@ "keywords": [

"bugs": {
"url": "https://github.com/Picolab/node-krl-compiler/issues"
"url": "https://github.com/Picolab/pico-engine/issues"
},
"homepage": "https://github.com/Picolab/node-krl-compiler#readme",
"homepage": "https://github.com/Picolab/pico-engine#readme",
"devDependencies": {
"contra": "^1.9.4",
"diff-lines": "^1.1.0",
"eslint": "^3.3.1",
"onchange": "^3.0.0",
"tape": "^4.6.0"
"tape": "^4.8.0"
},

@@ -48,3 +47,3 @@ "dependencies": {

"estree-loc": "^2.0.0",
"krl-parser": "^0.24.0",
"krl-parser": "^0.40.0",
"lodash": "^4.13.1",

@@ -51,0 +50,0 @@ "minimist": "^1.2.0"

@@ -8,3 +8,3 @@ var _ = require("lodash");

&& ast.callee.property.type === "Identifier"
){
){
//operator syntax is just sugar for stdlib functions

@@ -11,0 +11,0 @@ var operator = ast.callee.property;

@@ -11,10 +11,10 @@ var _ = require("lodash");

fn_body.push(e("var", "matches",
callModuleFn(e, "event", "attrMatches", e("array", [
e("array", _.map(ast.event_attrs, function(a){
return e("array", [
e("string", a.key.value, a.key.loc),
comp(a.value)
], a.loc);
}))
]), ast.loc)));
callModuleFn(e, "event", "attrMatches", e("array", [
e("array", _.map(ast.event_attrs, function(a){
return e("array", [
e("string", a.key.value, a.key.loc),
comp(a.value)
], a.loc);
}))
]), ast.loc)));
fn_body.push(e("if", e("!", e("id", "matches")), e("return", e("false"))));

@@ -41,16 +41,16 @@ }else if(!_.isEmpty(ast.setting)){

fn_body.push(e(";",
e("ycall",
e("id", "aggregateEvent", ast.aggregator.loc),
[
e("id", "ctx", ast.aggregator.loc),
e("string", ast.aggregator.op, ast.aggregator.loc),
e("array", _.map(ast.aggregator.args, function(a, i){
return e("array", [
e("string", a.value, a.loc),
e("get", e("id", "matches", a.loc), e("num", i, a.loc), a.loc)
], a.loc);
}), ast.aggregator.loc)
],
ast.aggregator.loc
), ast.aggregator.loc));
e("ycall",
e("id", "aggregateEvent", ast.aggregator.loc),
[
e("id", "ctx", ast.aggregator.loc),
e("string", ast.aggregator.op, ast.aggregator.loc),
e("array", _.map(ast.aggregator.args, function(a, i){
return e("array", [
e("string", a.value, a.loc),
e("get", e("id", "matches", a.loc), e("num", i, a.loc), a.loc)
], a.loc);
}), ast.aggregator.loc)
],
ast.aggregator.loc
), ast.aggregator.loc));
}

@@ -57,0 +57,0 @@

@@ -9,3 +9,3 @@ var _ = require("lodash");

var files_dir = path.resolve(__dirname, "../test-rulesets");
var files_dir = path.resolve(__dirname, "../../../test-rulesets");

@@ -12,0 +12,0 @@ test("compiler", function(t){

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