Socket
Socket
Sign inDemoInstall

riot-tmpl

Package Overview
Dependencies
0
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.1 to 2.4.2

test/.eslintrc.yml

4

CHANGELOG.md
# riot-tmpl Changes
### v2.4.2
- Fix [riot#2002](https://github.com/riot/riot/issues/2002) : getting `Unexpected token '('. Expected a property name.` inside riot.js code (bug present in iOS 9.3.0)
- Fix [riot#1588](https://github.com/riot/riot/issues/1588) : Syntax Error: Invalid character \0129 (riot+compiler.min)
### v2.4.1

@@ -4,0 +8,0 @@ - Fix [riot#1916](https://github.com/riot/riot/issues/1916) : Can't access variable without this in riot 2.5

8

dist/es6.tmpl.js
/**
* The riot template engine
* @version v2.4.1
* @version v2.4.2
*/

@@ -265,3 +265,3 @@ /**

var
CH_IDEXPR = '\u2057',
CH_IDEXPR = String.fromCharCode(0x2057),
RE_CSNAME = /^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,

@@ -382,3 +382,3 @@ RE_QBLOCK = RegExp(brackets.S_QBLOCKS, 'g'),

JS_CONTEXT = '"in this?this:' + (typeof window !== 'object' ? 'global' : 'window') + ').',
JS_VARNAME = /[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_VARNAME = /[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_NOPROPS = /^(?=(\.[$\w]+))\1(?:[^.[(]|$)/

@@ -423,3 +423,3 @@

_tmpl.version = brackets.version = 'v2.4.1'
_tmpl.version = brackets.version = 'v2.4.2'

@@ -426,0 +426,0 @@ return _tmpl

/**
* The riot template engine
* @version v2.4.1
* @version v2.4.2
*/

@@ -261,3 +261,3 @@ /**

var
CH_IDEXPR = '\u2057',
CH_IDEXPR = String.fromCharCode(0x2057),
RE_CSNAME = /^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,

@@ -378,3 +378,3 @@ RE_QBLOCK = RegExp(brackets.S_QBLOCKS, 'g'),

JS_CONTEXT = '"in this?this:' + (typeof window !== 'object' ? 'global' : 'window') + ').',
JS_VARNAME = /[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_VARNAME = /[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_NOPROPS = /^(?=(\.[$\w]+))\1(?:[^.[(]|$)/

@@ -419,3 +419,3 @@

_tmpl.version = brackets.version = 'v2.4.1'
_tmpl.version = brackets.version = 'v2.4.2'

@@ -422,0 +422,0 @@ return _tmpl

/* riot-tmpl v2.4.1, @license MIT, (c) 2015 Muut Inc. + contributors */
/* riot-tmpl v2.4.2, @license MIT, (c) 2015 Muut Inc. + contributors */
;(function (window) { // eslint-disable-line no-extra-semi

@@ -260,3 +260,3 @@ 'use strict'

var
CH_IDEXPR = '\u2057',
CH_IDEXPR = String.fromCharCode(0x2057),
RE_CSNAME = /^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,

@@ -377,3 +377,3 @@ RE_QBLOCK = RegExp(brackets.S_QBLOCKS, 'g'),

JS_CONTEXT = '"in this?this:' + (typeof window !== 'object' ? 'global' : 'window') + ').',
JS_VARNAME = /[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_VARNAME = /[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_NOPROPS = /^(?=(\.[$\w]+))\1(?:[^.[(]|$)/

@@ -422,3 +422,3 @@

tmpl.version = brackets.version = 'v2.4.1'
tmpl.version = brackets.version = 'v2.4.2'

@@ -425,0 +425,0 @@ /* istanbul ignore else */

{
"name": "riot-tmpl",
"version": "2.4.1",
"version": "2.4.2",
"description": "The riot template engine",
"main": "dist/tmpl.js",
"module": "dist/es6.tmpl.js",
"jsnext:main": "dist/es6.tmpl.js",

@@ -32,7 +33,7 @@ "directories": {

"coveralls": "^2.11.12",
"eslint": "^3.3.1",
"eslint": "^3.4.0",
"esprima": "^2.7.2",
"expect.js": "^0.3.1",
"hoister": "0.0.2",
"istanbul": "^0.4.4",
"istanbul": "^0.4.5",
"jspreproc": "^0.2.7",

@@ -43,11 +44,18 @@ "karma": "^1.2.0",

"karma-mocha": "^1.1.1",
"karma-phantomjs-launcher": "^1.0.1",
"karma-phantomjs-launcher": "^1.0.2",
"mocha": "^3.0.2",
"phantomjs-prebuilt": "^2.1.12",
"riot-bump": "^1.0.0",
"rollup": "^0.34.10",
"rollup-plugin-commonjs": "^3.3.1",
"rollup": "^0.36.3",
"rollup-plugin-commonjs": "^5.0.5",
"rollup-plugin-node-resolve": "^2.0.0"
},
"author": "Muut, Inc. and other contributors",
"author": "Riot maintainers team + smart people from all over the world",
"contributors": [
"Richard Bondi https://github.com/rsbondi",
"Gianluca Guarini https://github.com/GianlucaGuarini",
"Tsutomu Kawamura https://github.com/cognitom",
"Alberto Martínez https://github.com/aMarCruz",
"Tero Piirainen https://github.com/tipiirai"
],
"license": "MIT",

@@ -54,0 +62,0 @@ "bugs": {

@@ -22,5 +22,3 @@ [![Build Status][travis-image]][travis-url]

```sh
$ bower install riot-tmpl --save
```
From v2.4.2, bower is not supported.

@@ -34,9 +32,9 @@ ## Documentation

- Expressions: `tmpl('{ value }', data)`.
- Expressions: `tmpl('{ value }', data)`.
Returns the result of evaluated expression as a raw object.
- Templates: `tmpl('Hi { name } { surname }', data)`.
- Templates: `tmpl('Hi { name } { surname }', data)`.
Returns a string with evaluated expressions.
- Filters: `tmpl('{ show: !done, highlight: active }', data)`.
- Filters: `tmpl('{ show: !done, highlight: active }', data)`.
Returns a space separated list of trueish keys (mainly used for setting html classes), e.g. "show highlight".

@@ -76,3 +74,2 @@

* Attributes with expressions containing `>` must be quoted
* The new `brackets.set` function avoids direct assignment to `riot.settings.brackets`

@@ -79,0 +76,0 @@ See [API](doc/API.md) and [CHANGES](doc/CHANGES.md) for details.

@@ -171,3 +171,3 @@ /**

var
CH_IDEXPR = '\u2057',
CH_IDEXPR = String.fromCharCode(0x2057),
RE_CSNAME = /^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,

@@ -338,3 +338,3 @@ RE_QBLOCK = RegExp(brackets.S_QBLOCKS, 'g'),

JS_CONTEXT = '"in this?this:' + (typeof window !== 'object' ? 'global' : 'window') + ').',
JS_VARNAME = /[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_VARNAME = /[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,
JS_NOPROPS = /^(?=(\.[$\w]+))\1(?:[^.[(]|$)/

@@ -341,0 +341,0 @@

@@ -1,12 +0,9 @@

var isNode = typeof window === 'undefined'
describe('Tmpl Tests', function () {
describe('Tmpl Tests', function () {
if (isNode) {
var _ = require('../dist/tmpl')
expect = require('expect.js')
tmpl = _.tmpl
brackets = _.brackets
require('./specs/core.specs.js')
require('./specs/brackets.specs.js')
}
expect = require('expect.js')
tmpl = require('../dist/tmpl').tmpl
brackets = require('../dist/tmpl').brackets
require('./specs/core.specs.js')
require('./specs/brackets.specs.js')
})

@@ -1,4 +0,2 @@

/* eslint-env mocha */
/* eslint max-len: 0 */
/* global riot, tmpl, brackets, expect */

@@ -5,0 +3,0 @@ describe('brackets', function () {

@@ -1,4 +0,3 @@

/*eslint-env mocha */
/*eslint camelcase: 0, max-len: 0 */
/*global tmpl, brackets, expect, globalVar:true */
/*global globalVar:true */

@@ -335,2 +334,12 @@ globalVar = 5

it('Fix riot#2002 issue with the `JS_VARNAME` regex failing in iOS 9.3.0', function () {
data.t = function (s, o) { return s.replace('__storeCount__', o.storeCount) }
data.storeCount = 1
var result = render("{ t('Please choose from the __storeCount__ stores available', {storeCount: this.storeCount}) }", 1)
expect(result).to.be('Please choose from the 1 stores available')
delete data.t
delete data.storeCount
})
describe('support for comments has been dropped', function () {

@@ -337,0 +346,0 @@ // comments within expresions are converted to spaces, in concordance with js specs

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc