Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@riotjs/compiler

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@riotjs/compiler - npm Package Compare versions

Comparing version 6.1.2 to 6.1.3

2

package.json
{
"name": "@riotjs/compiler",
"version": "6.1.2",
"version": "6.1.3",
"description": "Compiler for riot .tag files",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -28,3 +28,4 @@ import {

isLiteral,
isMemberExpression
isMemberExpression,
isObjectExpression
} from '../../utils/ast-nodes-checks'

@@ -213,3 +214,16 @@ import {nullNode, simplePropertyNode} from '../../utils/custom-ast-nodes'

export function wrapASTInFunctionWithScope(ast) {
return builders.arrowFunctionExpression([scope], ast)
const fn = builders.arrowFunctionExpression([scope], ast)
// object expressions need to be wrapped in parenthesis
// recast doesn't allow it
// see also https://github.com/benjamn/recast/issues/985
if (isObjectExpression(ast)) {
// doing a small hack here f
// trying to figure out how the recast printer works internally
ast.extra = {
parenthesized: true
}
}
return fn
}

@@ -216,0 +230,0 @@

@@ -11,2 +11,3 @@ import globalScope from 'globals'

export const isThisExpression = n => namedTypes.ThisExpression.check(n)
export const isObjectExpression = n => namedTypes.ObjectExpression.check(n)
export const isThisExpressionStatement = n =>

@@ -13,0 +14,0 @@ isExpressionStatement(n) &&

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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