From 47fe3e06cc7fc5719b01f5b032f1803962ef66c1 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Mon, 29 Nov 2021 18:01:04 -0800 Subject: [PATCH 01/19] feat: core pacakge for seamless experiment integration --- package.json | 3 ++- src/amplitude-client.js | 35 +++++++++++++++++++++++++++++++++++ yarn.lock | 3 +++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9cbb612c..b2735334 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "@amplitude/ua-parser-js": "0.7.25", "@amplitude/utils": "^1.0.5", "blueimp-md5": "^2.10.0", - "query-string": "5" + "query-string": "5", + "@amplitude/amplitude-core": "file:../experiment-js-client/packages/core/" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/src/amplitude-client.js b/src/amplitude-client.js index 2f30db58..5e64eee4 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -20,6 +20,8 @@ import baseCookie from './base-cookie'; import { AmplitudeServerZone, getEventLogApi } from './server-zone'; import ConfigManager from './config-manager'; +import { AmplitudeCore } from '@amplitude/amplitude-core'; + /** * AmplitudeClient SDK API - instance constructor. * The Amplitude class handles creation of client instances, all you need to do is call amplitude.getInstance() @@ -54,6 +56,9 @@ var AmplitudeClient = function AmplitudeClient(instanceName) { this._sessionId = null; this._isInitialized = false; + // used to integrate with experiment SDK (client-side exposure tracking & real-time user properties) + this._core = AmplitudeCore.getInstance(this._instanceName); + this._userAgent = (navigator && navigator.userAgent) || null; }; @@ -242,6 +247,21 @@ AmplitudeClient.prototype.init = function init(apiKey, opt_userId, opt_config, o ); } } + + // Sets an event receiver to receive and forward exposure events from the experiment SDK. + this._core.analyticsConnector.setEventReceiver((event) => { + this._logEvent(event.eventType, event.eventProperties, event.userProperties); + }); + + // Set the user ID and device ID in the core identity store to enable fetching variants. + const editor = this._core.identityStore.editIdentity(); + if (this.options.deviceId) { + editor.setDeviceId(this.options.deviceId); + } + if (this.options.userId) { + editor.setUserId(this.options.userId); + } + editor.commit(); } catch (err) { utils.log.error(err); if (type(opt_config.onError) === 'function') { @@ -886,6 +906,10 @@ AmplitudeClient.prototype.setUserId = function setUserId(userId, startNewSession } _saveCookieData(this); + + // Update core identity store to propagate new user info + // to experiment SDK and trigger a fetch if the ID has changed. + this._core.identityStore.editIdentity().setUserId(this.options.userId).commit(); } catch (e) { utils.log.error(e); } @@ -1015,6 +1039,10 @@ AmplitudeClient.prototype.setDeviceId = function setDeviceId(deviceId) { if (!utils.isEmptyString(deviceId)) { this.options.deviceId = '' + deviceId; _saveCookieData(this); + + // Update core identity store to propagate new user info + // to experiment SDK and trigger a fetch if the ID has changed. + this._core.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit(); } } catch (e) { utils.log.error(e); @@ -1355,6 +1383,13 @@ AmplitudeClient.prototype._logEvent = function _logEvent( this._sendEventsIfReady(); + // In the case of an identify event, update the core user store so the experiment SDK can fetch new variants and + // utilize user properties in real time. + this._core.identityStore + .editIdentity() + .updateUserProperties(utils.truncate(utils.validateProperties(userProperties))) + .commit(); + return eventId; } catch (e) { utils.log.error(e); diff --git a/yarn.lock b/yarn.lock index ff59b456..8dd9732a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,9 @@ # yarn lockfile v1 +"@amplitude/amplitude-core@file:../experiment-js-client/packages/core": + version "0.0.1" + "@amplitude/eslint-plugin-amplitude@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@amplitude/eslint-plugin-amplitude/-/eslint-plugin-amplitude-1.0.1.tgz#84fdb50732e27077aa5ece343a6c71281843a7ef" From c59949300b13ed309a36d9f9dc2d22b07ecd8cae Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Wed, 1 Dec 2021 14:14:17 -0800 Subject: [PATCH 02/19] only edit identity on identify event --- package.json | 2 +- src/amplitude-client.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b2735334..4bee0119 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@amplitude/utils": "^1.0.5", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/amplitude-core": "file:../experiment-js-client/packages/core/" + "@amplitude/amplitude-core": "file:../experiment-js-client/packages/core" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/src/amplitude-client.js b/src/amplitude-client.js index 5e64eee4..a85f1a7e 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -1385,10 +1385,12 @@ AmplitudeClient.prototype._logEvent = function _logEvent( // In the case of an identify event, update the core user store so the experiment SDK can fetch new variants and // utilize user properties in real time. - this._core.identityStore - .editIdentity() - .updateUserProperties(utils.truncate(utils.validateProperties(userProperties))) - .commit(); + if (eventType === Constants.IDENTIFY_EVENT) { + this._core.identityStore + .editIdentity() + .updateUserProperties(utils.truncate(utils.validateProperties(userProperties))) + .commit(); + } return eventId; } catch (e) { From e25cb3ec9bb7516dca92778509b1c7be81d7dd03 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Wed, 1 Dec 2021 17:19:05 -0800 Subject: [PATCH 03/19] use real core dependency --- .gitignore | 3 +++ package.json | 2 +- yarn.lock | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bfa179f4..8c7da25e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ amplitude.umd.min.js amplitude.native.js amplitude.nocompat.js amplitude.nocompat.min.js + +# For WebStorm IDE +.idea/ diff --git a/package.json b/package.json index 4bee0119..b794247f 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@amplitude/utils": "^1.0.5", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/amplitude-core": "file:../experiment-js-client/packages/core" + "@amplitude/amplitude-core": "0.0.1" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index 8dd9732a..eb34a357 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,8 +2,10 @@ # yarn lockfile v1 -"@amplitude/amplitude-core@file:../experiment-js-client/packages/core": +"@amplitude/amplitude-core@0.0.1": version "0.0.1" + resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-0.0.1.tgz#54097fac6444266f7edb5b3dd334f5c44ccc5920" + integrity sha512-J5VRhIkCBy9qwCjI8c745xLv+JK6Q+E6qijrpUW5F8Br8fbpAe708Zd5jfFZ32vmzzqRkte12pAscaD3VOKDDQ== "@amplitude/eslint-plugin-amplitude@^1.0.1": version "1.0.1" From 36ddf9d3fb07d2db2cf002582cf79544f5793323 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 3 Dec 2021 11:34:47 -0800 Subject: [PATCH 04/19] build, tests fail --- package.json | 14 +- rollup.config.js | 24 ++-- rollup.esm.js | 26 ++-- rollup.snippet-tests.js | 2 +- rollup.umd.js | 24 ++-- yarn.lock | 278 +++++++++++++++++++++++++--------------- 6 files changed, 225 insertions(+), 143 deletions(-) diff --git a/package.json b/package.json index b794247f..c151b8ec 100644 --- a/package.json +++ b/package.json @@ -56,13 +56,13 @@ "mocha": "^4.0.1", "prettier": "^2.2.1", "requirejs": "^2.3.6", - "rollup": "^1.4.1", - "rollup-plugin-babel": "^4.3.2", - "rollup-plugin-commonjs": "^9.2.1", - "rollup-plugin-json": "^4.0.0", - "rollup-plugin-legacy": "^1.0.0", - "rollup-plugin-node-resolve": "^4.0.1", - "rollup-plugin-replace": "^2.1.0", + "rollup": "^2.26.3", + "@rollup/plugin-babel": "^5.2.0", + "@rollup/plugin-commonjs": "^15.0.0", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^9.0.0", + "@rollup/plugin-replace": "^2.3.3", + "@rollup/plugin-legacy": "^2.2.0", "rollup-plugin-uglify": "^6.0.2", "semantic-release": "^17.1.1", "sinon": "^7.0.0", diff --git a/rollup.config.js b/rollup.config.js index c974b815..4234ffe6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,8 +1,8 @@ -import resolve from 'rollup-plugin-node-resolve'; -import commonjs from 'rollup-plugin-commonjs'; -import replace from 'rollup-plugin-replace'; -import babel from 'rollup-plugin-babel'; -import json from 'rollup-plugin-json'; +import babel from '@rollup/plugin-babel'; +import commonjs from '@rollup/plugin-commonjs'; +import json from '@rollup/plugin-json'; +import resolve from '@rollup/plugin-node-resolve'; +import replace from '@rollup/plugin-replace'; export default { input: 'src/index.js', @@ -14,20 +14,26 @@ export default { id: 'amplitude', } }, + external: [/@babel\/runtime/], plugins: [ json(), - babel({ - exclude: 'node_modules/**', - plugins: ['@babel/plugin-proposal-object-rest-spread'], - }), resolve({ browser: true, }), replace({ + preventAssignment: false, BUILD_COMPAT_SNIPPET: 'true', BUILD_COMPAT_LOCAL_STORAGE: 'true', BUILD_COMPAT_2_0: 'true', }), commonjs(), + babel({ + babelHelpers: 'runtime', + exclude: 'node_modules/**', + plugins: [ + '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-transform-runtime' + ], + }), ], }; diff --git a/rollup.esm.js b/rollup.esm.js index ce6f7b13..3208a189 100644 --- a/rollup.esm.js +++ b/rollup.esm.js @@ -1,7 +1,7 @@ -import commonjs from 'rollup-plugin-commonjs'; -import replace from 'rollup-plugin-replace'; -import babel from 'rollup-plugin-babel'; -import json from 'rollup-plugin-json'; +import commonjs from '@rollup/plugin-commonjs'; +import replace from '@rollup/plugin-replace'; +import babel from '@rollup/plugin-babel'; +import json from '@rollup/plugin-json'; export default { input: 'src/index.js', @@ -10,17 +10,11 @@ export default { file: 'amplitude.esm.js', format: 'esm', }, + external: [/@babel\/runtime/], plugins: [ json(), - babel({ - exclude: 'node_modules/**', - plugins: [ - '@babel/plugin-transform-runtime', - '@babel/plugin-proposal-object-rest-spread' - ], - runtimeHelpers: true - }), replace({ + preventAssignment: false, BUILD_COMPAT_SNIPPET: 'false', BUILD_COMPAT_LOCAL_STORAGE: 'true', BUILD_COMPAT_2_0: 'true', @@ -28,5 +22,13 @@ export default { commonjs({ include: "node_modules/**" }), + babel({ + babelHelpers: 'runtime', + exclude: 'node_modules/**', + plugins: [ + '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-transform-runtime' + ], + }), ], }; diff --git a/rollup.snippet-tests.js b/rollup.snippet-tests.js index 5d3e3256..91831389 100644 --- a/rollup.snippet-tests.js +++ b/rollup.snippet-tests.js @@ -1,5 +1,5 @@ import config from './rollup.config.js'; -import legacy from 'rollup-plugin-legacy'; +import legacy from '@rollup/plugin-legacy'; config.plugins.push(legacy({ './amplitude-snippet.min.js': 'amplitude', diff --git a/rollup.umd.js b/rollup.umd.js index e1751e95..14c6e08b 100644 --- a/rollup.umd.js +++ b/rollup.umd.js @@ -1,8 +1,8 @@ -import resolve from 'rollup-plugin-node-resolve'; -import commonjs from 'rollup-plugin-commonjs'; -import replace from 'rollup-plugin-replace'; -import babel from 'rollup-plugin-babel'; -import json from 'rollup-plugin-json'; +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import replace from '@rollup/plugin-replace'; +import babel from '@rollup/plugin-babel'; +import json from '@rollup/plugin-json'; export default { input: 'src/index.js', @@ -14,20 +14,26 @@ export default { id: 'amplitude', } }, + external: [/@babel\/runtime/], plugins: [ json(), - babel({ - exclude: 'node_modules/**', - plugins: ['@babel/plugin-proposal-object-rest-spread'], - }), resolve({ browser: true, }), replace({ + preventAssignment: false, BUILD_COMPAT_SNIPPET: 'true', BUILD_COMPAT_LOCAL_STORAGE: 'true', BUILD_COMPAT_2_0: 'true', }), commonjs(), + babel({ + babelHelpers: 'runtime', + exclude: 'node_modules/**', + plugins: [ + '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-transform-runtime' + ], + }), ], }; diff --git a/yarn.lock b/yarn.lock index eb34a357..0f5b23ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -148,6 +148,13 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-module-imports@^7.10.4": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz#90538e60b672ecf1b448f5f4f5433d37e79a3ec3" + integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-module-transforms@^7.1.0": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" @@ -215,6 +222,11 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== + "@babel/helper-wrap-function@^7.1.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" @@ -646,6 +658,14 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" +"@babel/types@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.0.tgz#db3b313804f96aadd0b776c4823e127ad67289ba" + integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + to-fast-properties "^2.0.0" + "@eslint/eslintrc@^0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz#d01fc791e2fc33e88a29d6f3dc7e93d0cd784b76" @@ -796,6 +816,78 @@ dependencies: "@types/node" ">= 8" +"@rollup/plugin-babel@^5.2.0": + version "5.3.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.0.tgz#9cb1c5146ddd6a4968ad96f209c50c62f92f9879" + integrity sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw== + dependencies: + "@babel/helper-module-imports" "^7.10.4" + "@rollup/pluginutils" "^3.1.0" + +"@rollup/plugin-commonjs@^15.0.0": + version "15.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-15.1.0.tgz#1e7d076c4f1b2abf7e65248570e555defc37c238" + integrity sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ== + dependencies: + "@rollup/pluginutils" "^3.1.0" + commondir "^1.0.1" + estree-walker "^2.0.1" + glob "^7.1.6" + is-reference "^1.2.1" + magic-string "^0.25.7" + resolve "^1.17.0" + +"@rollup/plugin-json@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3" + integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== + dependencies: + "@rollup/pluginutils" "^3.0.8" + +"@rollup/plugin-legacy@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-legacy/-/plugin-legacy-2.2.0.tgz#fcdc5921dc495307c6803c4cccd42e1198f0ef35" + integrity sha512-GufQLmoMMH/yjJpxCfcoVMet2TOOUvuoGat+XX3fkpZq9xTBUoV2XMbIBg1yZThMGlp6mQefnspFSRybMArYIg== + dependencies: + "@rollup/pluginutils" "^4.1.0" + +"@rollup/plugin-node-resolve@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz#39bd0034ce9126b39c1699695f440b4b7d2b62e6" + integrity sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg== + dependencies: + "@rollup/pluginutils" "^3.1.0" + "@types/resolve" "1.17.1" + builtin-modules "^3.1.0" + deepmerge "^4.2.2" + is-module "^1.0.0" + resolve "^1.17.0" + +"@rollup/plugin-replace@^2.3.3": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz#a2d539314fbc77c244858faa523012825068510a" + integrity sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg== + dependencies: + "@rollup/pluginutils" "^3.1.0" + magic-string "^0.25.7" + +"@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + +"@rollup/pluginutils@^4.1.0": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec" + integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ== + dependencies: + estree-walker "^2.0.1" + picomatch "^2.2.2" + "@semantic-release/changelog@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@semantic-release/changelog/-/changelog-5.0.1.tgz#50a84b63e5d391b7debfe021421589fa2bcdafe4" @@ -946,6 +1038,11 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/estree@*": + version "0.0.50" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" + integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== + "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" @@ -956,16 +1053,16 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= +"@types/node@*": + version "16.11.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.11.tgz#6ea7342dfb379ea1210835bada87b3c512120234" + integrity sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw== + "@types/node@>= 8": version "14.10.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.10.1.tgz#cc323bad8e8a533d4822f45ce4e5326f36e42177" integrity sha512-aYNbO+FZ/3KGeQCEkNhHFRIzBOUgc7QvcVNKXbfnhDkSfwUv91JsQQa10rDgKSTSLkXZ1UIyPe4FJJNVgw1xWQ== -"@types/node@^11.9.5": - version "11.10.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.10.4.tgz#3f5fc4f0f322805f009e00ab35a2ff3d6b778e42" - integrity sha512-wa09itaLE8L705aXd8F80jnFpxz3Y1/KRHfKsYL2bPc0XF+wEWu8sR9n5bmeu8Ba1N9z2GRNzm/YdHcghLkLKg== - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -976,6 +1073,13 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== +"@types/resolve@1.17.1": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" + integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== + dependencies: + "@types/node" "*" + "@types/retry@^0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" @@ -1007,11 +1111,6 @@ acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== -acorn@^6.1.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== - acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" @@ -1535,10 +1634,10 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -builtin-modules@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.0.0.tgz#1e587d44b006620d90286cc7a9238bbc6129cab1" - integrity sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg== +builtin-modules@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" + integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== builtins@^1.0.3: version "1.0.3" @@ -1982,6 +2081,11 @@ common-sequence@^2.0.0: resolved "https://registry.yarnpkg.com/common-sequence/-/common-sequence-2.0.0.tgz#a4f01aaf5aebd0ac1ce43653e8c8fe6f0ef3a987" integrity sha512-f0QqPLpRTgMQn/pQIynf+SdE73Lw5Q1jn4hjirHLgH/NJ71TiHjXusV16BmOyuK5rRQ1W2f++II+TFZbQOh4hA== +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -2339,6 +2443,11 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= +deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -2859,20 +2968,15 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== -estree-walker@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" - integrity sha1-va/oCVOD2EFNXcLs9MkXO225QS4= - -estree-walker@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" - integrity sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig== +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== -estree-walker@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.0.tgz#5d865327c44a618dde5699f763891ae31f257dae" - integrity sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw== +estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== esutils@^2.0.2: version "2.0.2" @@ -3349,6 +3453,11 @@ fsevents@^1.2.7: nan "^2.9.2" node-pre-gyp "^0.10.0" +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3991,6 +4100,13 @@ is-cidr@^3.0.0: dependencies: cidr-regex "^2.0.10" +is-core-module@^2.2.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" + integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -4150,6 +4266,13 @@ is-redirect@^1.0.0: resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= +is-reference@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + dependencies: + "@types/estree" "*" + is-regex@^1.1.0, is-regex@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" @@ -5032,10 +5155,10 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg== -magic-string@^0.25.1: - version "0.25.2" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9" - integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg== +magic-string@^0.25.7: + version "0.25.7" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" + integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== dependencies: sourcemap-codec "^1.4.4" @@ -6276,6 +6399,11 @@ picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.2.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -6881,6 +7009,14 @@ resolve@^1.10.0, resolve@^1.3.2, resolve@^1.8.1: dependencies: path-parse "^1.0.6" +resolve@^1.17.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -6935,56 +7071,6 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -rollup-plugin-babel@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz#8c0e1bd7aa9826e90769cf76895007098ffd1413" - integrity sha512-KfnizE258L/4enADKX61ozfwGHoqYauvoofghFJBhFnpH9Sb9dNPpWg8QHOaAfVASUYV8w0mCx430i9z0LJoJg== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - rollup-pluginutils "^2.3.0" - -rollup-plugin-commonjs@^9.2.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.2.1.tgz#bb151ca8fa23600c7a03e25f9f0a45b1ee922dac" - integrity sha512-X0A/Cp/t+zbONFinBhiTZrfuUaVwRIp4xsbKq/2ohA2CDULa/7ONSJTelqxon+Vds2R2t2qJTqJQucKUC8GKkw== - dependencies: - estree-walker "^0.5.2" - magic-string "^0.25.1" - resolve "^1.10.0" - rollup-pluginutils "^2.3.3" - -rollup-plugin-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e" - integrity sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow== - dependencies: - rollup-pluginutils "^2.5.0" - -rollup-plugin-legacy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-legacy/-/rollup-plugin-legacy-1.0.0.tgz#d08bdfc4410bd13827f4278c51870d3d8dbd1ea3" - integrity sha1-0IvfxEEL0Tgn9CeMUYcNPY29HqM= - dependencies: - rollup-pluginutils "^1.5.2" - -rollup-plugin-node-resolve@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.1.tgz#f95765d174e5daeef9ea6268566141f53aa9d422" - integrity sha512-fSS7YDuCe0gYqKsr5OvxMloeZYUSgN43Ypi1WeRZzQcWtHgFayV5tUSPYpxuaioIIWaBXl6NrVk0T2/sKwueLg== - dependencies: - builtin-modules "^3.0.0" - is-module "^1.0.0" - resolve "^1.10.0" - -rollup-plugin-replace@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.1.0.tgz#f9c07a4a89a2f8be912ee54b3f0f68d91e9ed0ae" - integrity sha512-SxrAIgpH/B5/W4SeULgreOemxcpEgKs2gcD42zXw50bhqGWmcnlXneVInQpAqzA/cIly4bJrOpeelmB9p4YXSQ== - dependencies: - magic-string "^0.25.1" - minimatch "^3.0.2" - rollup-pluginutils "^2.0.1" - rollup-plugin-uglify@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.2.tgz#681042cfdf7ea4e514971946344e1a95bc2772fe" @@ -6995,30 +7081,12 @@ rollup-plugin-uglify@^6.0.2: serialize-javascript "^1.6.1" uglify-js "^3.4.9" -rollup-pluginutils@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" - integrity sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg= - dependencies: - estree-walker "^0.2.1" - minimatch "^3.0.2" - -rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.3, rollup-pluginutils@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.5.0.tgz#23be0f05ac3972ea7b08fc7870cb91fde5b23a09" - integrity sha512-9Muh1H+XB5f5ONmKMayUoTYR1EZwHbwJJ9oZLrKT5yuTf/RLIQ5mYIGsrERquVucJmjmaAW0Y7+6Qo1Ep+5w3Q== - dependencies: - estree-walker "^0.6.0" - micromatch "^3.1.10" - -rollup@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.4.1.tgz#cc03ef6fb49dd72a878e3da0131c0a3696de14a7" - integrity sha512-YWf5zeR6SWtqZmCnuYs4a+ZJetj8NT4yfBMPXekWHW4L3144jM+J2AWagQVejB0FwCqjEUP9l8o4hg1rPDfQlg== - dependencies: - "@types/estree" "0.0.39" - "@types/node" "^11.9.5" - acorn "^6.1.1" +rollup@^2.26.3: + version "2.60.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.60.2.tgz#3f45ace36a9b10b4297181831ea0719922513463" + integrity sha512-1Bgjpq61sPjgoZzuiDSGvbI1tD91giZABgjCQBKM5aYLnzjq52GoDuWVwT/cm/MCxCMPU8gqQvkj8doQ5C8Oqw== + optionalDependencies: + fsevents "~2.3.2" run-parallel@^1.1.9: version "1.1.9" From 67ceda934a0185f47e8c532711ce59fef6ab322e Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 3 Dec 2021 11:50:44 -0800 Subject: [PATCH 05/19] fix tests --- rollup.config.js | 1 - rollup.esm.js | 1 - rollup.umd.js | 1 - 3 files changed, 3 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 4234ffe6..1e420082 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -14,7 +14,6 @@ export default { id: 'amplitude', } }, - external: [/@babel\/runtime/], plugins: [ json(), resolve({ diff --git a/rollup.esm.js b/rollup.esm.js index 3208a189..2ca0dc41 100644 --- a/rollup.esm.js +++ b/rollup.esm.js @@ -10,7 +10,6 @@ export default { file: 'amplitude.esm.js', format: 'esm', }, - external: [/@babel\/runtime/], plugins: [ json(), replace({ diff --git a/rollup.umd.js b/rollup.umd.js index 14c6e08b..c0bf6e38 100644 --- a/rollup.umd.js +++ b/rollup.umd.js @@ -14,7 +14,6 @@ export default { id: 'amplitude', } }, - external: [/@babel\/runtime/], plugins: [ json(), resolve({ From 638745e7e699d98d126c596ef90676f65071062e Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 3 Dec 2021 12:23:08 -0800 Subject: [PATCH 06/19] set preventAssignment to true --- rollup.config.js | 2 +- rollup.esm.js | 2 +- rollup.umd.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 1e420082..d6c5aa88 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -20,7 +20,7 @@ export default { browser: true, }), replace({ - preventAssignment: false, + preventAssignment: true, BUILD_COMPAT_SNIPPET: 'true', BUILD_COMPAT_LOCAL_STORAGE: 'true', BUILD_COMPAT_2_0: 'true', diff --git a/rollup.esm.js b/rollup.esm.js index 2ca0dc41..76522753 100644 --- a/rollup.esm.js +++ b/rollup.esm.js @@ -13,7 +13,7 @@ export default { plugins: [ json(), replace({ - preventAssignment: false, + preventAssignment: true, BUILD_COMPAT_SNIPPET: 'false', BUILD_COMPAT_LOCAL_STORAGE: 'true', BUILD_COMPAT_2_0: 'true', diff --git a/rollup.umd.js b/rollup.umd.js index c0bf6e38..e61ebadb 100644 --- a/rollup.umd.js +++ b/rollup.umd.js @@ -20,7 +20,7 @@ export default { browser: true, }), replace({ - preventAssignment: false, + preventAssignment: true, BUILD_COMPAT_SNIPPET: 'true', BUILD_COMPAT_LOCAL_STORAGE: 'true', BUILD_COMPAT_2_0: 'true', From da1b8333452786ea5ede7cce5ef7a968d1f33b14 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 3 Dec 2021 12:52:38 -0800 Subject: [PATCH 07/19] switch back to bundled --- rollup.config.js | 5 ++--- rollup.esm.js | 5 ++--- rollup.umd.js | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index d6c5aa88..b79b1129 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -27,11 +27,10 @@ export default { }), commonjs(), babel({ - babelHelpers: 'runtime', + babelHelpers: 'bundled', exclude: 'node_modules/**', plugins: [ - '@babel/plugin-proposal-object-rest-spread', - '@babel/plugin-transform-runtime' + '@babel/plugin-proposal-object-rest-spread' ], }), ], diff --git a/rollup.esm.js b/rollup.esm.js index 76522753..bd0c0eab 100644 --- a/rollup.esm.js +++ b/rollup.esm.js @@ -22,11 +22,10 @@ export default { include: "node_modules/**" }), babel({ - babelHelpers: 'runtime', + babelHelpers: 'bundled', exclude: 'node_modules/**', plugins: [ - '@babel/plugin-proposal-object-rest-spread', - '@babel/plugin-transform-runtime' + '@babel/plugin-proposal-object-rest-spread' ], }), ], diff --git a/rollup.umd.js b/rollup.umd.js index e61ebadb..7e3e3135 100644 --- a/rollup.umd.js +++ b/rollup.umd.js @@ -27,11 +27,10 @@ export default { }), commonjs(), babel({ - babelHelpers: 'runtime', + babelHelpers: 'bundled', exclude: 'node_modules/**', plugins: [ - '@babel/plugin-proposal-object-rest-spread', - '@babel/plugin-transform-runtime' + '@babel/plugin-proposal-object-rest-spread' ], }), ], From 3710610e751570fe1653e350106fecc9af8ccea2 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 3 Dec 2021 15:36:24 -0800 Subject: [PATCH 08/19] 8.14.0-alpha.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd22a058..9241eead 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "amplitude-js", "author": "Amplitude ", - "version": "8.13.1", + "version": "8.14.0-alpha.0", "license": "MIT", "description": "Javascript library for Amplitude Analytics", "keywords": [ From d5aa32397729778c78d2f9832d7596de1cf35680 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Tue, 7 Dec 2021 14:06:43 -0800 Subject: [PATCH 09/19] init amplitudecore when client is init vs instance --- src/amplitude-client.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/amplitude-client.js b/src/amplitude-client.js index 1b2ae278..7d121c48 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -58,7 +58,7 @@ var AmplitudeClient = function AmplitudeClient(instanceName) { this._isInitialized = false; // used to integrate with experiment SDK (client-side exposure tracking & real-time user properties) - this._core = AmplitudeCore.getInstance(this._instanceName); + this._core = null; this._userAgent = (navigator && navigator.userAgent) || null; }; @@ -84,6 +84,9 @@ AmplitudeClient.prototype.init = function init(apiKey, opt_userId, opt_config, o } try { + // used to integrate with experiment SDK (client-side exposure tracking & real-time user properties) + this._core = AmplitudeCore.getInstance(this._instanceName); + _parseConfig(this.options, opt_config); if (isBrowserEnv() && window.Prototype !== undefined && Array.prototype.toJSON) { prototypeJsFix(); @@ -934,7 +937,9 @@ AmplitudeClient.prototype.setUserId = function setUserId(userId, startNewSession // Update core identity store to propagate new user info // to experiment SDK and trigger a fetch if the ID has changed. - this._core.identityStore.editIdentity().setUserId(this.options.userId).commit(); + if (this._core) { + this._core.identityStore.editIdentity().setUserId(this.options.userId).commit(); + } } catch (e) { utils.log.error(e); } @@ -1067,7 +1072,9 @@ AmplitudeClient.prototype.setDeviceId = function setDeviceId(deviceId) { // Update core identity store to propagate new user info // to experiment SDK and trigger a fetch if the ID has changed. - this._core.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit(); + if (this._core) { + this._core.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit(); + } } } catch (e) { utils.log.error(e); @@ -1410,7 +1417,7 @@ AmplitudeClient.prototype._logEvent = function _logEvent( // In the case of an identify event, update the core user store so the experiment SDK can fetch new variants and // utilize user properties in real time. - if (eventType === Constants.IDENTIFY_EVENT) { + if (eventType === Constants.IDENTIFY_EVENT && this._core) { this._core.identityStore .editIdentity() .updateUserProperties(utils.truncate(utils.validateProperties(userProperties))) From a99b724cb95a3a454109dcec60c1f17199d30528 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Tue, 7 Dec 2021 14:07:12 -0800 Subject: [PATCH 10/19] 8.14.0-alpha.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9241eead..b370e26b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "amplitude-js", "author": "Amplitude ", - "version": "8.14.0-alpha.0", + "version": "8.14.0-alpha.1", "license": "MIT", "description": "Javascript library for Amplitude Analytics", "keywords": [ From aed55e2148d21566a3c90d81a13330d37f60402e Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Tue, 7 Dec 2021 16:30:20 -0800 Subject: [PATCH 11/19] update core; 8.14.0-alpha.2 --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b370e26b..bade37c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "amplitude-js", "author": "Amplitude ", - "version": "8.14.0-alpha.1", + "version": "8.14.0-alpha.2", "license": "MIT", "description": "Javascript library for Amplitude Analytics", "keywords": [ @@ -20,7 +20,7 @@ "@babel/runtime": "^7.3.4", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/amplitude-core": "0.0.1" + "@amplitude/amplitude-core": "0.0.2" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index e40883f6..f5d448d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@amplitude/amplitude-core@0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-0.0.1.tgz#54097fac6444266f7edb5b3dd334f5c44ccc5920" - integrity sha512-J5VRhIkCBy9qwCjI8c745xLv+JK6Q+E6qijrpUW5F8Br8fbpAe708Zd5jfFZ32vmzzqRkte12pAscaD3VOKDDQ== +"@amplitude/amplitude-core@0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-0.0.2.tgz#62c4588e543c3d53080f0f6e3b1a892286d2c314" + integrity sha512-mVRFavrejRr9Eys7UZXOjVwOmxhwNDZQaYQ5kHQXoqiOty7T90nROOBDXpmN0oBgo6/ufOOiTVzPxLlo+L+VkA== "@amplitude/eslint-plugin-amplitude@^1.0.1": version "1.0.1" From 96f07fa8cd57d47777a092bce803a876212c97d2 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Tue, 7 Dec 2021 17:07:34 -0800 Subject: [PATCH 12/19] actually update core and build; 8.14.0-alpha.3 --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index bade37c7..12a59321 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "amplitude-js", "author": "Amplitude ", - "version": "8.14.0-alpha.2", + "version": "8.14.0-alpha.3", "license": "MIT", "description": "Javascript library for Amplitude Analytics", "keywords": [ @@ -20,7 +20,7 @@ "@babel/runtime": "^7.3.4", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/amplitude-core": "0.0.2" + "@amplitude/amplitude-core": "0.0.3" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index f5d448d8..faa58be4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@amplitude/amplitude-core@0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-0.0.2.tgz#62c4588e543c3d53080f0f6e3b1a892286d2c314" - integrity sha512-mVRFavrejRr9Eys7UZXOjVwOmxhwNDZQaYQ5kHQXoqiOty7T90nROOBDXpmN0oBgo6/ufOOiTVzPxLlo+L+VkA== +"@amplitude/amplitude-core@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-0.0.3.tgz#e987a4cb196b429ffc6553158514241413654597" + integrity sha512-KzntP+ODEMZxryqPQFLn2NlHlDpgsrFphS2QJTAH/zdax9LuwNCfG4ZzxEmnfV8tZMJHDaZ4NTkdw5DF+uyboQ== "@amplitude/eslint-plugin-amplitude@^1.0.1": version "1.0.1" From 1d3630f0faf48b316db6d4548d6629c8fe47a149 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Mon, 20 Dec 2021 14:05:50 -0800 Subject: [PATCH 13/19] update core dep --- package.json | 3 +-- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 12a59321..0e7b0877 100644 --- a/package.json +++ b/package.json @@ -15,12 +15,11 @@ "main": "amplitude.umd.js", "module": "amplitude.esm.js", "dependencies": { - "@amplitude/ua-parser-js": "0.7.26", "@amplitude/utils": "^1.0.5", "@babel/runtime": "^7.3.4", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/amplitude-core": "0.0.3" + "@amplitude/amplitude-core": "1.0.0-alpha.0" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index faa58be4..ed554eee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@amplitude/amplitude-core@0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-0.0.3.tgz#e987a4cb196b429ffc6553158514241413654597" - integrity sha512-KzntP+ODEMZxryqPQFLn2NlHlDpgsrFphS2QJTAH/zdax9LuwNCfG4ZzxEmnfV8tZMJHDaZ4NTkdw5DF+uyboQ== +"@amplitude/amplitude-core@1.0.0-alpha.0": + version "1.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-1.0.0-alpha.0.tgz#8a1297d3b936855e5d2583ced16a883f27c3751a" + integrity sha512-bi5fQMzVWZYN1fWna7UjzmmCPFFtqagF88HPRgX8duk9xnMgM4E4uqEHnc1UyE5aPoWR1eeHBRss29PINAySjA== "@amplitude/eslint-plugin-amplitude@^1.0.1": version "1.0.1" From 932d47c782d41191a66f03bdd748af51255dab67 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Mon, 20 Dec 2021 14:12:04 -0800 Subject: [PATCH 14/19] build --- yarn.lock | 5 ----- 1 file changed, 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8c90b810..ff43e527 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,11 +20,6 @@ resolved "https://registry.yarnpkg.com/@amplitude/types/-/types-1.0.4.tgz#21275b030c8267f9ea133a79c5c525e30c706d69" integrity sha512-iWdgTXiE0T/QCK88g2ezJEhJpYHDvDs0StVVPu1ygcl6qYzk/8xrNvbeEibiIBT8t/GJ8FtH5ZIPx3c4CMjlig== -"@amplitude/ua-parser-js@0.7.26": - version "0.7.26" - resolved "https://registry.yarnpkg.com/@amplitude/ua-parser-js/-/ua-parser-js-0.7.26.tgz#18d889d84d2ba90c248ab6fcd7e3dd07f1c9c86e" - integrity sha512-62/Rid6YQ7F2KT/5vTre41Y26ivrEoFC8lbrsJZqBKaiXMJWG0YpNv9RgxNSaZS2jPLVQgoB/FFeWxihOLfIcg== - "@amplitude/utils@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@amplitude/utils/-/utils-1.0.5.tgz#843d96b7965c69213bb1896980bed2c1569fbbed" From 7fa2594ed2c632b16dcb9ca4bad73fed5da8eeba Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 14 Jan 2022 09:07:02 -0800 Subject: [PATCH 15/19] use v1.0.0 of core --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index fa7b4d77..97eb7d34 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@babel/runtime": "^7.3.4", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/amplitude-core": "1.0.0-alpha.0" + "@amplitude/amplitude-core": "1.0.0" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index e5e7756c..74d2f602 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@amplitude/amplitude-core@1.0.0-alpha.0": - version "1.0.0-alpha.0" - resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-1.0.0-alpha.0.tgz#8a1297d3b936855e5d2583ced16a883f27c3751a" - integrity sha512-bi5fQMzVWZYN1fWna7UjzmmCPFFtqagF88HPRgX8duk9xnMgM4E4uqEHnc1UyE5aPoWR1eeHBRss29PINAySjA== +"@amplitude/amplitude-core@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-1.0.0.tgz#bb5defca1de54f63f6228fad462a5cbcd8e00485" + integrity sha512-VobJZObB7zo0PTxpPKRF5ow9b8FEfLHrDGYml8QF1Q1zTN0mN8P5daXUeGrCh56ZVXCM68vU7hb6F+8j3KLtJQ== "@amplitude/eslint-plugin-amplitude@^1.0.1": version "1.0.1" From c1357830266ee312c2b5ba7179e887365caabf4f Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 14 Jan 2022 09:21:30 -0800 Subject: [PATCH 16/19] add ua parser back --- package.json | 1 + yarn.lock | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/package.json b/package.json index 97eb7d34..54e139e4 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "main": "amplitude.umd.js", "module": "amplitude.esm.js", "dependencies": { + "@amplitude/ua-parser-js": "0.7.26", "@amplitude/utils": "^1.0.5", "@babel/runtime": "^7.3.4", "blueimp-md5": "^2.10.0", diff --git a/yarn.lock b/yarn.lock index 74d2f602..800b9ebf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,6 +20,11 @@ resolved "https://registry.yarnpkg.com/@amplitude/types/-/types-1.0.4.tgz#21275b030c8267f9ea133a79c5c525e30c706d69" integrity sha512-iWdgTXiE0T/QCK88g2ezJEhJpYHDvDs0StVVPu1ygcl6qYzk/8xrNvbeEibiIBT8t/GJ8FtH5ZIPx3c4CMjlig== +"@amplitude/ua-parser-js@0.7.26": + version "0.7.26" + resolved "https://registry.yarnpkg.com/@amplitude/ua-parser-js/-/ua-parser-js-0.7.26.tgz#18d889d84d2ba90c248ab6fcd7e3dd07f1c9c86e" + integrity sha512-62/Rid6YQ7F2KT/5vTre41Y26ivrEoFC8lbrsJZqBKaiXMJWG0YpNv9RgxNSaZS2jPLVQgoB/FFeWxihOLfIcg== + "@amplitude/utils@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@amplitude/utils/-/utils-1.0.5.tgz#843d96b7965c69213bb1896980bed2c1569fbbed" From 4d0092c07fd1c03ae03ebc3dbf994e55d038edc2 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Mon, 24 Jan 2022 16:23:13 -0800 Subject: [PATCH 17/19] udpate package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54e139e4..b6cd8458 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "amplitude-js", "author": "Amplitude ", - "version": "8.14.0-alpha.3", + "version": "8.16.0", "license": "MIT", "description": "Javascript library for Amplitude Analytics", "keywords": [ From fcea09b2771b83da817d143e80603c075e460e1f Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Tue, 1 Feb 2022 13:28:09 -0800 Subject: [PATCH 18/19] use connector package instead of core --- package.json | 2 +- src/amplitude-client.js | 22 +++++++++++----------- yarn.lock | 10 ++++++---- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index b6cd8458..cd7678c6 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@babel/runtime": "^7.3.4", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/amplitude-core": "1.0.0" + "@amplitude/analytics-connector": "1.0.0-alpha.0" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/src/amplitude-client.js b/src/amplitude-client.js index 27675d5f..7ef3ce6c 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -21,7 +21,7 @@ import { AmplitudeServerZone, getEventLogApi } from './server-zone'; import ConfigManager from './config-manager'; import GlobalScope from './global-scope'; -import { AmplitudeCore } from '@amplitude/amplitude-core'; +import { AnalyticsConnector } from '@amplitude/analytics-connector'; /** * AmplitudeClient SDK API - instance constructor. @@ -59,7 +59,7 @@ var AmplitudeClient = function AmplitudeClient(instanceName) { this._isInitialized = false; // used to integrate with experiment SDK (client-side exposure tracking & real-time user properties) - this._core = null; + this._connector = null; this._userAgent = (navigator && navigator.userAgent) || null; }; @@ -86,7 +86,7 @@ AmplitudeClient.prototype.init = function init(apiKey, opt_userId, opt_config, o try { // used to integrate with experiment SDK (client-side exposure tracking & real-time user properties) - this._core = AmplitudeCore.getInstance(this._instanceName); + this._connector = AnalyticsConnector.getInstance(this._instanceName); _parseConfig(this.options, opt_config); if ( @@ -267,12 +267,12 @@ AmplitudeClient.prototype.init = function init(apiKey, opt_userId, opt_config, o } // Sets an event receiver to receive and forward exposure events from the experiment SDK. - this._core.analyticsConnector.setEventReceiver((event) => { + this._connector.eventBridge.setEventReceiver((event) => { this._logEvent(event.eventType, event.eventProperties, event.userProperties); }); // Set the user ID and device ID in the core identity store to enable fetching variants. - const editor = this._core.identityStore.editIdentity(); + const editor = this._connector.identityStore.editIdentity(); if (this.options.deviceId) { editor.setDeviceId(this.options.deviceId); } @@ -942,8 +942,8 @@ AmplitudeClient.prototype.setUserId = function setUserId(userId, startNewSession // Update core identity store to propagate new user info // to experiment SDK and trigger a fetch if the ID has changed. - if (this._core) { - this._core.identityStore.editIdentity().setUserId(this.options.userId).commit(); + if (this._connector) { + this._connector.identityStore.editIdentity().setUserId(this.options.userId).commit(); } } catch (e) { utils.log.error(e); @@ -1077,8 +1077,8 @@ AmplitudeClient.prototype.setDeviceId = function setDeviceId(deviceId) { // Update core identity store to propagate new user info // to experiment SDK and trigger a fetch if the ID has changed. - if (this._core) { - this._core.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit(); + if (this._connector) { + this._connector.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit(); } } } catch (e) { @@ -1423,8 +1423,8 @@ AmplitudeClient.prototype._logEvent = function _logEvent( // In the case of an identify event, update the core user store so the experiment SDK can fetch new variants and // utilize user properties in real time. - if (eventType === Constants.IDENTIFY_EVENT && this._core) { - this._core.identityStore + if (eventType === Constants.IDENTIFY_EVENT && this._connector) { + this._connector.identityStore .editIdentity() .updateUserProperties(utils.truncate(utils.validateProperties(userProperties))) .commit(); diff --git a/yarn.lock b/yarn.lock index 800b9ebf..926244d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,12 @@ # yarn lockfile v1 -"@amplitude/amplitude-core@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@amplitude/amplitude-core/-/amplitude-core-1.0.0.tgz#bb5defca1de54f63f6228fad462a5cbcd8e00485" - integrity sha512-VobJZObB7zo0PTxpPKRF5ow9b8FEfLHrDGYml8QF1Q1zTN0mN8P5daXUeGrCh56ZVXCM68vU7hb6F+8j3KLtJQ== +"@amplitude/analytics-connector@1.0.0-alpha.0": + version "1.0.0-alpha.0" + resolved "https://registry.yarnpkg.com/@amplitude/analytics-connector/-/analytics-connector-1.0.0-alpha.0.tgz#2a94313749dd9341a8b85bc1927ca4838910de9c" + integrity sha512-TTVOtvfQQ17Po54OYOPH7RKtvHGwI6x2g0+b/lFvlAM0a6Qal94Jm688Woke07qhxPFJfbQeZqPFrukWUsq8nw== + dependencies: + "@amplitude/ua-parser-js" "0.7.26" "@amplitude/eslint-plugin-amplitude@^1.0.1": version "1.0.1" From 47f56b468286e8e64c7292c8bbc1a6cc9856a254 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Wed, 2 Feb 2022 14:45:00 -0800 Subject: [PATCH 19/19] use v1 of connector --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cd7678c6..a1e99626 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@babel/runtime": "^7.3.4", "blueimp-md5": "^2.10.0", "query-string": "5", - "@amplitude/analytics-connector": "1.0.0-alpha.0" + "@amplitude/analytics-connector": "1.0.0" }, "devDependencies": { "@amplitude/eslint-plugin-amplitude": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index 926244d0..57e62b0b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@amplitude/analytics-connector@1.0.0-alpha.0": - version "1.0.0-alpha.0" - resolved "https://registry.yarnpkg.com/@amplitude/analytics-connector/-/analytics-connector-1.0.0-alpha.0.tgz#2a94313749dd9341a8b85bc1927ca4838910de9c" - integrity sha512-TTVOtvfQQ17Po54OYOPH7RKtvHGwI6x2g0+b/lFvlAM0a6Qal94Jm688Woke07qhxPFJfbQeZqPFrukWUsq8nw== +"@amplitude/analytics-connector@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@amplitude/analytics-connector/-/analytics-connector-1.0.0.tgz#cb8d84b7c3eb2809f2485d5c105699b01a8c3af6" + integrity sha512-6RZwSMjhO9VD5rw5FV5U7pU00drDQAQqA+ZTv4mSop8XEws9TimzynGYzLYLijV0vnK7h6j7D3+VJtM4f4MlNA== dependencies: "@amplitude/ua-parser-js" "0.7.26"