Socket
Socket
Sign inDemoInstall

riot-compiler

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riot-compiler - npm Package Compare versions

Comparing version 3.1.4 to 3.2.0

23

dist/es6.compiler.js
/**
* Compiler for riot custom tags
* @version v3.1.4
* @version v3.2.0
*/

@@ -189,3 +189,3 @@

var IMPORT_STATEMENT = /^\s*import(?:(?:\s|[^\s'"])*)['|"].*\n?/gm
var IMPORT_STATEMENT = /^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm

@@ -349,3 +349,3 @@ var TRIM_TRAIL = /[ \t]+$/gm

var JS_ES6SIGN = /^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m
var JS_ES6SIGN = /^[ \t]*(((?:async)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m

@@ -362,2 +362,4 @@ var JS_ES6END = RegExp('[{}]|' + brackets.S_QBLOCKS, 'g')

pos,
method,
prefix,
name,

@@ -374,5 +376,14 @@ RE = RegExp

name = match[1]
method = match[1]
prefix = match[2] || ''
name = match[3]
toes5 = !/^(?:if|while|for|switch|catch|function)$/.test(name)
name = toes5 ? match[0].replace(name, 'this.' + name + ' = function') : match[0]
if (toes5) {
name = match[0].replace(method, 'this.' + name + ' =' + prefix + ' function')
} else {
name = match[0]
}
parts.push(name, js.slice(0, pos))

@@ -731,3 +742,3 @@ js = js.slice(pos)

var version = 'v3.1.4'
var version = 'v3.2.0'

@@ -734,0 +745,0 @@ export default {

@@ -160,3 +160,3 @@

* Compiler for riot custom tags
* @version v3.1.4
* @version v3.2.0
*/

@@ -188,3 +188,3 @@ var compile = (function () {

var IMPORT_STATEMENT = /^\s*import(?:(?:\s|[^\s'"])*)['|"].*\n?/gm
var IMPORT_STATEMENT = /^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm

@@ -348,3 +348,3 @@ var TRIM_TRAIL = /[ \t]+$/gm

var JS_ES6SIGN = /^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m
var JS_ES6SIGN = /^[ \t]*(((?:async)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m

@@ -361,2 +361,4 @@ var JS_ES6END = RegExp('[{}]|' + brackets.S_QBLOCKS, 'g')

pos,
method,
prefix,
name,

@@ -373,5 +375,14 @@ RE = RegExp

name = match[1]
method = match[1]
prefix = match[2] || ''
name = match[3]
toes5 = !/^(?:if|while|for|switch|catch|function)$/.test(name)
name = toes5 ? match[0].replace(name, 'this.' + name + ' = function') : match[0]
if (toes5) {
name = match[0].replace(method, 'this.' + name + ' =' + prefix + ' function')
} else {
name = match[0]
}
parts.push(name, js.slice(0, pos))

@@ -735,3 +746,3 @@ js = js.slice(pos)

js: compileJS,
version: 'v3.1.4'
version: 'v3.2.0'
}

@@ -738,0 +749,0 @@ return compile

/**
* The riot-compiler v3.1.4
* The riot-compiler v3.2.0
*
* @module compiler
* @version v3.1.4
* @version v3.2.0
* @license MIT

@@ -108,3 +108,3 @@ * @copyright Muut Inc. + contributors

*/
var IMPORT_STATEMENT = /^\s*import(?:(?:\s|[^\s'"])*)['|"].*\n?/gm
var IMPORT_STATEMENT = /^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm

@@ -341,3 +341,3 @@ /**

*/
var JS_ES6SIGN = /^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m
var JS_ES6SIGN = /^[ \t]*(((?:async)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m

@@ -373,2 +373,4 @@ /**

pos,
method,
prefix,
name,

@@ -385,5 +387,14 @@ RE = RegExp

name = match[1]
method = match[1]
prefix = match[2] || ''
name = match[3]
toes5 = !/^(?:if|while|for|switch|catch|function)$/.test(name)
name = toes5 ? match[0].replace(name, 'this.' + name + ' = function') : match[0]
if (toes5) {
name = match[0].replace(method, 'this.' + name + ' =' + prefix + ' function')
} else {
name = match[0]
}
parts.push(name, js.slice(0, pos))

@@ -1004,3 +1015,3 @@ js = js.slice(pos)

parsers: parsers,
version: 'v3.1.4'
version: 'v3.2.0'
}
{
"name": "riot-compiler",
"version": "3.1.4",
"version": "3.2.0",
"description": "Compiler for riot .tag files",

@@ -5,0 +5,0 @@ "main": "lib/compiler.js",

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