@mparticle/web-criteo-kit 2.0.0-rc.2 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,5 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- /*!
4
- * isobject <https://github.com/jonschlinkert/isobject>
5
- *
6
- * Copyright (c) 2014-2017, Jon Schlinkert.
7
- * Released under the MIT License.
8
- */
9
-
10
- function isObject(val) {
11
- return val != null && typeof val === 'object' && Array.isArray(val) === false;
12
- }
13
-
14
3
  /* eslint-disable no-undef */
15
4
 
16
5
  //
@@ -27,8 +16,6 @@ function isObject(val) {
27
16
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
17
  // See the License for the specific language governing permissions and
29
18
  // limitations under the License.
30
-
31
-
32
19
  var name = 'Criteo',
33
20
  moduleId = 1010,
34
21
  MessageType = {
@@ -281,14 +268,22 @@ function isObject(val) {
281
268
  return moduleId;
282
269
  }
283
270
 
271
+ function isObject(val) {
272
+ return (
273
+ val != null &&
274
+ typeof val === 'object' &&
275
+ Array.isArray(val) === false
276
+ );
277
+ }
278
+
284
279
  function register(config) {
285
280
  if (!config) {
286
- window.console.log('You must pass a config object to register the kit ' + name);
281
+ console.log('You must pass a config object to register the kit ' + name);
287
282
  return;
288
283
  }
289
284
 
290
285
  if (!isObject(config)) {
291
- window.console.log('\'config\' must be an object. You passed in a ' + typeof config);
286
+ console.log('\'config\' must be an object. You passed in a ' + typeof config);
292
287
  return;
293
288
  }
294
289
 
@@ -302,15 +297,17 @@ function isObject(val) {
302
297
  constructor: constructor
303
298
  };
304
299
  }
305
- window.console.log('Successfully registered ' + name + ' to your mParticle configuration');
300
+ console.log('Successfully registered ' + name + ' to your mParticle configuration');
306
301
  }
307
302
 
308
- if (window && window.mParticle && window.mParticle.addForwarder) {
309
- window.mParticle.addForwarder({
310
- name: name,
311
- constructor: constructor,
312
- getId: getId
313
- });
303
+ if (typeof window !== 'undefined') {
304
+ if (window && window.mParticle && window.mParticle.addForwarder) {
305
+ window.mParticle.addForwarder({
306
+ name: name,
307
+ constructor: constructor,
308
+ getId: getId
309
+ });
310
+ }
314
311
  }
315
312
 
316
313
  var CriteoEventForwarder = {
package/package.json CHANGED
@@ -1,27 +1,37 @@
1
1
  {
2
2
  "name": "@mparticle/web-criteo-kit",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.2",
4
4
  "author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
5
5
  "description": "mParticle integration sdk for Criteo",
6
6
  "browser": "dist/CriteoEventForwarder.common.js",
7
+ "main": "dist/CriteoEventForwarder.common.js",
7
8
  "files": [
8
9
  "dist/CriteoEventForwarder.common.js"
9
10
  ],
10
11
  "repository": "https://github.com/mparticle-integrations/mparticle-javascript-integration-criteo",
11
12
  "scripts": {
12
13
  "build": "rollup --config rollup.config.js",
13
- "watch": "rollup --config rollup.config.js -w"
14
+ "watch": "rollup --config rollup.config.js -w",
15
+ "build:test": "rollup --config rollup.test.config.js",
16
+ "test": "npm run build && npm run build:test && DEBUG=false karma start test/karma.config.js",
17
+ "test:debug": "npm run build && npm run build:test && DEBUG=true karma start test/karma.config.js"
14
18
  },
15
19
  "devDependencies": {
16
- "should": "^7.1.0",
20
+ "@mparticle/web-sdk": "^2.23.6",
21
+ "@semantic-release/changelog": "^5.0.1",
22
+ "@semantic-release/exec": "^5.0.0",
23
+ "@semantic-release/git": "^9.0.0",
24
+ "chai": "^4.2.0",
25
+ "karma": "^5.1.0",
26
+ "karma-chai": "^0.1.0",
27
+ "karma-chrome-launcher": "^3.1.0",
28
+ "karma-firefox-launcher": "^1.3.0",
29
+ "karma-mocha": "^2.0.1",
17
30
  "mocha": "^2.3.2",
18
31
  "rollup": "^1.13.1",
19
32
  "rollup-plugin-commonjs": "^10.0.0",
20
- "rollup-plugin-node-resolve": "^5.0.1"
21
- },
22
- "dependencies": {
23
- "isobject": "^4.0.0",
24
- "@mparticle/web-sdk": "^2.9.4-rc.1"
33
+ "rollup-plugin-node-resolve": "^5.0.1",
34
+ "should": "^7.1.0"
25
35
  },
26
36
  "license": "Apache-2.0"
27
37
  }