From 295e75904b08f6069f925fb37cf4d575b64daf2e Mon Sep 17 00:00:00 2001 From: Victor Wilson Pinto Bastos Date: Mon, 5 Jan 2015 14:07:27 -0200 Subject: [PATCH 1/3] change template version --- package.json | 2 +- rcu.amd.js | 72 +++++++++++++++++++++++++++------------------------- rcu.es6.js | 62 ++++++++++++++++++++++---------------------- rcu.js | 72 +++++++++++++++++++++++++++------------------------- rcu.node.js | 62 ++++++++++++++++++++++---------------------- src/parse.js | 2 +- 6 files changed, 140 insertions(+), 132 deletions(-) diff --git a/package.json b/package.json index 533fb52..0ac7c6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rcu", - "version": "0.3.0", + "version": "0.3.2", "description": "Utilities for implementing Ractive.js component loaders", "license": "MIT", "repository": "https://github.com/ractivejs/rcu", diff --git a/rcu.amd.js b/rcu.amd.js index 25222b1..d15d560 100644 --- a/rcu.amd.js +++ b/rcu.amd.js @@ -1,9 +1,9 @@ /* - rcu (Ractive component utils) - 0.3.0 - 2014-10-08 + rcu (Ractive component utils) - 0.3.2 - 2015-01-05 ============================================================== - Copyright 2014 Rich Harris and contributors + Copyright 2015 Rich Harris and contributors Released under the MIT license. */ @@ -41,7 +41,7 @@ define( function() { }, includeLinePositions: true } ); - if ( parsed.v !== 1 ) { + if ( parsed.v >= 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; @@ -145,13 +145,13 @@ define( function() { }( getName ); /* - eval2.js - 0.2.0 - 2014-09-28 - ============================================================== + eval2.js - 0.2.0 - 2014-09-28 + ============================================================== - Copyright 2014 Rich Harris - Released under the MIT license. + Copyright 2014 Rich Harris + Released under the MIT license. -*/ + */ eval2 = function() { var _eval, isBrowser, isNode, head, Module, base64Encode; // This causes code to be eval'd in the global scope @@ -237,7 +237,8 @@ define( function() { } function clone( obj ) { - var cloned = {}, key; + var cloned = {}, + key; for ( key in obj ) { if ( obj.hasOwnProperty( key ) ) { cloned[ key ] = obj[ key ]; @@ -249,9 +250,10 @@ define( function() { }(); ( function( global ) { var vlq = { - encode: encode, - decode: decode - }, charToInteger, integerToChar; + encode: encode, + decode: decode + }, + charToInteger, integerToChar; charToInteger = {}; integerToChar = {}; 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split( '' ).forEach( function( char, i ) { @@ -294,31 +296,31 @@ define( function() { } function decode( string ) { - var result = [], - len = string.length, - i, hasContinuationBit, shift = 0, - value = 0; - for ( i = 0; i < len; i += 1 ) { - integer = charToInteger[ string[ i ] ]; - if ( integer === undefined ) { - throw new Error( 'Invalid character (' + string[ i ] + ')' ); - } - hasContinuationBit = integer & 32; - integer &= 31; - value += integer << shift; - if ( hasContinuationBit ) { - shift += 5; - } else { - shouldNegate = value & 1; - value >>= 1; - result.push( shouldNegate ? -value : value ); - // reset - value = shift = 0; + var result = [], + len = string.length, + i, hasContinuationBit, shift = 0, + value = 0; + for ( i = 0; i < len; i += 1 ) { + integer = charToInteger[ string[ i ] ]; + if ( integer === undefined ) { + throw new Error( 'Invalid character (' + string[ i ] + ')' ); + } + hasContinuationBit = integer & 32; + integer &= 31; + value += integer << shift; + if ( hasContinuationBit ) { + shift += 5; + } else { + shouldNegate = value & 1; + value >>= 1; + result.push( shouldNegate ? -value : value ); + // reset + value = shift = 0; + } } + return result; } - return result; - } - // Export as AMD + // Export as AMD if ( true ) { _vlq_ = function() { return typeof vlq === 'function' ? vlq() : vlq; diff --git a/rcu.es6.js b/rcu.es6.js index abd66b8..2df3348 100644 --- a/rcu.es6.js +++ b/rcu.es6.js @@ -1,9 +1,9 @@ /* - rcu (Ractive component utils) - 0.3.0 - 2014-10-08 + rcu (Ractive component utils) - 0.3.2 - 2015-01-05 ============================================================== - Copyright 2014 Rich Harris and contributors + Copyright 2015 Rich Harris and contributors Released under the MIT license. */ @@ -37,7 +37,7 @@ parse = function( getName ) { }, includeLinePositions: true } ); - if ( parsed.v !== 1 ) { + if ( parsed.v >= 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; @@ -233,7 +233,8 @@ eval2 = function() { } function clone( obj ) { - var cloned = {}, key; + var cloned = {}, + key; for ( key in obj ) { if ( obj.hasOwnProperty( key ) ) { cloned[ key ] = obj[ key ]; @@ -245,9 +246,10 @@ eval2 = function() { }(); ( function( global ) { var vlq = { - encode: encode, - decode: decode - }, charToInteger, integerToChar; + encode: encode, + decode: decode + }, + charToInteger, integerToChar; charToInteger = {}; integerToChar = {}; 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split( '' ).forEach( function( char, i ) { @@ -290,31 +292,31 @@ eval2 = function() { } function decode( string ) { - var result = [], - len = string.length, - i, hasContinuationBit, shift = 0, - value = 0; - for ( i = 0; i < len; i += 1 ) { - integer = charToInteger[ string[ i ] ]; - if ( integer === undefined ) { - throw new Error( 'Invalid character (' + string[ i ] + ')' ); - } - hasContinuationBit = integer & 32; - integer &= 31; - value += integer << shift; - if ( hasContinuationBit ) { - shift += 5; - } else { - shouldNegate = value & 1; - value >>= 1; - result.push( shouldNegate ? -value : value ); - // reset - value = shift = 0; + var result = [], + len = string.length, + i, hasContinuationBit, shift = 0, + value = 0; + for ( i = 0; i < len; i += 1 ) { + integer = charToInteger[ string[ i ] ]; + if ( integer === undefined ) { + throw new Error( 'Invalid character (' + string[ i ] + ')' ); + } + hasContinuationBit = integer & 32; + integer &= 31; + value += integer << shift; + if ( hasContinuationBit ) { + shift += 5; + } else { + shouldNegate = value & 1; + value >>= 1; + result.push( shouldNegate ? -value : value ); + // reset + value = shift = 0; + } } + return result; } - return result; - } - // Export as AMD + // Export as AMD if ( true ) { _vlq_ = function() { return typeof vlq === 'function' ? vlq() : vlq; diff --git a/rcu.js b/rcu.js index 7a1ecf2..996cab8 100644 --- a/rcu.js +++ b/rcu.js @@ -1,9 +1,9 @@ /* - rcu (Ractive component utils) - 0.3.0 - 2014-10-08 + rcu (Ractive component utils) - 0.3.2 - 2015-01-05 ============================================================== - Copyright 2014 Rich Harris and contributors + Copyright 2015 Rich Harris and contributors Released under the MIT license. */ @@ -41,7 +41,7 @@ }, includeLinePositions: true } ); - if ( parsed.v !== 1 ) { + if ( parsed.v >= 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; @@ -145,13 +145,13 @@ }( getName ); /* - eval2.js - 0.2.0 - 2014-09-28 - ============================================================== + eval2.js - 0.2.0 - 2014-09-28 + ============================================================== - Copyright 2014 Rich Harris - Released under the MIT license. + Copyright 2014 Rich Harris + Released under the MIT license. -*/ + */ eval2 = function() { var _eval, isBrowser, isNode, head, Module, base64Encode; // This causes code to be eval'd in the global scope @@ -237,7 +237,8 @@ } function clone( obj ) { - var cloned = {}, key; + var cloned = {}, + key; for ( key in obj ) { if ( obj.hasOwnProperty( key ) ) { cloned[ key ] = obj[ key ]; @@ -249,9 +250,10 @@ }(); ( function( global ) { var vlq = { - encode: encode, - decode: decode - }, charToInteger, integerToChar; + encode: encode, + decode: decode + }, + charToInteger, integerToChar; charToInteger = {}; integerToChar = {}; 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split( '' ).forEach( function( char, i ) { @@ -294,31 +296,31 @@ } function decode( string ) { - var result = [], - len = string.length, - i, hasContinuationBit, shift = 0, - value = 0; - for ( i = 0; i < len; i += 1 ) { - integer = charToInteger[ string[ i ] ]; - if ( integer === undefined ) { - throw new Error( 'Invalid character (' + string[ i ] + ')' ); - } - hasContinuationBit = integer & 32; - integer &= 31; - value += integer << shift; - if ( hasContinuationBit ) { - shift += 5; - } else { - shouldNegate = value & 1; - value >>= 1; - result.push( shouldNegate ? -value : value ); - // reset - value = shift = 0; + var result = [], + len = string.length, + i, hasContinuationBit, shift = 0, + value = 0; + for ( i = 0; i < len; i += 1 ) { + integer = charToInteger[ string[ i ] ]; + if ( integer === undefined ) { + throw new Error( 'Invalid character (' + string[ i ] + ')' ); + } + hasContinuationBit = integer & 32; + integer &= 31; + value += integer << shift; + if ( hasContinuationBit ) { + shift += 5; + } else { + shouldNegate = value & 1; + value >>= 1; + result.push( shouldNegate ? -value : value ); + // reset + value = shift = 0; + } } + return result; } - return result; - } - // Export as AMD + // Export as AMD if ( true ) { _vlq_ = function() { return typeof vlq === 'function' ? vlq() : vlq; diff --git a/rcu.node.js b/rcu.node.js index f53f718..98edcb9 100644 --- a/rcu.node.js +++ b/rcu.node.js @@ -1,9 +1,9 @@ /* - rcu (Ractive component utils) - 0.3.0 - 2014-10-08 + rcu (Ractive component utils) - 0.3.2 - 2015-01-05 ============================================================== - Copyright 2014 Rich Harris and contributors + Copyright 2015 Rich Harris and contributors Released under the MIT license. */ @@ -37,7 +37,7 @@ parse = function( getName ) { }, includeLinePositions: true } ); - if ( parsed.v !== 1 ) { + if ( parsed.v >= 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; @@ -233,7 +233,8 @@ eval2 = function() { } function clone( obj ) { - var cloned = {}, key; + var cloned = {}, + key; for ( key in obj ) { if ( obj.hasOwnProperty( key ) ) { cloned[ key ] = obj[ key ]; @@ -245,9 +246,10 @@ eval2 = function() { }(); ( function( global ) { var vlq = { - encode: encode, - decode: decode - }, charToInteger, integerToChar; + encode: encode, + decode: decode + }, + charToInteger, integerToChar; charToInteger = {}; integerToChar = {}; 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split( '' ).forEach( function( char, i ) { @@ -290,31 +292,31 @@ eval2 = function() { } function decode( string ) { - var result = [], - len = string.length, - i, hasContinuationBit, shift = 0, - value = 0; - for ( i = 0; i < len; i += 1 ) { - integer = charToInteger[ string[ i ] ]; - if ( integer === undefined ) { - throw new Error( 'Invalid character (' + string[ i ] + ')' ); - } - hasContinuationBit = integer & 32; - integer &= 31; - value += integer << shift; - if ( hasContinuationBit ) { - shift += 5; - } else { - shouldNegate = value & 1; - value >>= 1; - result.push( shouldNegate ? -value : value ); - // reset - value = shift = 0; + var result = [], + len = string.length, + i, hasContinuationBit, shift = 0, + value = 0; + for ( i = 0; i < len; i += 1 ) { + integer = charToInteger[ string[ i ] ]; + if ( integer === undefined ) { + throw new Error( 'Invalid character (' + string[ i ] + ')' ); + } + hasContinuationBit = integer & 32; + integer &= 31; + value += integer << shift; + if ( hasContinuationBit ) { + shift += 5; + } else { + shouldNegate = value & 1; + value >>= 1; + result.push( shouldNegate ? -value : value ); + // reset + value = shift = 0; + } } + return result; } - return result; - } - // Export as AMD + // Export as AMD if ( true ) { _vlq_ = function() { return typeof vlq === 'function' ? vlq() : vlq; diff --git a/src/parse.js b/src/parse.js index 4153766..a04eee7 100644 --- a/src/parse.js +++ b/src/parse.js @@ -15,7 +15,7 @@ export default function parse ( source ) { includeLinePositions: true }); - if ( parsed.v !== 1 ) { + if ( parsed.v >= 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } From fdf99f5f34333fa051deb17e27c4d83226297692 Mon Sep 17 00:00:00 2001 From: Victor Wilson Pinto Bastos Date: Mon, 5 Jan 2015 14:09:21 -0200 Subject: [PATCH 2/3] change template version --- package.json | 2 +- rcu.amd.js | 2 +- rcu.es6.js | 2 +- rcu.js | 2 +- rcu.node.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0ac7c6a..345f840 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rcu", - "version": "0.3.2", + "version": "0.3.1", "description": "Utilities for implementing Ractive.js component loaders", "license": "MIT", "repository": "https://github.com/ractivejs/rcu", diff --git a/rcu.amd.js b/rcu.amd.js index d15d560..2356581 100644 --- a/rcu.amd.js +++ b/rcu.amd.js @@ -1,6 +1,6 @@ /* - rcu (Ractive component utils) - 0.3.2 - 2015-01-05 + rcu (Ractive component utils) - 0.3.1 - 2015-01-05 ============================================================== Copyright 2015 Rich Harris and contributors diff --git a/rcu.es6.js b/rcu.es6.js index 2df3348..bc52815 100644 --- a/rcu.es6.js +++ b/rcu.es6.js @@ -1,6 +1,6 @@ /* - rcu (Ractive component utils) - 0.3.2 - 2015-01-05 + rcu (Ractive component utils) - 0.3.1 - 2015-01-05 ============================================================== Copyright 2015 Rich Harris and contributors diff --git a/rcu.js b/rcu.js index 996cab8..d8ae79c 100644 --- a/rcu.js +++ b/rcu.js @@ -1,6 +1,6 @@ /* - rcu (Ractive component utils) - 0.3.2 - 2015-01-05 + rcu (Ractive component utils) - 0.3.1 - 2015-01-05 ============================================================== Copyright 2015 Rich Harris and contributors diff --git a/rcu.node.js b/rcu.node.js index 98edcb9..228eb7d 100644 --- a/rcu.node.js +++ b/rcu.node.js @@ -1,6 +1,6 @@ /* - rcu (Ractive component utils) - 0.3.2 - 2015-01-05 + rcu (Ractive component utils) - 0.3.1 - 2015-01-05 ============================================================== Copyright 2015 Rich Harris and contributors From 1954ce510fce2beccb5cc8c76c931129a1410360 Mon Sep 17 00:00:00 2001 From: Victor Wilson Pinto Bastos Date: Mon, 5 Jan 2015 14:48:44 -0200 Subject: [PATCH 3/3] change template version --- rcu.amd.js | 2 +- rcu.es6.js | 2 +- rcu.js | 2 +- rcu.node.js | 2 +- src/parse.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rcu.amd.js b/rcu.amd.js index 2356581..bd8f761 100644 --- a/rcu.amd.js +++ b/rcu.amd.js @@ -41,7 +41,7 @@ define( function() { }, includeLinePositions: true } ); - if ( parsed.v >= 1 ) { + if ( parsed.v < 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; diff --git a/rcu.es6.js b/rcu.es6.js index bc52815..98b10f6 100644 --- a/rcu.es6.js +++ b/rcu.es6.js @@ -37,7 +37,7 @@ parse = function( getName ) { }, includeLinePositions: true } ); - if ( parsed.v >= 1 ) { + if ( parsed.v < 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; diff --git a/rcu.js b/rcu.js index d8ae79c..9692691 100644 --- a/rcu.js +++ b/rcu.js @@ -41,7 +41,7 @@ }, includeLinePositions: true } ); - if ( parsed.v >= 1 ) { + if ( parsed.v < 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; diff --git a/rcu.node.js b/rcu.node.js index 228eb7d..65071bb 100644 --- a/rcu.node.js +++ b/rcu.node.js @@ -37,7 +37,7 @@ parse = function( getName ) { }, includeLinePositions: true } ); - if ( parsed.v >= 1 ) { + if ( parsed.v < 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); } links = []; diff --git a/src/parse.js b/src/parse.js index a04eee7..e259391 100644 --- a/src/parse.js +++ b/src/parse.js @@ -15,7 +15,7 @@ export default function parse ( source ) { includeLinePositions: true }); - if ( parsed.v >= 1 ) { + if ( parsed.v < 1 ) { throw new Error( 'Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app' ); }