Skip to content

Commit 3b28fb8

Browse files
authored
chore(yarn): regen yarn.lock (#25)
Ref: LIB-712
1 parent 5615f89 commit 3b28fb8

File tree

7 files changed

+799
-1020
lines changed

7 files changed

+799
-1020
lines changed

packages/core/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
**Ƭ Integration**: * `function` | `object`
2626
*
2727

28-
*Defined in [analytics.ts:8](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L8)*
28+
*Defined in analytics.ts:8*
2929

3030
___
3131

packages/core/docs/classes/analytics.client.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
**● ready**: *`false`* = false
4040

41-
*Defined in [analytics.ts:96](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L96)*
41+
*Defined in analytics.ts:96*
4242

4343
Whether the client is ready to send events to Segment.
4444

@@ -54,15 +54,15 @@ ___
5454

5555
**alias**(newId: *`string`*): `Promise`<`void`>
5656

57-
*Defined in [analytics.ts:260](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L260)*
57+
*Defined in analytics.ts:260*
5858

5959
Merge two user identities, effectively connecting two sets of user data as one. This may not be supported by all integrations.
6060

6161
When you learn more about who the group is, you can record that information with group.
6262

6363
**Parameters:**
6464

65-
| Param | Type | Description |
65+
| Name | Type | Description |
6666
| ------ | ------ | ------ |
6767
| newId | `string` | The new ID you want to alias the existing ID to. The existing ID will be either the previousId if you have called identify, or the anonymous ID. |
6868

@@ -75,15 +75,15 @@ ___
7575

7676
**catch**(handler: *[ErrorHandler]()*): `this`
7777

78-
*Defined in [analytics.ts:109](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L109)*
78+
*Defined in analytics.ts:109*
7979

8080
Catch React-Native bridge errors
8181

8282
These errors are emitted when calling the native counterpart.
8383

8484
**Parameters:**
8585

86-
| Param | Type |
86+
| Name | Type |
8787
| ------ | ------ |
8888
| handler | [ErrorHandler]() |
8989

@@ -96,7 +96,7 @@ ___
9696

9797
**disable**(): `Promise`<`void`>
9898

99-
*Defined in [analytics.ts:299](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L299)*
99+
*Defined in analytics.ts:299*
100100

101101
Completely disable the sending of any analytics data.
102102

@@ -111,7 +111,7 @@ ___
111111

112112
**enable**(): `Promise`<`void`>
113113

114-
*Defined in [analytics.ts:289](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L289)*
114+
*Defined in analytics.ts:289*
115115

116116
Enable the sending of analytics data. Enabled by default.
117117

@@ -126,7 +126,7 @@ ___
126126

127127
**flush**(): `Promise`<`void`>
128128

129-
*Defined in [analytics.ts:280](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L280)*
129+
*Defined in analytics.ts:280*
130130

131131
Trigger an upload of all queued events.
132132

@@ -139,20 +139,20 @@ ___
139139

140140
### group
141141

142-
**group**(groupId: *`string`*, traits?: *`JsonMap`*): `Promise`<`void`>
142+
**group**(groupId: *`string`*, traits?: *[JsonMap]()*): `Promise`<`void`>
143143

144-
*Defined in [analytics.ts:247](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L247)*
144+
*Defined in analytics.ts:247*
145145

146146
Associate a user with a group, organization, company, project, or w/e _you_ call them.
147147

148148
When you learn more about who the group is, you can record that information with group.
149149

150150
**Parameters:**
151151

152-
| Param | Type | Default value | Description |
152+
| Name | Type | Default value | Description |
153153
| ------ | ------ | ------ | ------ |
154154
| groupId | `string` | - | A database ID for this group. |
155-
| `Default value` traits | `JsonMap` | {} | A dictionary of traits you know about the group. Things like: name, employees, etc. |
155+
| `Default value` traits | [JsonMap]() | {} | A dictionary of traits you know about the group. Things like: name, employees, etc. |
156156

157157
**Returns:** `Promise`<`void`>
158158

@@ -161,20 +161,20 @@ ___
161161

162162
### identify
163163

164-
**identify**(user: *`string`*, traits?: *`JsonMap`*): `Promise`<`void`>
164+
**identify**(user: *`string`*, traits?: *[JsonMap]()*): `Promise`<`void`>
165165

166-
*Defined in [analytics.ts:235](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L235)*
166+
*Defined in analytics.ts:235*
167167

168168
Associate a user with their unique ID and record traits about them.
169169

170170
When you learn more about who your user is, you can record that information with identify.
171171

172172
**Parameters:**
173173

174-
| Param | Type | Default value | Description |
174+
| Name | Type | Default value | Description |
175175
| ------ | ------ | ------ | ------ |
176176
| user | `string` | - | database ID (or email address) for this user. If you don't have a userId but want to record traits, you should pass nil. For more information on how we generate the UUID and Apple's policies on IDs, see [https://segment.io/libraries/ios#ids](https://segment.io/libraries/ios#ids) |
177-
| `Default value` traits | `JsonMap` | {} | A dictionary of traits you know about the user. Things like: email, name, plan, etc. |
177+
| `Default value` traits | [JsonMap]() | {} | A dictionary of traits you know about the user. Things like: email, name, plan, etc. |
178178

179179
**Returns:** `Promise`<`void`>
180180

@@ -185,7 +185,7 @@ ___
185185

186186
**middleware**(middleware: *[Middleware]()*): `this`
187187

188-
*Defined in [analytics.ts:147](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L147)*
188+
*Defined in analytics.ts:147*
189189

190190
Append a new middleware to the middleware chain.
191191

@@ -210,7 +210,7 @@ analytics.middleware(async ({next, context}) =>
210210

211211
**Parameters:**
212212

213-
| Param | Type | Description |
213+
| Name | Type | Description |
214214
| ------ | ------ | ------ |
215215
| middleware | [Middleware]() | |
216216

@@ -223,7 +223,7 @@ ___
223223

224224
**reset**(): `Promise`<`void`>
225225

226-
*Defined in [analytics.ts:270](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L270)*
226+
*Defined in analytics.ts:270*
227227

228228
Reset any user state that is cached on the device.
229229

@@ -236,20 +236,20 @@ ___
236236

237237
### screen
238238

239-
**screen**(name: *`string`*, properties?: *`JsonMap`*): `Promise`<`void`>
239+
**screen**(name: *`string`*, properties?: *[JsonMap]()*): `Promise`<`void`>
240240

241-
*Defined in [analytics.ts:221](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L221)*
241+
*Defined in analytics.ts:221*
242242

243243
Record the screens or views your users see.
244244

245245
When a user views a screen in your app, you'll want to record that here. For some tools like Google Analytics and Flurry, screen views are treated specially, and are different from "events" kind of like "page views" on the web. For services that don't treat "screen views" specially, we map "screen" straight to "track" with the same parameters. For example, Mixpanel doesn't treat "screen views" any differently. So a call to "screen" will be tracked as a normal event in Mixpanel, but get sent to Google Analytics and Flurry as a "screen".
246246

247247
**Parameters:**
248248

249-
| Param | Type | Default value | Description |
249+
| Name | Type | Default value | Description |
250250
| ------ | ------ | ------ | ------ |
251251
| name | `string` | - | The title of the screen being viewed. We recommend using human-readable names like 'Photo Feed' or 'Completed Purchase Screen'. |
252-
| `Default value` properties | `JsonMap` | {} | A dictionary of properties for the screen view event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
252+
| `Default value` properties | [JsonMap]() | {} | A dictionary of properties for the screen view event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
253253

254254
**Returns:** `Promise`<`void`>
255255

@@ -260,9 +260,9 @@ ___
260260

261261
**setup**(writeKey: *`string`*, configuration?: *[Configuration](../interfaces/analytics.configuration.md)*): `Promise`<`void`>
262262

263-
*Defined in [analytics.ts:186](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L186)*
263+
*Defined in analytics.ts:186*
264264

265-
Setup the Analytics module. All calls made before are queued and executed if the configuration was successful.
265+
Setup the Analytics module. All calls made before are queued and only executed if the configuration was successful.
266266

267267
```js
268268
await analytics.setup('YOUR_WRITE_KEY', {
@@ -276,7 +276,7 @@ await analytics.setup('YOUR_WRITE_KEY', {
276276

277277
**Parameters:**
278278

279-
| Param | Type | Default value | Description |
279+
| Name | Type | Default value | Description |
280280
| ------ | ------ | ------ | ------ |
281281
| writeKey | `string` | - | Your Segment.io write key |
282282
| `Default value` configuration | [Configuration](../interfaces/analytics.configuration.md) | {} | An optional [Configuration](../interfaces/analytics.configuration.md) object. |
@@ -288,20 +288,20 @@ ___
288288

289289
### track
290290

291-
**track**(event: *`string`*, properties?: *`JsonMap`*): `Promise`<`void`>
291+
**track**(event: *`string`*, properties?: *[JsonMap]()*): `Promise`<`void`>
292292

293-
*Defined in [analytics.ts:203](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L203)*
293+
*Defined in analytics.ts:203*
294294

295295
Record the actions your users perform.
296296

297297
When a user performs an action in your app, you'll want to track that action for later analysis. Use the event name to say what the user did, and properties to specify any interesting details of the action.
298298

299299
**Parameters:**
300300

301-
| Param | Type | Default value | Description |
301+
| Name | Type | Default value | Description |
302302
| ------ | ------ | ------ | ------ |
303303
| event | `string` | - | The name of the event you're tracking. We recommend using human-readable names like \`Played a Song\` or \`Updated Status\`. |
304-
| `Default value` properties | `JsonMap` | {} | A dictionary of properties for the event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
304+
| `Default value` properties | [JsonMap]() | {} | A dictionary of properties for the event. If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc. |
305305

306306
**Returns:** `Promise`<`void`>
307307

@@ -312,7 +312,7 @@ ___
312312

313313
**useNativeConfiguration**(): `this`
314314

315-
*Defined in [analytics.ts:159](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L159)*
315+
*Defined in analytics.ts:159*
316316

317317
Use the native configuration.
318318

packages/core/docs/interfaces/analytics.configuration.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
**● android**: * `undefined` &#124; `object`
3131
*
3232

33-
*Defined in [analytics.ts:69](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L69)*
33+
*Defined in analytics.ts:69*
3434

3535
Android specific settings.
3636

@@ -42,7 +42,7 @@ ___
4242
**● debug**: * `undefined` &#124; `false` &#124; `true`
4343
*
4444

45-
*Defined in [analytics.ts:38](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L38)*
45+
*Defined in analytics.ts:38*
4646

4747
___
4848
<a id="flushat"></a>
@@ -52,7 +52,7 @@ ___
5252
**● flushAt**: * `undefined` &#124; `number`
5353
*
5454

55-
*Defined in [analytics.ts:46](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L46)*
55+
*Defined in analytics.ts:46*
5656

5757
The number of queued events that the analytics client should flush at. Setting this to `1` will not queue any events and will use more battery.
5858

@@ -66,7 +66,7 @@ ___
6666
**● ios**: * `undefined` &#124; `object`
6767
*
6868

69-
*Defined in [analytics.ts:51](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L51)*
69+
*Defined in analytics.ts:51*
7070

7171
iOS specific settings.
7272

@@ -78,7 +78,7 @@ ___
7878
**● recordScreenViews**: * `undefined` &#124; `false` &#124; `true`
7979
*
8080

81-
*Defined in [analytics.ts:17](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L17)*
81+
*Defined in analytics.ts:17*
8282

8383
Whether the analytics client should automatically track application lifecycle events, such as "Application Installed", "Application Updated" and "Application Opened".
8484

@@ -92,7 +92,7 @@ ___
9292
**● trackAppLifecycleEvents**: * `undefined` &#124; `false` &#124; `true`
9393
*
9494

95-
*Defined in [analytics.ts:26](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L26)*
95+
*Defined in analytics.ts:26*
9696

9797
Whether the analytics client should automatically make a screen call when a view controller is added to a view hierarchy. Because the iOS underlying implementation uses method swizzling, we recommend initializing the analytics client as early as possible.
9898

@@ -106,7 +106,7 @@ ___
106106
**● trackAttributionData**: * `undefined` &#124; `false` &#124; `true`
107107
*
108108

109-
*Defined in [analytics.ts:32](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L32)*
109+
*Defined in analytics.ts:32*
110110

111111
Whether the analytics client should automatically track attribution data from enabled providers using the mobile service.
112112

@@ -119,7 +119,7 @@ ___
119119

120120
**● using**: *[Integration](../#integration)[]*
121121

122-
*Defined in [analytics.ts:37](https://github.com/segmentio/analytics-react-native/blob/master/packages/core/src/analytics.ts#L37)*
122+
*Defined in analytics.ts:37*
123123

124124
Register a set of integrations to be used with this Analytics instance.
125125

packages/core/src/configuration.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ export const configure = async (
3333
}: Analytics.Configuration
3434
): Promise<Configuration> => {
3535
await Promise.all(
36-
using.map(
37-
async integration =>
38-
typeof integration === 'function' ? await integration() : null
36+
using.map(async integration =>
37+
typeof integration === 'function' ? await integration() : null
3938
)
4039
)
4140

packages/core/src/middleware.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,47 @@ export interface MiddlewarePayload<T extends string, D extends {}> {
1313

1414
export interface TrackPayload
1515
extends MiddlewarePayload<
16-
'track',
17-
{
18-
event: string
19-
properties: JsonMap
20-
}
21-
> {}
16+
'track',
17+
{
18+
event: string
19+
properties: JsonMap
20+
}
21+
> {}
2222

2323
export interface ScreenPayload
2424
extends MiddlewarePayload<
25-
'screen',
26-
{
27-
name: string
28-
properties: JsonMap
29-
}
30-
> {}
25+
'screen',
26+
{
27+
name: string
28+
properties: JsonMap
29+
}
30+
> {}
3131

3232
export interface IdentifyPayload
3333
extends MiddlewarePayload<
34-
'identify',
35-
{
36-
user: string
37-
traits: JsonMap
38-
}
39-
> {}
34+
'identify',
35+
{
36+
user: string
37+
traits: JsonMap
38+
}
39+
> {}
4040

4141
export interface GroupPayload
4242
extends MiddlewarePayload<
43-
'group',
44-
{
45-
groupId: string
46-
traits: JsonMap
47-
}
48-
> {}
43+
'group',
44+
{
45+
groupId: string
46+
traits: JsonMap
47+
}
48+
> {}
4949

5050
export interface AliasPayload
5151
extends MiddlewarePayload<
52-
'alias',
53-
{
54-
newId: string
55-
}
56-
> {}
52+
'alias',
53+
{
54+
newId: string
55+
}
56+
> {}
5757

5858
export interface Context extends JsonMap {
5959
library: {

0 commit comments

Comments
 (0)