Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 89afbca

Browse files
committed
Revert "Replace @ndhoule/pick with lodash.pick (#210)"
This reverts commit 6e33d3d.
1 parent aa3ee5b commit 89afbca

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<<<<<<< HEAD
2+
<<<<<<< HEAD
23

34
# 4.1.7 / 2021-03-17
45

@@ -25,6 +26,8 @@
2526

2627
- Replace `@ndhoule/pick` with `lodash.pick`
2728

29+
=======
30+
>>>>>>> parent of 6e33d3d... Replace @ndhoule/pick with lodash.pick (#210)
2831
# 4.1.2 / 2020-09-16
2932

3033
- Replaces `@ndhoule/extend` with `lodash.assignin`

lib/analytics.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
var url = require('component-url');
1111

1212
import cloneDeep from 'lodash.clonedeep';
13-
import pick from 'lodash.pick';
1413

1514
var _analytics = global.analytics;
1615

@@ -43,6 +42,7 @@ var nextTick = require('next-tick');
4342
var normalize = require('./normalize');
4443
var on = require('component-event').bind;
4544
var pageDefaults = require('./pageDefaults');
45+
var pick = require('@ndhoule/pick');
4646
var prevent = require('@segment/prevent-default');
4747
var defaults = require('@ndhoule/defaults');
4848
var store = require('./store');
@@ -599,20 +599,20 @@ Analytics.prototype.page = function(
599599

600600
// Ensure properties has baseline spec properties.
601601
// TODO: Eventually move these entirely to `options.context.page`
602-
const defs = pageDefaults();
602+
var defs = pageDefaults();
603603
defaults(properties, defs);
604604

605605
// Mirror user overrides to `options.context.page` (but exclude custom properties)
606606
// (Any page defaults get applied in `this.normalize` for consistency.)
607607
// Weird, yeah--moving special props to `context.page` will fix this in the long term.
608-
const overrides = pick(properties, Object.keys(defs));
608+
var overrides = pick(Object.keys(defs), properties);
609609
if (!is.empty(overrides)) {
610610
options = options || {};
611611
options.context = options.context || {};
612612
options.context.page = overrides;
613613
}
614614

615-
const msg = this.normalize({
615+
var msg = this.normalize({
616616
properties: properties,
617617
category: category,
618618
options: options,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@segment/analytics.js-core",
33
"author": "Segment <[email protected]>",
4-
"version": "4.1.3",
4+
"version": "4.1.2",
55
"description": "The hassle-free way to integrate analytics into any web application.",
66
"types": "lib/index.d.ts",
77
"keywords": [
@@ -32,6 +32,7 @@
3232
"dependencies": {
3333
"@ndhoule/defaults": "^2.0.1",
3434
"@ndhoule/includes": "^2.0.1",
35+
"@ndhoule/pick": "^2.0.0",
3536
"@segment/canonical": "^1.0.0",
3637
"@segment/cookie": "^1.1.5",
3738
"@segment/is-meta": "^1.0.0",
@@ -53,7 +54,6 @@
5354
"is": "^3.1.0",
5455
"lodash.assignin": "^4.2.0",
5556
"lodash.clonedeep": "^4.5.0",
56-
"lodash.pick": "^4.4.0",
5757
"new-date": "^1.0.0",
5858
"next-tick": "^0.2.2",
5959
"package-json-versionify": "^1.0.4",

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@
324324
dependencies:
325325
"@ndhoule/each" "^2.0.1"
326326

327+
"@ndhoule/pick@^2.0.0":
328+
version "2.0.0"
329+
resolved "https://registry.yarnpkg.com/@ndhoule/pick/-/pick-2.0.0.tgz#e1eb1a6ca3243eef56daa095c3a1612c74a52156"
330+
327331
"@ndhoule/rest@^2.0.0":
328332
version "2.0.0"
329333
resolved "https://registry.yarnpkg.com/@ndhoule/rest/-/rest-2.0.0.tgz#0346b02a964a513ed2ba24d164f01d34f2107a0f"
@@ -6537,6 +6541,7 @@ lodash.mergewith@^4.6.2:
65376541
resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55"
65386542
integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==
65396543

6544+
<<<<<<< HEAD
65406545
lodash.omit@^4.5.0:
65416546
version "4.5.0"
65426547
resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60"
@@ -6552,6 +6557,8 @@ lodash.pick@^4.4.0:
65526557
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
65536558
integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=
65546559

6560+
=======
6561+
>>>>>>> parent of 6e33d3d... Replace @ndhoule/pick with lodash.pick (#210)
65556562
lodash.reduce@^4.6.0:
65566563
version "4.6.0"
65576564
resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"

0 commit comments

Comments
 (0)