Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amplitude

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplitude - npm Package Compare versions

Comparing version 5.0.2 to 5.1.1

5

CHANGELOG.md
# Amplitude Change Log
## v5.1.1
As of 2020-05-30, Amplitude reported issues with their SSL certificate, so they set up an endpoint and alternate endpoint at `https://api2.amplitude.com`. Read about it on [Amplitude's Status Page](https://status.amplitude.com/incidents/lf2pwqnyrn6s) and affected devices [here](https://calnetweb.berkeley.edu/calnet-technologists/incommon-sectigo-certificate-service/addtrust-external-root-expiration-may-2020).
- Add option to set token endpoint via an environment variable, i.e. `AMPLITUDE_TOKEN_ENDPOINT="https://api2.amplitude.com"`
- Add option to set token endpoint via constructor options, i.e. `https://api2.amplitude.com`
## v5.0.2

@@ -4,0 +9,0 @@ - Convert to typescript (this shouldn't break anything as it's being exported just like before)

1

dist/amplitude.d.ts

@@ -6,2 +6,3 @@ import { AxiosResponse } from 'axios';

private readonly token;
private readonly tokenEndpoint;
private readonly secretKey?;

@@ -8,0 +9,0 @@ private readonly userId?;

8

dist/amplitude.js

@@ -42,2 +42,6 @@ "use strict";

this.token = token;
this.tokenEndpoint =
options.tokenEndpoint ||
process.env.AMPLITUDE_TOKEN_ENDPOINT ||
AMPLITUDE_TOKEN_ENDPOINT;
this.secretKey = options.secretKey;

@@ -80,3 +84,3 @@ this.userId = options.userId || options.user_id;

return errors_1.axiosErrorCatcher(axios_1.default
.post(`${AMPLITUDE_TOKEN_ENDPOINT}/identify`, encodedParams, {
.post(`${this.tokenEndpoint}/identify`, encodedParams, {
headers: {

@@ -97,3 +101,3 @@ 'content-type': 'application/x-www-form-urlencoded'

return errors_1.axiosErrorCatcher(axios_1.default
.post(`${AMPLITUDE_TOKEN_ENDPOINT}/2/httpapi`, params)
.post(`${this.tokenEndpoint}/2/httpapi`, params)
.then(res => res.data));

@@ -100,0 +104,0 @@ }

@@ -6,2 +6,3 @@ export interface AmplitudeOptions {

sessionId?: string;
tokenEndpoint?: string;
user_id?: string;

@@ -8,0 +9,0 @@ device_id?: string;

{
"name": "amplitude",
"version": "5.0.2",
"version": "5.1.1",
"description": "A node wrapper for Amplitude analytics http api",

@@ -70,4 +70,4 @@ "author": "Blade Barringer <blade@crookedneighbor.com>",

"@types/mocha": "^7.0.2",
"@types/node": "^14.0.4",
"@types/sinon": "^9.0.3",
"@types/node": "^14.0.6",
"@types/sinon": "^9.0.4",
"@types/sinon-chai": "^3.2.4",

@@ -84,10 +84,10 @@ "@typescript-eslint/eslint-plugin": "^2.34.0",

"husky": "^4.2.5",
"lint-staged": "^10.2.4",
"mocha": "^7.1.2",
"lint-staged": "^10.2.7",
"mocha": "^7.2.0",
"nock": "^12.0.3",
"nyc": "^15.0.1",
"nyc": "^15.1.0",
"prettier": "1.19.1",
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0",
"ts-node": "^8.10.1",
"ts-node": "^8.10.2",
"typescript": "^3.9.3"

@@ -94,0 +94,0 @@ },

@@ -7,2 +7,17 @@ # amplitude

## Amplitude SSL Issue
As of 2020-05-30, Amplitude reported issues with their SSL certificate, so they set up an endpoint and alternate endpoint at `https://api2.amplitude.com`. Read about it on [Amplitude's Status Page](https://status.amplitude.com/incidents/lf2pwqnyrn6s) and affected devices [here](https://calnetweb.berkeley.edu/calnet-technologists/incommon-sectigo-certificate-service/addtrust-external-root-expiration-may-2020).
As of v5.1.0+, you can use the alternative endpoint by setting the environment variable:
```bash
AMPLITUDE_TOKEN_ENDPOINT = 'https://api2.amplitude.com'
```
Or in the constructor:
```javascript
const amplitude = new Amplitude('api-token', {
tokenEndpoint: 'https://api2.amplitude.com'
})
```
## Version 5+ Note ##

@@ -9,0 +24,0 @@ For amplitude@5+, it uses Amplitude's [V2 HTTP API](https://help.amplitude.com/hc/en-us/articles/360032842391-HTTP-API-V2), which replaces the deprecated [V1 HTTP API](https://help.amplitude.com/hc/en-us/articles/204771828-HTTP-API-Deprecated-). This only affects the [`.track` method](#track-an-event). The only potential breaking change is by default `user_id` and `device_id` require a minimum of 5 characters.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc