profile
viewpoint
Jeremy Gayed tizmagik @NYTimes http://www.jeremygayed.com Lead Software Engineer @nytimes

styleguidist/react-styleguidist 9253

Isolated React component development environment with a living style guide

nytimes/react-tracking 969

🎯 Declarative tracking for React apps.

nytimes/redux-taxi 67

🚕 Component-driven asynchronous SSR in isomorphic Redux apps

nytimes/license 3

NYT Apache 2.0 license

tizmagik/alexa-bible-skill 3

Alexa skill for Bible verse lookups

loganmoseley/TokenGenerator 1

A small program to turn design tokens into code.

tizmagik/check-filename-webpack-plugin 1

Check Filename - Webpack Plugin

tizmagik/CSSS 1

CSS-based SlideShow System

tizmagik/customizable-comments 1

A GitHub App built with Probot that auto-replies with customizable comments based on template vars

PullRequestReviewEvent

pull request commentnytimes/react-tracking

remove core-js

Use Webpack 5 or Rollup to build an ESM output, which will make this library treeshakeable, saving some more KBs for consumers. I suggest trying TSDX for this.

Great idea. Happy to accept PRs for these as well (or at least an issue).

adi518

comment created time in 2 days

pull request commentnytimes/react-tracking

remove core-js

Thanks, this is great! Do you mind also adding a note in the docs about the needed polyfills for older browser support moving forward after this change?

And yes, to answer your question, I think to be safe we will consider this a major breaking change.

adi518

comment created time in 2 days

Pull request review commentnytimes/react-tracking

remove core-js

   "sideEffects": false,   "main": "build/index.js",   "scripts": {-    "build": "babel --out-dir build src --ignore src/__tests__",+    "build": "babel --out-dir build src --ignore src/__tests__ --source-maps --delete-dir-on-start --minified --no-comments",

Do we also need a NODE_ENV=production ?

adi518

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventnytimes/react-tracking

Jeremy Gayed

commit sha 38a8962a0da0749719ccb0e482e46df3bf9b49f0

Failing hooks test to code against (#165) * Failing hooks test to code against * 2 additional tests for interopability * fix test to match up with e2e variation

view details

push time in 4 days

delete branch nytimes/react-tracking

delete branch : hooks-tests

delete time in 4 days

PR merged nytimes/react-tracking

Failing hooks test to code against

An initial PR to introduce some failing tests (skipped) to code against for https://github.com/nytimes/react-tracking/issues/138

+925 -0

0 comment

1 changed file

tizmagik

pr closed time in 4 days

MemberEvent

push eventnytimes/react-tracking

tizmagik

commit sha fe21cc546540edf7c0780c07b0944ef9659f7a97

fix test to match up with e2e variation

view details

push time in 4 days

Pull request review commentnytimes/react-tracking

Failing hooks test to code against

+/* eslint-disable jsx-a11y/no-static-element-interactions */+/* eslint-disable jsx-a11y/click-events-have-key-events */+/* eslint-disable react/destructuring-assignment,react/no-multi-comp,react/prop-types,react/prefer-stateless-function  */+/* eslint-disable jsx-a11y/control-has-associated-label */+import React, { useContext, useEffect, useState } from 'react';+import { mount } from 'enzyme';++const dispatchTrackingEvent = jest.fn();+jest.setMock('../dispatchTrackingEvent', dispatchTrackingEvent);++const testDataContext = { testDataContext: true };+const testData = { testData: true };+const dispatch = jest.fn();+const testState = { booleanState: true };++describe.skip('hooks', () => {+  // eslint-disable-next-line global-require+  const { default: track, useTracking } = require('../');++  beforeEach(() => {+    jest.clearAllMocks();+  });++  it('defaults mostly everything', () => {+    const TestDefaults = ({ children }) => {+      const { Track } = useTracking({}, { process: () => null });++      return <Track>{children}</Track>;+    };++    const Child = () => {+      const { trackEvent } = useTracking();++      useEffect(() => {+        trackEvent({ test: true });+      }, [trackEvent]);++      return 'hi';+    };++    mount(+      <TestDefaults>+        <Child />+      </TestDefaults>+    );++    expect(dispatchTrackingEvent).toHaveBeenCalledTimes(1);+    expect(dispatchTrackingEvent).toHaveBeenCalledWith({ test: true });+  });++  it('defaults to dispatchTrackingEvent when no dispatch function passed in to options', () => {+    const testPageData = { page: 'TestPage' };++    const TestPage = () => {+      const { Track } = useTracking({}, { dispatchOnMount: true });++      return <Track>{null}</Track>; // TODO: what does it mean for the API if this was <Track dispatchOnMount /> instead of useTracking({ dispatchOnMount: true }) above?+    };++    mount(<TestPage />);++    expect(dispatchTrackingEvent).toHaveBeenCalledWith({+      ...testPageData,+    });+  });++  it('accepts a dispatch function in options', () => {+    const TestOptions = () => {+      const { trackEvent } = useTracking(testDataContext, { dispatch }); // TODO: should we accept top-level config options here?++      const blah = () => {+        trackEvent(testData);+      };++      blah();+      return <div />;+    };++    mount(<TestOptions />);++    expect(dispatchTrackingEvent).not.toHaveBeenCalled();+    expect(dispatch).toHaveBeenCalledWith({+      ...testDataContext,+      ...testData,+    });+  });++  it('will use dispatch fn passed in from further up in context', () => {+    const testChildData = { page: 'TestChild' };++    const TestOptions = ({ children }) => {+      const { Track } = useTracking();++      return (+        <Track data={testDataContext} dispatch={dispatch}>+          {children}+        </Track>+      );+    };++    const TestChild = () => {+      useTracking(testChildData, { dispatchOnMount: true }); // TODO: Should these properties instead be on the <Track /> component and we require the user to "render" it?+      return <div />;+    };++    mount(+      <TestOptions>+        <TestChild />+      </TestOptions>+    );++    expect(dispatch).toHaveBeenCalledWith({+      ...testDataContext,+      ...testChildData,+    });+  });++  it('will deep-merge tracking data', () => {+    const mockDispatchTrackingEvent = jest.fn();+    const testData1 = { key: { x: 1, y: 1 } };+    const testData2 = { key: { x: 2, z: 2 }, page: 'TestDeepMerge' };++    const TestData1 = ({ children }) => {+      const { Track } = useTracking(testData1, {+        dispatch: mockDispatchTrackingEvent,+      });+      return <Track>{children}</Track>;+    };++    const TestData3 = () => {+      const { Track } = useTracking(+        { key: { x: 3, y: 3 } },+        { dispatchOnMount: true }+      );++      return (+        <Track>+          <div />+        </Track>+      );+    };++    const TestData2 = () => {+      const { Track } = useTracking(testData2);++      return (+        <Track>+          <TestData3 />+        </Track>+      );+    };++    mount(+      <TestData1>+        <TestData2 />+      </TestData1>+    );++    expect(mockDispatchTrackingEvent).toHaveBeenCalledWith({+      page: 'TestDeepMerge',+      key: { x: 3, y: 3, z: 2 },+    });+  });++  it('will call dispatchOnMount as a function', () => {+    const testDispatchOnMount = { test: true };+    const dispatchOnMount = jest.fn(() => ({ dom: true }));++    const TestComponent = () => {+      useTracking(testDispatchOnMount, { dispatch, dispatchOnMount }); // TODO: potential recipe here is if a component does not render children, it doesn't need to include <Track /> in the tree!+      return null;+    };++    mount(<TestComponent />);++    expect(dispatchOnMount).toHaveBeenCalledWith(testDispatchOnMount);+    expect(dispatch).toHaveBeenCalledWith({ dom: true, test: true });+  });++  it('will dispatch a pageview event on mount on class component', () => {+    const App = ({ children }) => {+      const { Track } = useTracking(+        { topLevel: true },+        {+          dispatch,+          process: data => {+            if (data.page) {+              return { event: 'pageView' };+            }+            return null;+          },+        }+      );++      return <Track>{children}</Track>;+    };++    const Page = () => {+      useTracking({ page: 'Page' }); // TODO: Does this pass? It doesn't render children so we should still get all the proper tracking context dispatched on mount according to "process" fn above+      return <div>Page</div>;+    };++    mount(+      <App>+        <Page />+      </App>+    );++    expect(dispatch).toHaveBeenCalledWith({+      topLevel: true,+      event: 'pageView',+      page: 'Page',+    });+  });++  it('will dispatch a pageview event on mount on functional component', () => {+    // TODO: Using purely hooks API, this test is redundant with above, but we will keep it for parity+    const App = ({ children }) => {+      const { Track } = useTracking(+        { topLevel: true },+        {+          dispatch,+          process: data => {+            if (data.page) {+              return { event: 'pageView' };+            }+            return null;+          },+        }+      );++      return <Track>{children}</Track>;+    };++    const Page = () => {+      useTracking({ page: 'Page' });+      return <div>Page</div>;+    };++    mount(+      <App>+        <Page />+      </App>+    );++    expect(dispatch).toHaveBeenCalledWith({+      topLevel: true,+      event: 'pageView',+      page: 'Page',+    });+  });++  it("should not dispatch a pageview event on mount if there's no page property on tracking object", () => {+    const App = ({ children }) => {+      const { Track } = useTracking(+        { topLevel: true },+        {+          dispatch,+          process: data => {+            if (data.page) {+              return { event: 'pageView' };+            }+            return null;+          },+        }+      );++      return <Track>{children}</Track>;+    };++    const Page = () => {+      useTracking({ page: 'Page' });

Ah good catch, I think this was a bad copy pasta, the process function should no-op to match up with the corresponding e2e test.

tizmagik

comment created time in 4 days

PullRequestReviewEvent

push eventnytimes/react-tracking

tizmagik

commit sha 8c4fcd5083f1badb1b6a68ff409b30a282681d48

2 additional tests for interopability

view details

push time in 4 days

push eventtizmagik/react-head

Jeremy Gayed

commit sha 33aa2a53055d4f05b99ec738659f89c0cb8d80f5

Update README.md (#112) Fix example in docs

view details

push time in 4 days

PR merged tizmagik/react-head

Update README.md

Fix example in docs

+1 -1

0 comment

1 changed file

tizmagik

pr closed time in 4 days

PR opened tizmagik/react-head

Update README.md

Fix example in docs

+1 -1

0 comment

1 changed file

pr created time in 4 days

create barnchtizmagik/react-head

branch : tizmagik-patch-1

created branch time in 4 days

issue closedtizmagik/react-head

Expose HeadTag?

I was hoping to create a base tag, and found it is missing. It should be added, but more generally the generic HeadTag should be exposed in the exports.

closed time in 4 days

maparent

issue commenttizmagik/react-head

Expose HeadTag?

Closed in #105

maparent

comment created time in 4 days

issue commentnytimes/react-tracking

override default `useTracking` behaviour

Hello @huguesbr -- good question. The reason we throw an error when there's no context in the tree is to warn in the case the user forgot to establish react-tracking context before attempting to dispatch tracking events or to track components within the tree, it helps catch easy to miss cases where components that are expected to be track are included just outside the tracked root.

Can you help me understand your use case a bit better? Why not wrap your admin example with a track() higher-order component first, even if you don't need to include any tracking context?

And yeap the reason we don't export the tracking context is to avoid exposing the internal API. In the future, the work in #138 may actually obviate the need for this since using the useTracking() hook without an existing tracking root will transparently provide that tracking root for you.

huguesbr

comment created time in 4 days

PR opened tizmagik/customizable-comments

updates
+3049 -3420

0 comment

4 changed files

pr created time in 7 days

create barnchtizmagik/customizable-comments

branch : updates

created branch time in 7 days

issue commentnytimes/react-tracking

Expand React Hooks API support

Does this just mean that Track would need to wrap the rest of the markup tree returned by a given component?

Yes, in fact, I think this is the only way to enable adding contextual tracking to the tree via a Hooks-only API.

I started some work on this in PR #165 which basically takes all of our e2e tests and re-writes them to only use the useTracking() API. The tests are failing now, but it's a TDD approach we can code against.

After rewriting a few of the tests I actually ended up settling on what you originally suggested here @bgergen but instead of calling it <TrackingProvider /> I called it <Track />, which felt a little cleaner to me. I went back and forth on whether or not the <Track /> component should take in props (e.g. <Track data={trackingData} dispatchOnMount />) but settled on keeping all tracking object inputs and configuration options to be passed in to the hook: useTracking(data, config).

Curious to get everyone's feedback on how that API feels? If it looks good, and anyone's interested, feel free to code against those tests for a working implementation.

tizmagik

comment created time in 10 days

PR opened nytimes/react-tracking

Failing hooks test to code against
+914 -0

0 comment

1 changed file

pr created time in 10 days

create barnchnytimes/react-tracking

branch : hooks-tests

created branch time in 11 days

delete branch tizmagik/react-head

delete branch : major-deps-refresh

delete time in 11 days

push eventtizmagik/react-head

Jeremy Gayed

commit sha f30d62cbd4f96ccbe69d89bb08b1fb82b52126a7

Major deps refresh (#111) * major deps * example deps update

view details

push time in 11 days

PR merged tizmagik/react-head

Major deps refresh
+4317 -2077

0 comment

5 changed files

tizmagik

pr closed time in 11 days

PR opened tizmagik/react-head

Major deps refresh
+4317 -2077

0 comment

5 changed files

pr created time in 11 days

create barnchtizmagik/react-head

branch : major-deps-refresh

created branch time in 11 days

issue commentnytimes/react-tracking

Building/bundling react-tracking

Happy to accept a PR

tizmagik

comment created time in 11 days

push eventtizmagik/30-seconds-of-code

tizmagik

commit sha e5ccb17a24c022c24c56b27b6923c11f4545790a

add getLastInMap

view details

push time in 14 days

create barnchtizmagik/30-seconds-of-code

branch : getLastInMap

created branch time in 14 days

fork tizmagik/30-seconds-of-code

Short JavaScript code snippets for all your development needs

https://www.30secondsofcode.org/js/p/1

fork in 14 days

delete branch tizmagik/react-head

delete branch : dep-minor-refresh

delete time in 14 days

push eventtizmagik/react-head

Jeremy Gayed

commit sha 1e302329e51a1a47c05e2978ebdd4ceffb0ff9c2

minor deps refresh (#110) * minor deps refresh * drop node 8

view details

push time in 14 days

PR merged tizmagik/react-head

minor deps refresh
+3467 -1891

0 comment

4 changed files

tizmagik

pr closed time in 14 days

push eventtizmagik/react-head

tizmagik

commit sha c00398be41b0dcad48b908872a05c7f8a4aaf6ad

drop node 8

view details

push time in 14 days

PR opened tizmagik/react-head

minor deps refresh
+3467 -1890

0 comment

3 changed files

pr created time in 14 days

create barnchtizmagik/react-head

branch : dep-minor-refresh

created branch time in 14 days

pull request commenttizmagik/react-head

Expose component for <base> tag

Released in v3.4.0

gjacobrobertson

comment created time in 14 days

release tizmagik/react-head

v3.4.0

released time in 14 days

created tagtizmagik/react-head

tagv3.4.0

⛑ SSR-ready Document Head tag management for React 16+

created time in 14 days

push eventtizmagik/react-head

tizmagik

commit sha 60bdf2e110189649919dd684fbe7d446386e4305

3.4.0

view details

push time in 14 days

push eventtizmagik/react-head

Jacob Robertson

commit sha 410ded0f6fd93b8134a22bc043bdccc3926b427d

Expose component for <base> tag (#105) Not sure what's up with travis, but I tested this locally and it LGTM. Thank you!

view details

push time in 14 days

PR merged tizmagik/react-head

Expose component for <base> tag

I'm in a similar situation as @maparent in https://github.com/tizmagik/react-head/issues/102. Managing a <base> tag would be useful when when situating an app within a dynamic path. I also considered exposing the HeadTag component directly, but according to MDN, the only head tags not currently supported are <base>, <script>, <noscript>, and <template>, and if you're trying to use react to manage <script>, <noscript> , or <template> tags, you've probably got bigger issues.

So here's a PR that exposes <base> tags as a <Base> component, complete with documentation, example, and typings.

+45 -20

1 comment

13 changed files

gjacobrobertson

pr closed time in 14 days

PullRequestReviewEvent

issue commenttizmagik/react-head

Question: Does it work without ssr for SEO, on fb and twitter ?

react-head is a react library, so unless you're rendering react on the server side, there isn't a way to affect meta-tags server side. If possible, I would recommend rendering first server-side and output the HTML to a string that your PHP can pick up and then serve. In that scenario, it should work.

rish-hub

comment created time in 15 days

PR closed nytimes/react-tracking

Bump yargs-parser from 13.1.1 to 13.1.2 dependencies

Bumps yargs-parser from 13.1.1 to 13.1.2. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/yargs/yargs-parser/blob/master/docs/CHANGELOG-full.md">yargs-parser's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/yargs/yargs-parser/compare/v14.0.0...v15.0.0">15.0.0</a> (2019-10-07)</h2> <h3>Features</h3> <ul> <li>rework <code>collect-unknown-options</code> into <code>unknown-options-as-args</code>, providing more comprehensive functionality (<a href="https://github.com/yargs/yargs-parser/commit/ef771ca">ef771ca</a>)</li> </ul> <h3>BREAKING CHANGES</h3> <ul> <li>rework <code>collect-unknown-options</code> into <code>unknown-options-as-args</code>, providing more comprehensive functionality</li> </ul> <h2><a href="https://github.com/yargs/yargs-parser/compare/v13.1.1...v14.0.0">14.0.0</a> (2019-09-06)</h2> <h3>Bug Fixes</h3> <ul> <li>boolean arrays with default values (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/185">#185</a>) (<a href="https://github.com/yargs/yargs-parser/commit/7d42572">7d42572</a>)</li> <li>boolean now behaves the same as other array types (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/184">#184</a>) (<a href="https://github.com/yargs/yargs-parser/commit/17ca3bd">17ca3bd</a>)</li> <li>eatNargs() for 'opt.narg === 0' and boolean typed options (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/188">#188</a>) (<a href="https://github.com/yargs/yargs-parser/commit/c5a1db0">c5a1db0</a>)</li> <li>maybeCoerceNumber now takes precedence over coerce return value (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/182">#182</a>) (<a href="https://github.com/yargs/yargs-parser/commit/2f26436">2f26436</a>)</li> <li>take into account aliases when appending arrays from config object (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/199">#199</a>) (<a href="https://github.com/yargs/yargs-parser/commit/f8a2d3f">f8a2d3f</a>)</li> </ul> <h3>Features</h3> <ul> <li>add configuration option to "collect-unknown-options" (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/181">#181</a>) (<a href="https://github.com/yargs/yargs-parser/commit/7909cc4">7909cc4</a>)</li> <li>maybeCoerceNumber() now takes into account arrays (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/187">#187</a>) (<a href="https://github.com/yargs/yargs-parser/commit/31c204b">31c204b</a>)</li> </ul> <h3>BREAKING CHANGES</h3> <ul> <li>unless "parse-numbers" is set to "false", arrays of numeric strings are now parsed as numbers, rather than strings.</li> <li>we have dropped the broken "defaulted" functionality; we would like to revisit adding this in the future.</li> <li>maybeCoerceNumber now takes precedence over coerce return value (<a href="https://github-redirect.dependabot.com/yargs/yargs-parser/issues/182">#182</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/yargs/yargs-parser/commits">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~oss-bot">oss-bot</a>, a new releaser for yargs-parser since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in 15 days

PR closed nytimes/react-tracking

Bump handlebars from 4.4.3 to 4.7.6 dependencies

Bumps handlebars from 4.4.3 to 4.7.6. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md">handlebars's changelog</a>.</em></p> <blockquote> <h2>v4.7.6 - April 3rd, 2020</h2> <p>Chore/Housekeeping:</p> <ul> <li><a href="https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1672">#1672</a> - Switch cmd parser to latest minimist (<a href="https://api.github.com/users/dougwilson">@dougwilson</a></li> </ul> <p>Compatibility notes:</p> <ul> <li>Restored Node.js compatibility</li> </ul> <p><a href="https://github.com/wycats/handlebars.js/compare/v4.7.5...v4.7.6">Commits</a></p> <h2>v4.7.5 - April 2nd, 2020</h2> <p>Chore/Housekeeping:</p> <ul> <li><del>Node.js version support has been changed to v6+</del> Reverted in 4.7.6</li> </ul> <p>Compatibility notes:</p> <ul> <li><del>Node.js < v6 is no longer supported</del> Reverted in 4.7.6</li> </ul> <p><a href="https://github.com/wycats/handlebars.js/compare/v4.7.4...v4.7.5">Commits</a></p> <h2>v4.7.4 - April 1st, 2020</h2> <p>Chore/Housekeeping:</p> <ul> <li><a href="https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1666">#1666</a> - Replaced minimist with yargs for handlebars CLI (<a href="https://api.github.com/users/aorinevo">@aorinevo</a>, <a href="https://api.github.com/users/AviVahl">@AviVahl</a> & <a href="https://api.github.com/users/fabb">@fabb</a>)</li> </ul> <p>Compatibility notes:</p> <ul> <li>No incompatibilities are to be expected</li> </ul> <p><a href="https://github.com/wycats/handlebars.js/compare/v4.7.3...v4.7.4">Commits</a></p> <h2>v4.7.3 - February 5th, 2020</h2> <p>Chore/Housekeeping:</p> <ul> <li><a href="https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1644">#1644</a> - Download links to aws broken on handlebarsjs.com - access denied (<a href="https://api.github.com/users/Tea56">@Tea56</a>)</li> <li>Fix spelling and punctuation in changelog - d78cc73</li> </ul> <p>Bugfixes:</p> <ul> <li>Add Type Definition for Handlebars.VERSION, Fixes <a href="https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1647">#1647</a> - 4de51fe</li> <li>Include Type Definition for runtime.js in Package - a32d05f</li> </ul> <p>Compatibility notes:</p> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/e6ad93ea01bcde1f8ddaa4b4ebe572dd616abfaa"><code>e6ad93e</code></a> v4.7.6</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/2bf4fc6fd3ae3d8f076d628653f284d85faebeb4"><code>2bf4fc6</code></a> Update release notes</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/b64202bc9197307bd785a58693e3820eb9bb41a8"><code>b64202b</code></a> Update release-notes.md</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/c2f1e6203178918569f085e12afdb762cae17fb0"><code>c2f1e62</code></a> Switch cmd parser to latest minimist</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/08e9a11a34c3ad8387a0b85b1334f97cab85191a"><code>08e9a11</code></a> Revert "chore: set Node.js compatibility to v6+"</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/1fd2edee2a12fb228061fcde807905c6b14339c4"><code>1fd2ede</code></a> v4.7.5</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/3c9c2f5cf29cf10f54d5fe4daca6b24b65f0adcf"><code>3c9c2f5</code></a> Update release notes</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/16487a088e13f4d52c6fd6610b9ec71c4a51be8a"><code>16487a0</code></a> chore: downgrade yargs to v14</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/309d2b49a11628d2a8f052c5587e7459968cd705"><code>309d2b4</code></a> chore: set Node.js compatibility to v6+</li> <li><a href="https://github.com/handlebars-lang/handlebars.js/commit/645ac73844918668f9a2f41e49b7cb18ce5abf36"><code>645ac73</code></a> test: fix integration tests</li> <li>Additional commits viewable in <a href="https://github.com/wycats/handlebars.js/compare/v4.4.3...v4.7.6">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~erisds">erisds</a>, a new releaser for handlebars since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+12 -23

0 comment

1 changed file

dependabot[bot]

pr closed time in 15 days

PR closed nytimes/react-tracking

Bump lodash from 4.17.15 to 4.17.19 dependencies

Bumps lodash from 4.17.15 to 4.17.19. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lodash/lodash/releases">lodash's releases</a>.</em></p> <blockquote> <h2>4.17.16</h2> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lodash/lodash/commit/d7fbc52ee0466a6d248f047b5d5c3e6d1e099056"><code>d7fbc52</code></a> Bump to v4.17.19</li> <li><a href="https://github.com/lodash/lodash/commit/2e1c0f22f425e9c013815b2cd7c2ebd51f49a8d6"><code>2e1c0f2</code></a> Add npm-package</li> <li><a href="https://github.com/lodash/lodash/commit/1b6c282299f4e0271f932b466c67f0f822aa308e"><code>1b6c282</code></a> Bump to v4.17.18</li> <li><a href="https://github.com/lodash/lodash/commit/a370ac81408de2da77a82b3c4b61a01a3b9c2fac"><code>a370ac8</code></a> Bump to v4.17.17</li> <li><a href="https://github.com/lodash/lodash/commit/1144918f3578a84fcc4986da9b806e63a6175cbb"><code>1144918</code></a> Rebuild lodash and docs</li> <li><a href="https://github.com/lodash/lodash/commit/3a3b0fd339c2109563f7e8167dc95265ed82ef3e"><code>3a3b0fd</code></a> Bump to v4.17.16</li> <li><a href="https://github.com/lodash/lodash/commit/c84fe82760fb2d3e03a63379b297a1cc1a2fce12"><code>c84fe82</code></a> fix(zipObjectDeep): prototype pollution (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4759">#4759</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/e7b28ea6cb17b4ca021e7c9d66218c8c89782f32"><code>e7b28ea</code></a> Sanitize sourceURL so it cannot affect evaled code (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4518">#4518</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/0cec225778d4ac26c2bac95031ecc92a94f08bbb"><code>0cec225</code></a> Fix lodash.isEqual for circular references (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4320">#4320</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4515">#4515</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/94c3a8133cb4fcdb50db72b4fd14dd884b195cd5"><code>94c3a81</code></a> Document matches* shorthands for over* methods (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4510">#4510</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4514">#4514</a>)</li> <li>Additional commits viewable in <a href="https://github.com/lodash/lodash/compare/4.17.15...4.17.19">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~mathias">mathias</a>, a new releaser for lodash since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -87

0 comment

1 changed file

dependabot[bot]

pr closed time in 15 days

issue commentnytimes/react-tracking

Overriding an (event) context array

We use deepmerge to merge contextual objects. By default, it looks like deepmerge will concatenate arrays instead of overriding them.

Unfortunately, right now we do not provide a way of overriding the merging functionality, nor do we provide a way to specify any deepmerge options.

A potential workaround would be to use an object instead of an array and then convert the object to an array within your dispatch function.

Another approach might be to propose a PR that accepts a merge function as a react-tracking option that is used instead of the deepmerge one provided by default (similar to how overriding the default dispatch function works today).

huguesbr

comment created time in 15 days

pull request commentnytimes/react-tracking

[POC] Add TypeScript support and convert a couple of files

Hey @eldarshamukhamedov -- wanted to bump this, are you still interested in landing this PR? If so, any thoughts on the questions above?

Thanks again for your contribution!

eldarshamukhamedov

comment created time in 17 days

issue commentnytimes/react-tracking

Can't play nicely with Redux?

We have couple of place were it make sense for us to track event at the (Redux) reducer level, I'm guess this won't play well with React context, any suggestions?

Hmm I'm not sure what you mean, why wouldn't it play well with React context? Under the hood, react-tracking does use React context to keep track of tracking objects.

If you can, yes, a new ticket/issue would be helpful to dig more into your specific question about using react-tracking from within a Redux reducer. Thanks!

markgibaud

comment created time in 17 days

issue commentimolorhe/altair

Sharing a "Deep-link"

Bump

tizmagik

comment created time in 20 days

issue commentnytimes/react-tracking

Expand React Hooks API support

I think I'm warming up to the idea of returning a component from the useTracking() hook. The API could mimic what's currently supported by the HoC, but transparently return a Provider as long as it's the first tracked node in the tree (e.g. there is no tracking context available).

It feels like something around these lines should be possible:

test('will deep-merge tracking data', () => {
  const testData1 = { key: { x: 1, y: 1 } };
  const testData2 = { key: { x: 2, z: 2 }, page: 'TestDeepMerge' };

  const TestData1 = ({ children }) => {
    const { Track } = useTracking();
    return <Track data={testData1}>{children}</Track>;
  };

  const TestData3 = () => {
    const { Track } = useTracking();

    return (
      <Track data={{ key: { x: 3, y: 3 } }} dispatchOnMount>
        <div />
      </Track>
    );
  };

  const TestData2 = () => {
    const { Track } = useTracking();

    return (
      <Track data={testData2}>
        <TestData3 />
      </Track>
    );
  };

  mount(
    <TestData1>
      <TestData2 />
    </TestData1>
  );

  expect(dispatchTrackingEvent).toHaveBeenCalledWith({
    page: 'TestDeepMerge',
    key: { x: 3, y: 3, z: 2 },
  });
});
tizmagik

comment created time in 21 days

startedapollographql/real-time-federation

started time in 25 days

PR closed nytimes/react-tracking

Call dispatch with latestProps also

A small change that'd be very nice. For example, I have a component that takes an API object that communicates with my backend and I want to use this prop to dispatch the tracking data

+179 -103

5 comments

5 changed files

adamschoenemann

pr closed time in a month

pull request commentnytimes/react-tracking

Call dispatch with latestProps also

Thanks @adamschoenemann it's an interesting case and maybe something we could consider in the future if this sort of request comes up again. Given that you ended up not using this library (curious, what did you end up using?) I think I'll close this PR for now. Thanks again for the contribution and the discussion though, it's appreciated!

adamschoenemann

comment created time in a month

delete branch nytimes/react-tracking

delete branch : forwardref

delete time in a month

PR closed nytimes/react-tracking

WIP: ForwardRef

Still TODO:

  • [ ] Fix tests. I'm pretty sure the code is correct, but how to test this via Enzyme is awkward right now. I may rely more and more on e2e.test.js
  • [ ] Consider optional { forwardRef: true } flag, or always do it?
  • [ ] Cleanup / documentation updates
+64 -27

2 comments

3 changed files

tizmagik

pr closed time in a month

pull request commentnytimes/react-tracking

WIP: ForwardRef

Closed via https://github.com/nytimes/react-tracking/pull/153

tizmagik

comment created time in a month

push eventeldarshamukhamedov/react-tracking

tizmagik

commit sha 919108b8874b5121b4b20927fa666737e2484ac5

8.0.0

view details

Jeremy Gayed

commit sha 3725e0dfbce2f28e63f2bab73d93acbf1ca39d3c

Merge branch 'master' into add-typescript-support

view details

push time in a month

pull request commentnytimes/react-tracking

Call dispatch with latestProps also

Ah, I see now! I think I get the use case now, although I'm hesitant to increase the API surface area for a couple reasons.

  1. It's not clear which props should get passed to the dispatch function; the tracking data gets merged all the way up to the top-level tracked component, would users expect that same behavior for props? That could get ugly fast. Do we just send the props at the level of the component that triggered the dispatch? But what if that component is a "dumb" component like a button or otherwise and the real props are higher up? I don't think we'd want to require users to propagate props just so that it's exposed to the dispatch trigger as that goes against the goal of this project (to keep tracking concerns as out of the way as possible).
  2. Even still, this behavior can be achieved in user-land with the existing API. You can attach the props to the trackEvent function and then pluck them off in the dispatch function like so:
/* tracking component */
@track(props => ({ module: 'foo', props }))
class Foo extends Component { ... }

/* dispatch function */
const dispatch = (data) => {
  const { ...trackingData, props } = data;

  // can do whatever with `props`

 // push the rest to the dataLayer
 (window.dataLayer = window.dataLayer || []).push(trackingData);
}

What are your thoughts?

adamschoenemann

comment created time in a month

pull request commentnytimes/react-tracking

Call dispatch with latestProps also

Hey @adamschoenemann thanks for submitting a PR! I think I'm not fully grokking the use case exactly. Don't we already have access to the props like in the advanced usage example?

adamschoenemann

comment created time in a month

pull request commenttizmagik/react-head

Expose component for <base> tag

Thanks @gjacobrobertson this looks great! I'm not sure why travis didn't run, I'll look into that as soon as I get a chance. Sorry for the lag time and thank you for your patience and contribution!

gjacobrobertson

comment created time in a month

startedvmware-tanzu/octant

started time in a month

startedmicrosoft/react-native-windows

started time in a month

startedapollographql/apollo-server

started time in 2 months

issue commentnytimes/react-tracking

Provide testing/mocking instructions and export react-tracking/mock

Thank you @wokkaflokka , that's very helpful. And thank you for the kind words! 🤗

tizmagik

comment created time in 2 months

issue closednytimes/react-tracking

forward ref is not working when using track as hoc

while using track as hoc and setting in options forwardRef: true the ref is not being forwarded. The issue is reproduced and a relevant git repo can be found here - https://github.com/shovalk/react-tracking-forwardref-reproduce

closed time in 2 months

shovalk

issue commentnytimes/react-tracking

forward ref is not working when using track as hoc

This was released as v8.0.0 -- I verified it working with the reproduction repo @shovalk ! Give that a shot and let me know if you have any other issues. Thanks again @cpprookie !

shovalk

comment created time in 2 months

release nytimes/react-tracking

v8.0.0

released time in 2 months

created tagnytimes/react-tracking

tagv8.0.0

🎯 Declarative tracking for React apps.

created time in 2 months

push eventnytimes/react-tracking

tizmagik

commit sha 919108b8874b5121b4b20927fa666737e2484ac5

8.0.0

view details

push time in 2 months

issue commentnytimes/react-tracking

forward ref is not working when using track as hoc

Ah of course haha sorry! I thought I remembered releasing this, but I guess not. I'll cut a release and hopefully that should address this issue. Thanks @cpprookie !

shovalk

comment created time in 2 months

issue commentnytimes/react-tracking

forward ref is not working when using track as hoc

Ah thanks for the bug report and reproduction case, @shovalk !

cc @ParadeTo who did the initial implementation. Any ideas?

I'll try and take a closer look at this as soon as I get a chance as well.

Thanks again.

shovalk

comment created time in 2 months

issue commentnytimes/react-tracking

Provide testing/mocking instructions and export react-tracking/mock

Hey @l225li are you still having this issue? Could you share more of your code or maybe create a Codesandbox example so I can take a closer look?

tizmagik

comment created time in 2 months

issue commentimolorhe/altair

Sharing a "Deep-link"

Bumping. Still on my radar.

tizmagik

comment created time in 3 months

more