keen-tracking
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -9,2 +9,9 @@ <!-- | ||
--> | ||
<a name="1.1.2"></a> | ||
# 1.1.1 Fix Resource Mapping | ||
**NEW:** | ||
* This patch installs `keen-core@0.1.2` and removes the internal `events` resource mapping (now in keen-core) to fix an issue with prototype inheritance and state. | ||
<a name="1.1.1"></a> | ||
@@ -11,0 +18,0 @@ # 1.1.1 Global Namespace Fix (Pt2) |
(function(env) { | ||
'use strict'; | ||
var K = require('./'); | ||
var KeenLibrary = require('./'); | ||
var each = require('./utils/each'); | ||
var extend = require('./utils/extend'); | ||
var listener = require('./utils/listener')(K); | ||
var listener = require('./utils/listener')(KeenLibrary); | ||
@@ -12,5 +12,5 @@ // ------------------------ | ||
// ------------------------ | ||
extend(K.prototype, require('./record-events-browser')); | ||
extend(K.prototype, require('./defer-events')); | ||
extend(K.prototype, { | ||
extend(KeenLibrary.prototype, require('./record-events-browser')); | ||
extend(KeenLibrary.prototype, require('./defer-events')); | ||
extend(KeenLibrary.prototype, { | ||
'extendEvent': require('./extend-events').extendEvent, | ||
@@ -23,3 +23,3 @@ 'extendEvents': require('./extend-events').extendEvents | ||
// ------------------------ | ||
K.prototype.trackExternalLink = trackExternalLink; | ||
KeenLibrary.prototype.trackExternalLink = trackExternalLink; | ||
@@ -29,3 +29,3 @@ // ------------------------ | ||
// ------------------------ | ||
extend(K.helpers, { | ||
extend(KeenLibrary.helpers, { | ||
'getBrowserProfile' : require('./helpers/getBrowserProfile'), | ||
@@ -42,3 +42,3 @@ 'getDatetimeIndex' : require('./helpers/getDatetimeIndex'), | ||
// ------------------------ | ||
extend(K.utils, { | ||
extend(KeenLibrary.utils, { | ||
'cookie' : require('./utils/cookie'), | ||
@@ -50,3 +50,3 @@ 'deepExtend' : require('./utils/deepExtend'), | ||
K.listenTo = function(listenerHash){ | ||
KeenLibrary.listenTo = function(listenerHash){ | ||
each(listenerHash, function(callback, key){ | ||
@@ -145,3 +145,3 @@ var split = key.split(' '); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
module.exports = K; | ||
module.exports = KeenLibrary; | ||
} | ||
@@ -152,8 +152,7 @@ | ||
define('keen-tracking', [], function(){ | ||
return K; | ||
return KeenLibrary; | ||
}); | ||
} | ||
env.Keen = KeenLibrary.extendLibrary(KeenLibrary); | ||
env.Keen = K.extendLibrary(K); | ||
}).call(this, typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}); |
@@ -1,2 +0,2 @@ | ||
var K = require('keen-core'); | ||
var KeenCore = require('keen-core'); | ||
@@ -7,7 +7,6 @@ var each = require('./utils/each'), | ||
K.helpers = K.helpers || {}; | ||
K.resources.events = '{protocol}://{host}/3.0/projects/{projectId}/events'; | ||
KeenCore.helpers = KeenCore.helpers || {}; | ||
// Install internal queue | ||
K.on('client', function(client){ | ||
KeenCore.on('client', function(client){ | ||
client.extensions = { | ||
@@ -24,3 +23,3 @@ events: [], | ||
// Accessors | ||
K.prototype.writeKey = function(str){ | ||
KeenCore.prototype.writeKey = function(str){ | ||
if (!arguments.length) return this.config.writeKey; | ||
@@ -32,4 +31,4 @@ this.config.writeKey = (str ? String(str) : null); | ||
// DEPRECATED | ||
K.prototype.setGlobalProperties = function(props){ | ||
K.log('This method has been deprecated. Check out #extendEvents: https://github.com/keen/keen-tracking.js#extend-events'); | ||
KeenCore.prototype.setGlobalProperties = function(props){ | ||
KeenCore.log('This method has been deprecated. Check out #extendEvents: https://github.com/keen/keen-tracking.js#extend-events'); | ||
if (!props || typeof props !== 'function') { | ||
@@ -43,2 +42,2 @@ this.emit('error', 'Invalid value for global properties: ' + props); | ||
module.exports = K; | ||
module.exports = KeenCore; |
{ | ||
"name": "keen-tracking", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Data Collection SDK for Keen IO", | ||
@@ -27,3 +27,3 @@ "main": "lib/server.js", | ||
"js-cookie": "2.1.0", | ||
"keen-core": "0.1.1" | ||
"keen-core": "0.1.2" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
@@ -133,3 +133,3 @@ # keen-tracking.js [![Build Status](https://travis-ci.org/keen/keen-tracking.js.svg?branch=master)](https://travis-ci.org/keen/keen-tracking.js) | ||
var latest,prev=name!=='Keen'&&window.Keen?window.Keen:false;ctx[name]=ctx[name]||{ready:function(fn){var h=document.getElementsByTagName('head')[0],s=document.createElement('script'),w=window,loaded;s.onload=s.onerror=s.onreadystatechange=function(){if((s.readyState&&!(/^c|loade/.test(s.readyState)))||loaded){return}s.onload=s.onreadystatechange=null;loaded=1;latest=w.Keen;if(prev){w.Keen=prev}else{try{delete w.Keen}catch(e){w.Keen=void 0}}ctx[name]=latest;ctx[name].ready(fn)};s.async=1;s.src=path;h.parentNode.insertBefore(s,h)}} | ||
}('Keen','https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.1.1.min.js',this); | ||
}('Keen','https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.1.2.min.js',this); | ||
@@ -136,0 +136,0 @@ // Executes when the library is loaded and ready |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78829
1363
+ Addedkeen-core@0.1.2(transitive)
- Removedkeen-core@0.1.1(transitive)
Updatedkeen-core@0.1.2