This repository was archived by the owner on Sep 3, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-13
lines changed Expand file tree Collapse file tree 4 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ var clone = require('@ndhoule/clone');
99var cookie = require ( '@segment/cookie' ) ;
1010var debug = require ( 'debug' ) ( 'analytics.js:cookie' ) ;
1111var defaults = require ( '@ndhoule/defaults' ) ;
12- var json = require ( 'json3' ) ;
1312var topDomain = require ( '@segment/top-domain' ) ;
1413
1514/**
@@ -73,7 +72,7 @@ Cookie.prototype.options = function(options) {
7372
7473Cookie . prototype . set = function ( key , value ) {
7574 try {
76- value = json . stringify ( value ) ;
75+ value = window . JSON . stringify ( value ) ;
7776 cookie ( key , value , clone ( this . _options ) ) ;
7877 return true ;
7978 } catch ( e ) {
@@ -91,7 +90,7 @@ Cookie.prototype.set = function(key, value) {
9190Cookie . prototype . get = function ( key ) {
9291 try {
9392 var value = cookie ( key ) ;
94- value = value ? json . parse ( value ) : null ;
93+ value = value ? window . JSON . parse ( value ) : null ;
9594 return value ;
9695 } catch ( e ) {
9796 return null ;
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ var each = require('@ndhoule/each');
1010var includes = require ( '@ndhoule/includes' ) ;
1111var map = require ( '@ndhoule/map' ) ;
1212var type = require ( 'component-type' ) ;
13- var uuid = require ( 'uuid' ) . v4 ;
14- var json = require ( 'json3' ) ;
13+ var uuid = require ( 'uuid/v4' ) ;
1514var md5 = require ( 'spark-md5' ) . hash ;
1615
1716/**
@@ -79,7 +78,7 @@ function normalize(msg, list) {
7978 } , opts ) ;
8079
8180 // generate and attach a messageId to msg
82- msg . messageId = 'ajs-' + md5 ( json . stringify ( msg ) + uuid ( ) ) ;
81+ msg . messageId = 'ajs-' + md5 ( window . JSON . stringify ( msg ) + uuid ( ) ) ;
8382
8483 // cleanup
8584 delete msg . options ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @segment/analytics.js-core" ,
33 "author" : " Segment <friends@segment.com>" ,
4- "version" : " 3.11.0 " ,
4+ "version" : " 3.11.1 " ,
55 "description" : " The hassle-free way to integrate analytics into any web application." ,
66 "keywords" : [
77 " analytics" ,
5858 "inherits" : " ^2.0.1" ,
5959 "install" : " ^0.7.3" ,
6060 "is" : " ^3.1.0" ,
61- "json3" : " ^3.3.2" ,
6261 "new-date" : " ^1.0.0" ,
6362 "next-tick" : " ^0.2.2" ,
6463 "segmentio-facade" : " ^3.0.2" ,
6564 "spark-md5" : " ^2.0.2" ,
66- "uuid" : " ^2.0.2 "
65+ "uuid" : " ^3.4.0 "
6766 },
6867 "devDependencies" : {
6968 "@commitlint/cli" : " ^7.0.0" ,
Original file line number Diff line number Diff line change @@ -7053,14 +7053,15 @@ utils-merge@1.0.1:
70537053 version "1.0.1"
70547054 resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
70557055
7056- uuid@^2.0.2 :
7057- version "2.0.3"
7058- resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
7059-
70607056uuid@^3.0.1, uuid@^3.1.0, uuid@^3.2.1 :
70617057 version "3.3.2"
70627058 resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
70637059
7060+ uuid@^3.4.0 :
7061+ version "3.4.0"
7062+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
7063+ integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
7064+
70647065validate-npm-package-license@^3.0.1 :
70657066 version "3.0.3"
70667067 resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338"
You can’t perform that action at this time.
0 commit comments