@segment/analytics.js-core
Advanced tools
Comparing version 3.13.5 to 3.13.6
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var _analytics = global.analytics; | ||
@@ -71,5 +72,2 @@ /* | ||
* Use a `plugin`. | ||
* | ||
* @param {Function} plugin | ||
* @return {Analytics} | ||
*/ | ||
@@ -82,5 +80,2 @@ Analytics.prototype.use = function (plugin) { | ||
* Define a new `Integration`. | ||
* | ||
* @param {Function} Integration | ||
* @return {Analytics} | ||
*/ | ||
@@ -96,5 +91,2 @@ Analytics.prototype.addIntegration = function (Integration) { | ||
* Define a new `SourceMiddleware` | ||
* | ||
* @param {Function} Middleware | ||
* @return {Analytics} | ||
*/ | ||
@@ -107,6 +99,3 @@ Analytics.prototype.addSourceMiddleware = function (middleware) { | ||
* Define a new `IntegrationMiddleware` | ||
* DEPRECATED | ||
* | ||
* @param {Function} Middleware | ||
* @return {Analytics} | ||
* @deprecated | ||
*/ | ||
@@ -120,7 +109,4 @@ Analytics.prototype.addIntegrationMiddleware = function (middleware) { | ||
* Destination Middleware is chained after integration middleware | ||
* | ||
* @param {String} integrationName | ||
* @param {Array} Middlewares | ||
* @return {Analytics} | ||
*/ | ||
// TODO remove `unknown` | ||
Analytics.prototype.addDestinationMiddleware = function (integrationName, middlewares) { | ||
@@ -140,6 +126,2 @@ var self = this; | ||
* Aliased to `init` for convenience. | ||
* | ||
* @param {Object} [settings={}] | ||
* @param {Object} [options={}] | ||
* @return {Analytics} | ||
*/ | ||
@@ -153,3 +135,3 @@ Analytics.prototype.init = Analytics.prototype.initialize = function (settings, options) { | ||
var self = this; | ||
each(function (opts, name) { | ||
each(function (_opts, name) { | ||
var Integration = self.Integrations[name]; | ||
@@ -238,4 +220,2 @@ if (!Integration) | ||
* Set the user's `id`. | ||
* | ||
* @param {Mixed} id | ||
*/ | ||
@@ -248,4 +228,2 @@ Analytics.prototype.setAnonymousId = function (id) { | ||
* Add an integration. | ||
* | ||
* @param {Integration} integration | ||
*/ | ||
@@ -534,5 +512,2 @@ Analytics.prototype.add = function (integration) { | ||
* FIXME: BACKWARDS COMPATIBILITY: convert an old `pageview` to a `page` call. | ||
* | ||
* @param {string} [url] | ||
* @return {Analytics} | ||
* @api private | ||
@@ -582,5 +557,2 @@ */ | ||
* Register a `fn` to be fired when all the analytics services are ready. | ||
* | ||
* @param {Function} fn | ||
* @return {Analytics} | ||
*/ | ||
@@ -600,4 +572,2 @@ Analytics.prototype.ready = function (fn) { | ||
* Set the `timeout` (in milliseconds) used for callbacks. | ||
* | ||
* @param {Number} timeout | ||
*/ | ||
@@ -609,4 +579,2 @@ Analytics.prototype.timeout = function (timeout) { | ||
* Enable or disable debug. | ||
* | ||
* @param {string|boolean} str | ||
*/ | ||
@@ -623,5 +591,2 @@ Analytics.prototype.debug = function (str) { | ||
* Apply options. | ||
* | ||
* @param {Object} options | ||
* @return {Analytics} | ||
* @api private | ||
@@ -641,5 +606,2 @@ */ | ||
* Callback a `fn` after our defined timeout period. | ||
* | ||
* @param {Function} fn | ||
* @return {Analytics} | ||
* @api private | ||
@@ -776,4 +738,2 @@ */ | ||
* | ||
* @param {String} query | ||
* @return {Analytics} | ||
* @api private | ||
@@ -799,4 +759,2 @@ */ | ||
* | ||
* @param {String} prefix | ||
* @param {Object} object | ||
* @return {Object} | ||
@@ -819,5 +777,2 @@ * @api private | ||
* Normalize the given `msg`. | ||
* | ||
* @param {Object} msg | ||
* @return {Object} | ||
*/ | ||
@@ -824,0 +779,0 @@ Analytics.prototype.normalize = function (msg) { |
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -21,8 +22,2 @@ * Module dependencies. | ||
* Get or set the cookie options. | ||
* | ||
* @param {Object} options | ||
* @field {Number} maxage (1 year) | ||
* @field {String} domain | ||
* @field {String} path | ||
* @field {Boolean} secure | ||
*/ | ||
@@ -59,6 +54,2 @@ Cookie.prototype.options = function (options) { | ||
* Set a `key` and `value` in our cookie. | ||
* | ||
* @param {String} key | ||
* @param {Object} value | ||
* @return {Boolean} saved | ||
*/ | ||
@@ -77,5 +68,2 @@ Cookie.prototype.set = function (key, value) { | ||
* Get a value from our cookie by `key`. | ||
* | ||
* @param {String} key | ||
* @return {Object} value | ||
*/ | ||
@@ -94,5 +82,2 @@ Cookie.prototype.get = function (key) { | ||
* Remove a value from our cookie by `key`. | ||
* | ||
* @param {String} key | ||
* @return {Boolean} removed | ||
*/ | ||
@@ -99,0 +84,0 @@ Cookie.prototype.remove = function (key) { |
@@ -0,1 +1,10 @@ | ||
# 3.13.6 / 2020-06-15 | ||
- test: test analytics.js from a test website | ||
- refactor: continue the typescript migration by moving some files to .ts and adding some types | ||
# 3.13.5 / 2020-06-08 | ||
- refactor: improve typescript support | ||
# 3.13.4 / 2020-06-02 | ||
@@ -2,0 +11,0 @@ |
{ | ||
"name": "@segment/analytics.js-core", | ||
"author": "Segment <friends@segment.com>", | ||
"version": "3.13.5", | ||
"version": "3.13.6", | ||
"description": "The hassle-free way to integrate analytics into any web application.", | ||
@@ -16,3 +16,3 @@ "keywords": [ | ||
"lint": "eslint \"./{lib,test}/**/*.js\"", | ||
"format": "prettier-eslint --write --list-different \"./{lib,test}/**/*.{js,json,md}\"", | ||
"format": "prettier-eslint --write --list-different \"./{lib,test,test-e2e}/**/*.{ts,js,json,md}\"", | ||
"precommit": "lint-staged", | ||
@@ -66,7 +66,13 @@ "np": "np --no-publish", | ||
"devDependencies": { | ||
"@segment/analytics.js-integration": "^3.2.1", | ||
"@codeceptjs/mock-request": "^0.3.0", | ||
"@segment/analytics.js-integration": "^3.2.2", | ||
"@segment/eslint-config": "^4.0.0", | ||
"@types/express": "^4.17.6", | ||
"@types/lodash": "^4.14.155", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^14.0.6", | ||
"@types/node-fetch": "^2.5.7", | ||
"browserify": "13.0.0", | ||
"browserify-istanbul": "^2.0.0", | ||
"codeceptjs": "^2.6.5", | ||
"codecov": "^3.0.2", | ||
@@ -81,2 +87,3 @@ "compat-trigger-event": "^1.0.0", | ||
"eslint-plugin-require-path-exists": "^1.1.8", | ||
"express": "^4.17.1", | ||
"husky": "^0.14.3", | ||
@@ -96,3 +103,5 @@ "istanbul": "^0.4.3", | ||
"lint-staged": "^7.2.0", | ||
"lodash": "^4.17.15", | ||
"mocha": "^2.2.5", | ||
"node-fetch": "^2.6.0", | ||
"np": "^3.0.4", | ||
@@ -102,6 +111,8 @@ "phantomjs-prebuilt": "^2.1.7", | ||
"proclaim": "^3.4.1", | ||
"puppeteer": "^3.3.0", | ||
"sinon": "^1.7.3", | ||
"snyk": "^1.83.0", | ||
"ts-node": "^8.10.2", | ||
"typescript": "^3.9.3", | ||
"typescript": "^3.9.7", | ||
"wait-on": "^5.0.1", | ||
"watchify": "^3.7.0" | ||
@@ -108,0 +119,0 @@ }, |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
119942
38
2459
0
49
2