[Pkg-javascript-commits] [node-jsondiffpatch] 03/05: Imported Upstream version 0.1.8

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Fri Sep 12 23:55:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to branch master
in repository node-jsondiffpatch.

commit a20d7b6b3a7f445bffed00aa2075b98e0d28a79d
Author: Andrew Kelley <superjoe30 at gmail.com>
Date:   Fri Sep 12 23:54:30 2014 +0000

    Imported Upstream version 0.1.8
---
 build/bundle-full.js     |  9 +++++---
 build/bundle-full.min.js |  4 ++--
 build/bundle.js          |  9 +++++---
 build/bundle.min.js      |  2 +-
 build/formatters.js      |  7 ++++--
 build/formatters.min.js  |  2 +-
 build/test-bundle.js     | 60 +++++++++++++++++++++++-------------------------
 package.json             | 38 +++++++++++++++---------------
 8 files changed, 69 insertions(+), 62 deletions(-)

diff --git a/build/bundle-full.js b/build/bundle-full.js
index 3b9fa78..be1e40e 100644
--- a/build/bundle-full.js
+++ b/build/bundle-full.js
@@ -2209,8 +2209,11 @@ process.argv = [];
 function noop() {}
 
 process.on = noop;
+process.addListener = noop;
 process.once = noop;
 process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
 process.emit = noop;
 
 process.binding = function (name) {
@@ -2440,11 +2443,11 @@ if (inNode) {
 	exports.console = formatters.console;
 } else {
 	exports.homepage = 'https://github.com/benjamine/jsondiffpatch';
-	exports.version = '0.1.7';
+	exports.version = '0.1.8';
 }
 
-}).call(this,_dereq_("/Users/Benja/proj/jsondiffpatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))
-},{"./date-reviver":7,"./diffpatcher":8,"/Users/Benja/proj/jsondiffpatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":2}],10:[function(_dereq_,module,exports){
+}).call(this,_dereq_("1YiZ5S"))
+},{"./date-reviver":7,"./diffpatcher":8,"1YiZ5S":2}],10:[function(_dereq_,module,exports){
 
 var DiffContext = _dereq_('../contexts/diff').DiffContext;
 var PatchContext = _dereq_('../contexts/patch').PatchContext;
diff --git a/build/bundle-full.min.js b/build/bundle-full.min.js
index e42618b..a9f5462 100644
--- a/build/bundle-full.min.js
+++ b/build/bundle-full.min.js
@@ -1,2 +1,2 @@
-!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.jsondiffpatch=t()}}(function(){return function t(e,r,n){function i(f,o){if(!r[f]){if(!e[f]){var a="function"==typeof require&&require;if(!o&&a)return a(f,!0);if(s)return s(f,!0);throw new Error("Cannot find module '"+f+"'")}var h=r[f]={exports:{}};e[f][0]. [...]
-},{"../../external/diff_match_patch_uncompressed":1}],15:[function(t,e,r){var n="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},i=function(t){if(t.left===t.right)return void t.setResult(void 0).exit();if("undefined"==typeof t.left){if("function"==typeof t.right)throw new Error("functions are not supported");return void t.setResult([t.right]).exit()}if("undefined"==typeof t.right)return void t.setResult([t.left,0,0]).exit();if("function"==typeof t.lef [...]
\ No newline at end of file
+!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.jsondiffpatch=t()}}(function(){return function t(e,r,n){function i(f,a){if(!r[f]){if(!e[f]){var h="function"==typeof require&&require;if(!a&&h)return h(f,!0);if(s)return s(f,!0);throw new Error("Cannot find module '"+f+"'")}var o=r[f]={exports:{}};e[f][0]. [...]
+if("undefined"==typeof t.left){if("function"==typeof t.right)throw new Error("functions are not supported");return void t.setResult([t.right]).exit()}if("undefined"==typeof t.right)return void t.setResult([t.left,0,0]).exit();if("function"==typeof t.left||"function"==typeof t.right)throw new Error("functions are not supported");return t.leftType=null===t.left?"null":typeof t.left,t.rightType=null===t.right?"null":typeof t.right,t.leftType!==t.rightType?void t.setResult([t.left,t.right]). [...]
\ No newline at end of file
diff --git a/build/bundle.js b/build/bundle.js
index 87182fb..d5f4236 100644
--- a/build/bundle.js
+++ b/build/bundle.js
@@ -46,8 +46,11 @@ process.argv = [];
 function noop() {}
 
 process.on = noop;
+process.addListener = noop;
 process.once = noop;
 process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
 process.emit = noop;
 
 process.binding = function (name) {
@@ -277,11 +280,11 @@ if (inNode) {
 	exports.console = formatters.console;
 } else {
 	exports.homepage = 'https://github.com/benjamine/jsondiffpatch';
-	exports.version = '0.1.7';
+	exports.version = '0.1.8';
 }
 
-}).call(this,_dereq_("/Users/Benja/proj/jsondiffpatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))
-},{"./date-reviver":6,"./diffpatcher":7,"/Users/Benja/proj/jsondiffpatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":1}],9:[function(_dereq_,module,exports){
+}).call(this,_dereq_("1YiZ5S"))
+},{"./date-reviver":6,"./diffpatcher":7,"1YiZ5S":1}],9:[function(_dereq_,module,exports){
 
 var DiffContext = _dereq_('../contexts/diff').DiffContext;
 var PatchContext = _dereq_('../contexts/patch').PatchContext;
diff --git a/build/bundle.min.js b/build/bundle.min.js
index 4a5ddb5..c515f61 100644
--- a/build/bundle.min.js
+++ b/build/bundle.min.js
@@ -1 +1 @@
-!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jsondiffpatch=e()}}(function(){return function e(t,r,i){function n(s,f){if(!r[s]){if(!t[s]){var l="function"==typeof require&&require;if(!f&&l)return l(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var a=r[s]={exports:{}};t[s][0]. [...]
\ No newline at end of file
+!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jsondiffpatch=e()}}(function(){return function e(t,r,i){function n(s,f){if(!r[s]){if(!t[s]){var l="function"==typeof require&&require;if(!f&&l)return l(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var a=r[s]={exports:{}};t[s][0]. [...]
\ No newline at end of file
diff --git a/build/formatters.js b/build/formatters.js
index c066c18..6e75d8b 100644
--- a/build/formatters.js
+++ b/build/formatters.js
@@ -46,8 +46,11 @@ process.argv = [];
 function noop() {}
 
 process.on = noop;
+process.addListener = noop;
 process.once = noop;
 process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
 process.emit = noop;
 
 process.binding = function (name) {
@@ -481,8 +484,8 @@ var inNode = typeof process !== 'undefined' && typeof process.execPath === 'stri
 if (inNode) {
 	exports.console = _dereq_('./' + 'console');
 }
-}).call(this,_dereq_("/Users/Benja/proj/jsondiffpatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))
-},{"./annotated":2,"./html":5,"/Users/Benja/proj/jsondiffpatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":1}],5:[function(_dereq_,module,exports){
+}).call(this,_dereq_("oMfpAn"))
+},{"./annotated":2,"./html":5,"oMfpAn":1}],5:[function(_dereq_,module,exports){
 
 var base = _dereq_('./base');
 var BaseFormatter = base.BaseFormatter;
diff --git a/build/formatters.min.js b/build/formatters.min.js
index 4599712..14292d1 100644
--- a/build/formatters.min.js
+++ b/build/formatters.min.js
@@ -1 +1 @@
-!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),(e.jsondiffpatch||(e.jsondiffpatch={})).formatters=t()}}(function(){return function t(e,o,n){function r(a,f){if(!o[a]){if(!e[a]){var d="function"==typeof require&&require;if(!f&&d)return d(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"' [...]
\ No newline at end of file
+!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),(e.jsondiffpatch||(e.jsondiffpatch={})).formatters=t()}}(function(){return function t(e,o,n){function r(a,f){if(!o[a]){if(!e[a]){var d="function"==typeof require&&require;if(!f&&d)return d(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"' [...]
\ No newline at end of file
diff --git a/build/test-bundle.js b/build/test-bundle.js
index 88f8ff9..02cb7bf 100644
--- a/build/test-bundle.js
+++ b/build/test-bundle.js
@@ -1287,13 +1287,11 @@
 
 }).call(this,require("buffer").Buffer)
 },{"buffer":2}],2:[function(require,module,exports){
-/**
+/*!
  * The buffer module from node.js, for the browser.
  *
- * Author:   Feross Aboukhadijeh <feross at feross.org> <http://feross.org>
- * License:  MIT
- *
- * `npm install buffer`
+ * @author   Feross Aboukhadijeh <feross at feross.org> <http://feross.org>
+ * @license  MIT
  */
 
 var base64 = require('base64-js')
@@ -1310,17 +1308,14 @@ Buffer.poolSize = 8192
  *   === false   Use Object implementation (compatible down to IE6)
  */
 Buffer._useTypedArrays = (function () {
-   // Detect if browser supports Typed Arrays. Supported browsers are IE 10+,
-   // Firefox 4+, Chrome 7+, Safari 5.1+, Opera 11.6+, iOS 4.2+.
-  if (typeof Uint8Array !== 'function' || typeof ArrayBuffer !== 'function')
-    return false
-
-  // Does the browser support adding properties to `Uint8Array` instances? If
-  // not, then that's the same as no `Uint8Array` support. We need to be able to
-  // add all the node Buffer API methods.
-  // Bug in Firefox 4-29, now fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=695438
+  // Detect if browser supports Typed Arrays. Supported browsers are IE 10+, Firefox 4+,
+  // Chrome 7+, Safari 5.1+, Opera 11.6+, iOS 4.2+. If the browser does not support adding
+  // properties to `Uint8Array` instances, then that's the same as no `Uint8Array` support
+  // because we need to be able to add all the node Buffer API methods. This is an issue
+  // in Firefox 4-29. Now fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=695438
   try {
-    var arr = new Uint8Array(0)
+    var buf = new ArrayBuffer(0)
+    var arr = new Uint8Array(buf)
     arr.foo = function () { return 42 }
     return 42 === arr.foo() &&
         typeof arr.subarray === 'function' // Chrome 9-10 lack `subarray`
@@ -1363,14 +1358,14 @@ function Buffer (subject, encoding, noZero) {
   else if (type === 'string')
     length = Buffer.byteLength(subject, encoding)
   else if (type === 'object')
-    length = coerce(subject.length) // Assume object is an array
+    length = coerce(subject.length) // assume that object is array-like
   else
     throw new Error('First argument needs to be a number, array or string.')
 
   var buf
   if (Buffer._useTypedArrays) {
     // Preferred: Return an augmented `Uint8Array` instance for best performance
-    buf = augment(new Uint8Array(length))
+    buf = Buffer._augment(new Uint8Array(length))
   } else {
     // Fallback: Return THIS instance of Buffer (created by `new`)
     buf = this
@@ -1379,9 +1374,8 @@ function Buffer (subject, encoding, noZero) {
   }
 
   var i
-  if (Buffer._useTypedArrays && typeof Uint8Array === 'function' &&
-      subject instanceof Uint8Array) {
-    // Speed optimization -- use set if we're copying from a Uint8Array
+  if (Buffer._useTypedArrays && typeof subject.byteLength === 'number') {
+    // Speed optimization -- use set if we're copying from a typed array
     buf._set(subject)
   } else if (isArrayish(subject)) {
     // Treat array-ish objects as a byte array
@@ -1678,9 +1672,14 @@ Buffer.prototype.copy = function (target, target_start, start, end) {
   if (target.length - target_start < end - start)
     end = target.length - target_start + start
 
-  // copy!
-  for (var i = 0; i < end - start; i++)
-    target[i + target_start] = this[i + start]
+  var len = end - start
+
+  if (len < 100 || !Buffer._useTypedArrays) {
+    for (var i = 0; i < len; i++)
+      target[i + target_start] = this[i + start]
+  } else {
+    target._set(this.subarray(start, start + len), target_start)
+  }
 }
 
 function _base64Slice (buf, start, end) {
@@ -1749,7 +1748,7 @@ Buffer.prototype.slice = function (start, end) {
   end = clamp(end, len, len)
 
   if (Buffer._useTypedArrays) {
-    return augment(this.subarray(start, end))
+    return Buffer._augment(this.subarray(start, end))
   } else {
     var sliceLen = end - start
     var newBuf = new Buffer(sliceLen, undefined, true)
@@ -2192,7 +2191,7 @@ Buffer.prototype.inspect = function () {
  * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
  */
 Buffer.prototype.toArrayBuffer = function () {
-  if (typeof Uint8Array === 'function') {
+  if (typeof Uint8Array !== 'undefined') {
     if (Buffer._useTypedArrays) {
       return (new Buffer(this)).buffer
     } else {
@@ -2217,9 +2216,9 @@ function stringtrim (str) {
 var BP = Buffer.prototype
 
 /**
- * Augment the Uint8Array *instance* (not the class!) with Buffer methods
+ * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
  */
-function augment (arr) {
+Buffer._augment = function (arr) {
   arr._isBuffer = true
 
   // save reference to original Uint8Array get/set methods before overwriting
@@ -2408,7 +2407,6 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
     ? Uint8Array
     : Array
 
-	var ZERO   = '0'.charCodeAt(0)
 	var PLUS   = '+'.charCodeAt(0)
 	var SLASH  = '/'.charCodeAt(0)
 	var NUMBER = '0'.charCodeAt(0)
@@ -2517,9 +2515,9 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
 		return output
 	}
 
-	module.exports.toByteArray = b64ToByteArray
-	module.exports.fromByteArray = uint8ToBase64
-}())
+	exports.toByteArray = b64ToByteArray
+	exports.fromByteArray = uint8ToBase64
+}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
 
 },{}],4:[function(require,module,exports){
 exports.read = function(buffer, offset, isLE, mLen, nBytes) {
diff --git a/package.json b/package.json
index f520eda..8abf960 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "jsondiffpatch",
-  "version": "0.1.7",
+  "version": "0.1.8",
   "author": "Benjamin Eidelman <beneidel at gmail.com>",
   "description": "Diff & Patch for Javascript objects",
   "contributors": [
@@ -24,29 +24,29 @@
   ],
   "devDependencies": {
     "expect.js": "~0.3.1",
-    "karma-script-launcher": "~0.1.0",
-    "karma-chrome-launcher": "~0.1.2",
-    "karma-firefox-launcher": "~0.1.3",
-    "karma-html2js-preprocessor": "~0.1.0",
-    "karma-mocha": "~0.1.1",
-    "karma-phantomjs-launcher": "~0.1.2",
-    "karma": "~0.10.9",
-    "karma-spec-reporter": "~0.0.10",
     "gulp": "~3.5.2",
-    "gulp-util": "~2.2.14",
     "gulp-browserify": "~0.4.4",
-    "gulp-rename": "~1.1.0",
-    "gulp-uglify": "~0.2.1",
-    "gulp-mocha": "~0.4.1",
-    "gulp-load-plugins": "~0.3.0",
-    "gulp-karma": "0.0.2",
-    "mocha": "~1.17.1",
-    "karma-growler-reporter": "~0.0.1",
     "gulp-clean": "~0.2.4",
     "gulp-jshint": "~1.5.0",
-    "jshint-stylish": "~0.1.5",
+    "gulp-karma": "0.0.4",
+    "gulp-load-plugins": "~0.3.0",
+    "gulp-mocha": "~0.4.1",
+    "gulp-plumber": "~0.5.6",
+    "gulp-rename": "~1.1.0",
     "gulp-replace": "~0.2.0",
-    "gulp-plumber": "~0.5.6"
+    "gulp-uglify": "~0.2.1",
+    "gulp-util": "~2.2.14",
+    "jshint-stylish": "~0.1.5",
+    "karma": "~0.12.16",
+    "karma-chrome-launcher": "~0.1.2",
+    "karma-firefox-launcher": "~0.1.3",
+    "karma-growler-reporter": "~0.0.1",
+    "karma-html2js-preprocessor": "~0.1.0",
+    "karma-mocha": "~0.1.4",
+    "karma-phantomjs-launcher": "~0.1.2",
+    "karma-script-launcher": "~0.1.0",
+    "karma-spec-reporter": "~0.0.10",
+    "mocha": "~1.17.1"
   },
   "bundleDependencies": [],
   "license": "MIT",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsondiffpatch.git



More information about the Pkg-javascript-commits mailing list