Socket
Socket
Sign inDemoInstall

@atlaskit/analytics-next

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/analytics-next - npm Package Compare versions

Comparing version 5.3.1 to 5.4.0

46

CHANGELOG.md
# @atlaskit/analytics-next
## 5.4.0
### Minor Changes
- [minor][e1f8aaf33b](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/e1f8aaf33b):
- Adding entry point for `AnalyticsErrorBoundary` package
```
// How to use
// Import via entry point
import AnalyticsListener from '@atlaskit/analytics-next/AnalyticsListener';
import AnalyticsErrorBoundary from '@atlaskit/analytics-next/AnalyticsErrorBoundary';
// Wrapping your component with the component
class ButtonWithAnalyticsErrorBoundary etends React.Component {
handleEvent = (analyticsEvent) => {
const { payload, context } = analyticsEvent;
console.log('Received event:', analyticsEvent, { payload, context });
};
render() {
return (
<AnalyticsListener channel="atlaskit" onEvent={this.handleEvent}>
<AnalyticsErrorBoundary
channel="atlaskit"
data={{
componentName: 'button',
packageName: '@atlaskit/button',
componentVersion: '999.9.9',
}}
>
<Button>Click me</Button>
</AnalyticsErrorBoundary>
</AnalyticsListener>
)
}
}
```
Notes on new API:
- Plug-and-play component. As soon and it's wrapping a component it's fully integrated.
- It has Analytics context and events integrated already. Keep in mind it requires `AnalyticsListener` as a top level component to work properly, otherwise it won't trigger analytics events.
## 5.3.1

@@ -4,0 +50,0 @@

2

dist/cjs/version.json
{
"name": "@atlaskit/analytics-next",
"version": "5.3.1",
"version": "5.4.0",
"sideEffects": false
}
{
"name": "@atlaskit/analytics-next",
"version": "5.3.1",
"version": "5.4.0",
"sideEffects": false
}

@@ -12,2 +12,3 @@ // @flow

* [AnalyticsListener](#AnalyticsListener)
* [AnalyticsErrorBoundary](#AnalyticsErrorBoundary)
* [AnalyticsContext](#AnalyticsContext)

@@ -70,3 +71,3 @@ * [withAnalyticsContext](#withAnalyticsContext)

A HOC which provides the wrapped component with a method for creating \`UIAnalyticsEvent\`s, via \`props.createAnalyticsEvent\`.
See the section on [creating your own events](/packages/core/analytics-next/docs/concepts#creating-your-own-events)
See the section on [creating your own events](/packages/core/analytics-next/docs/concepts#creating-your-own-events)
in the Concepts page for a thorough explanation of how to use this component.

@@ -119,2 +120,58 @@

<a name="AnalyticsErrorBoundary"></a>
### AnalyticsErrorBoundary
&nbsp;
${code`import { AnalyticsErrorBoundary } from '@atlaskit/analytics-next';`}
Wrap part of your tree in \`AnalyticsErrorBoundary\` to provide error boundary track to any events created beneath it.
When a component is created verifies all of the components above it in the tree and any error will be catched and tracked automatically.
It's up to the developer pass this information when you're adding the component.
Usage:
${code`
import {
AnalyticsListener,
AnalyticsErrorBoundary
} from '@atlaskit/analytics-next';
// Wrapping your component with the component
class ButtonWithAnalyticsErrorBoundary etends React.Component {
handleEvent = (analyticsEvent) => {
const { payload, context } = analyticsEvent;
console.log('Received event:', analyticsEvent, { payload, context });
};
render() {
return (
<AnalyticsListener channel="atlaskit" onEvent={this.handleEvent}>
<AnalyticsErrorBoundary
channel="atlaskit"
data={{
componentName: 'button',
packageName: '@atlaskit/button',
componentVersion: '999.9.9',
}}
>
<Button>Click me</Button>
</AnalyticsErrorBoundary>
</AnalyticsListener>
)
}
}
`}
${(
<Props
heading="AnalyticsErrorBoundary Props"
props={require('!!extract-react-types-loader!../src/AnalyticsErrorBoundary')}
/>
)}
<a name="AnalyticsContext"></a>

@@ -121,0 +178,0 @@ ### AnalyticsContext

{
"name": "@atlaskit/analytics-next",
"version": "5.3.1",
"version": "5.4.0",
"description": "The 🆕 Atlaskit component analytics framework",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

{
"name": "@atlaskit/analytics-next",
"version": "5.3.1",
"version": "5.4.0",
"sideEffects": false
}
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