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

@artsy/cohesion

Package Overview
Dependencies
Maintainers
13
Versions
455
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@artsy/cohesion - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

dist/Helpers/Authentication/__tests__/AuthImpression.test.d.ts

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# v1.11.0 (Tue Jun 16 2020)
#### 🚀 Enhancement
- Cleanup file structure [#64](https://github.com/artsy/cohesion/pull/64) ([@eessex](https://github.com/eessex))
#### Authors: 1
- Eve Essex ([@eessex](https://github.com/eessex))
---
# v1.10.0 (Mon Jun 15 2020)

@@ -2,0 +14,0 @@

2

dist/index.d.ts

@@ -1,2 +0,2 @@

export * from "./Events";
export * from "./Helpers";
export * from "./Schema";

@@ -7,5 +7,5 @@ "use strict";

var _Events = require("./Events");
var _Helpers = require("./Helpers");
Object.keys(_Events).forEach(function (key) {
Object.keys(_Helpers).forEach(function (key) {
if (key === "default" || key === "__esModule") return;

@@ -15,3 +15,3 @@ Object.defineProperty(exports, key, {

get: function () {
return _Events[key];
return _Helpers[key];
}

@@ -18,0 +18,0 @@ });

@@ -1,4 +0,4 @@

import { ActionType } from "../Event";
import { AuthContextModule } from "../ContextModule";
import { AuthIntent } from "../Intent";
import { ActionType } from ".";
import { AuthContextModule } from "../Values/ContextModule";
import { AuthIntent } from "../Values/Intent";
/**

@@ -5,0 +5,0 @@ * Schemas describing authentication events

@@ -1,5 +0,5 @@

import { ActionType } from "../Event";
import { ContextModule } from "../ContextModule";
import { PageOwnerType } from "../OwnerType";
import { EntityModuleType } from "../EntityModuleType";
import { ActionType } from ".";
import { ContextModule } from "../Values/ContextModule";
import { PageOwnerType } from "../Values/OwnerType";
import { EntityModuleType } from "../Values/EntityModuleType";
/**

@@ -6,0 +6,0 @@ * Schemas describing Click events

@@ -1,3 +0,3 @@

import { ActionType } from "../Event";
import { PageOwnerType } from "../OwnerType";
import { ActionType } from ".";
import { PageOwnerType } from "../Values/OwnerType";
/**

@@ -4,0 +4,0 @@ * Schemas describing system events

@@ -1,5 +0,5 @@

import { ActionType } from "../Event";
import { ContextModule } from "../ContextModule";
import { ScreenOwnerType } from "../OwnerType";
import { EntityModuleType } from "../EntityModuleType";
import { ActionType } from ".";
import { ContextModule } from "../Values/ContextModule";
import { EntityModuleType } from "../Values/EntityModuleType";
import { ScreenOwnerType } from "../Values/OwnerType";
/**

@@ -6,0 +6,0 @@ * Schemas describing Tap events

@@ -1,3 +0,2 @@

export * from "./ContextModule";
export * from "./Event";
export * from "./Events";
export * from "./Events/Authentication";

@@ -7,4 +6,5 @@ export * from "./Events/Click";

export * from "./Events/Tap";
export * from "./EntityModuleType";
export * from "./Intent";
export * from "./OwnerType";
export * from "./Values/ContextModule";
export * from "./Values/EntityModuleType";
export * from "./Values/Intent";
export * from "./Values/OwnerType";

@@ -7,5 +7,5 @@ "use strict";

var _ContextModule = require("./ContextModule");
var _Events = require("./Events");
Object.keys(_ContextModule).forEach(function (key) {
Object.keys(_Events).forEach(function (key) {
if (key === "default" || key === "__esModule") return;

@@ -15,3 +15,3 @@ Object.defineProperty(exports, key, {

get: function () {
return _ContextModule[key];
return _Events[key];
}

@@ -21,14 +21,2 @@ });

var _Event = require("./Event");
Object.keys(_Event).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _Event[key];
}
});
});
var _Authentication = require("./Events/Authentication");

@@ -82,4 +70,16 @@

var _EntityModuleType = require("./EntityModuleType");
var _ContextModule = require("./Values/ContextModule");
Object.keys(_ContextModule).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _ContextModule[key];
}
});
});
var _EntityModuleType = require("./Values/EntityModuleType");
Object.keys(_EntityModuleType).forEach(function (key) {

@@ -95,3 +95,3 @@ if (key === "default" || key === "__esModule") return;

var _Intent = require("./Intent");
var _Intent = require("./Values/Intent");

@@ -108,3 +108,3 @@ Object.keys(_Intent).forEach(function (key) {

var _OwnerType = require("./OwnerType");
var _OwnerType = require("./Values/OwnerType");

@@ -111,0 +111,0 @@ Object.keys(_OwnerType).forEach(function (key) {

{
"name": "@artsy/cohesion",
"version": "1.10.0",
"version": "1.11.0",
"description": "Analytics schema and library helpers",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -42,3 +42,3 @@ ## Cohesion [![CircleCI][circle_badge]][circleci] [![npm version][npm_badge]][npm]

Valid analytics events are described in `/Schema/Event.ts`, and individual event schemas live in the `Schema/Events` directory, divided by concern.
Valid analytics events are described in `/Schema/Events/index.ts`, and individual event schemas live in the `Schema/Events` directory, divided by concern.

@@ -49,6 +49,6 @@ Typings for all allowed values, such as `ContextModule`, are exported for use by engineers in consuming projects.

1. In `Schema/Event.ts`, add the name of the new event. This name defines the corresponding downstream table's name in Redshift, and should use the [`lowerCamelCase`][lowerCamelCase] naming convention.
1. In `Schema/Events`, add the name of the new event. This name defines the corresponding downstream table's name in Redshift, and should use the [`lowerCamelCase`][lowercamelcase] naming convention.
```typescript
// Schema/ActionType.ts
// Schema/Events/index.ts

@@ -65,3 +65,3 @@ export enum ActionType {

- The name of the interface should match the `ActionType` created in step 1, but use the [`UpperCamelCase`][UpperCamelCase] naming convention.
- The name of the interface should match the `ActionType` created in step 1, but use the [`UpperCamelCase`][uppercamelcase] naming convention.
- The `action` key is required and should match the `ActionType` created in step 1.

@@ -81,3 +81,3 @@ - If your event uses values not yet in the schema, such as a new `ContextModule`, add new values to the existing typings in the Schema directory.

3. In `Schema/Event.ts`, add the new interface to the valid events master list, `Event`
3. In `Schema/Events/index.ts`, add the new interface to the valid events master list, `Event`

@@ -96,7 +96,7 @@ 4. Add descriptive comments with examples to explain the use of your new event. Our documentation is generated automatically from in-code comments, find more information on syntax in the [`typedoc` docs][typedoc_docs].

7. Data analysts should request an engineer to construct a new event helper for the `/Events` directory (see below).
7. Data analysts should request an engineer to construct a new event helper for the `/Helpers` directory (see below).
## Events
## Helpers
The `/Events` directory contains javascript helpers that return schema-compliant analytics events, and provide some useful default values. Each helper corresponds to one event from `/Schema/Events.ts`.
The `/Helpers` directory contains javascript helpers that return schema-compliant analytics events, and provide some useful default values. Each helper corresponds to one event from `/Schema/Events`.

@@ -111,5 +111,5 @@ Engineers should use these helpers whenever sending analytics data to Segment, for example, when creating an analytics event with `react-tracking`.

[@abhitip]: https://github.com/abhitip
[Yarn]: https://classic.yarnpkg.com/en/docs/install/#mac-stable
[lowerCamelCase]: https://wiki.c2.com/?LowerCamelCase
[UpperCamelCase]: https://wiki.c2.com/?UpperCamelCase
[yarn]: https://classic.yarnpkg.com/en/docs/install/#mac-stable
[lowercamelcase]: https://wiki.c2.com/?LowerCamelCase
[uppercamelcase]: https://wiki.c2.com/?UpperCamelCase
[typedoc_docs]: https://typedoc.org/guides/doccomments
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