Giter Club home page Giter Club logo

react-i13n's Introduction

react-i13n

npm version Build Status Coverage Status

react-i13n provides a performant, scalable and pluggable approach to instrumenting your React application.

Typically, you have to manually add instrumentation code throughout your application, e.g., hooking up onClick handlers to the links you want to track. react-i13n provides a simplified approach by letting you define the data model you want to track and handling the beaconing for you.

react-i13n does this by building an instrumentation tree that mirrors your applications React component hierarchy. All you have to do is leverage our React component to denote which components should fire the tracking events.

Features

  • i13n tree - Automated instrumentation tree creation that mirrors your applications React component hierarchy.
  • React integration - Provides a createI13nNode component that easily integrate with your application.
  • Pluggable - A pluggable interface lets you integrate any data analytics library (i.e. Google Analytics, Segment, etc). Take a look at the available plugins.
  • Performant - Tracking data (i13nModel) can be a plain JS object or custom function. This means you can dynamically change tracking data without causing unnecessary re-renders.
  • Adaptable - If you are using an isomorphic framework (e.g. Fluxible) to build your app, you can easily change the tracking implementation on the server and client side. For example, to track page views, you can fire an http request on server and xhr request on the client.
  • Optimizable - We provide an option to enable viewport (integrating subscribe-ui-event) checking for each I13nNode. Which means that data will only be beaconed when the node is in the viewport. This reduces the network usage for the user and provides better tracking details.
  • Auto Scan Links - Support auto scan links for the cases you are not able to replace the component you are using to get it tracked, e.g., if you have dependencies or you are using dangerouslySetInnerHTML. We scan the tags you define on client side, track them and build nodes for them in i13n tree.

Install

npm install react-i13n --save

Runtime Compatibility

react-i13n is written with ES2015 in mind and should be used along with polyfills for features like Promise and Object.assign in order to support all browsers and older versions of Node.js. We recommend using Babel.

Usage

import React, { Component } from 'react';
import {
  ReactI13n,
  createI13nNode,
  setupI13n
} from 'react-i13n';
import somePlugin from 'some-i13n-plugin'; // a plugin for a certain instrumentation mechanism

// create a i13n anchor for link tracking
const I13nAnchor = createI13nNode('a', {
  isLeafNode: true,
  bindClickEvent: true,
  follow: true
});

class DemoApp extends Component {
  componentDidMount () {
    // fire a custom event
    this.props.i13n.executeEvent('pageview', {});
  }

  render() {
    <span>
      <I13nAnchor
        href="http://foo.bar"
        i13nModel={{
          action: 'click',
          label: 'foo'
        }}
      >
        ...
      </I13nAnchor>
      // this link will be tracked, and the click event handlers provided by the plugin will get the model data as
      // {site: 'foo', action: 'click', label: 'foo'}
    </span>
  }
};


const I13nDempApp = setupI13n(DemoApp, {
  rootModelData: { site: 'foo' },
  isViewportEnabled: true
}, [somePlugin]);

// then you could use I13nDemoApp to render you app

Available Plugins

Or follow our guide and create your own.

I13n Tree

I13n Tree

react-i13n builds the instrumentation tree by leveraging the React context feature. Each component can define a i13nModel prop that defines the data it needs to track. This approach is more performant, as it means you do not need additional DOM manipulation when you want to collect the tracking data values for sending out beacons.

Since the i13n data is defined at each level. Whenever you want to get the i13nModel for a certain node, react-i13n will traverse back up the tree to merge all the i13nModel information in the hierarchy. Since the tree is already built, you do not need extra DOM access, which is cheap and efficient.

Performance

The performance has always been a topic we are working on, and yes it's an overhead to create an additional react component wrapping the link, the performance benchmark as below:

link-without-react-component x 131,232 ops/sec ±1.08% (82 runs sampled)
link-wrapped-with-react-component x 111,056 ops/sec ±1.55% (88 runs sampled)
link-wrapped-with-react-component-with-i13n-high-order-component x 64,422 ops/sec ±1.95% (84 runs sampled)

Presentation

Take a look at Rafael Martins' slides from a recent React meetup to understand more.

Debugging

Add i13n_debug=1 to the request url, you will get the i13n model for each i13n node directly shown on the page. It shows the information for each model data and where the data inherits from.

Examples

Set ENV during CI process

We check process.env.NODE_ENV !== 'production' to determine if we should do some action like print out warning message, that means it's recommended to use tools like envify as part of your build process to strip out non-production code for production build.

With Webpack

Use DefinePlugin to define the value for process.env.

// Example of the webpack configuration:

plugins: [
  new webpack.DefinePlugin({
    'process.env': {
        NODE_ENV: JSON.stringify('production')
    }
  }),
  ...
]

With Browserify

Similar to webpack, you can also use envify to set process.env.NODE_ENV to the desired environment

$ browserify index.js -t [ envify --NODE_ENV production  ] | uglifyjs -c > bundle.js

Testing

Unit

  • grunt unit to run unit tests
  • grunt cover to generate the istanbul coverage report

Functional

  • debug locally:
    • grunt functional-debug
    • check functional testing result on http://127.0.0.1:9999/tests/functional/page.html
  • run functional test on saucelabs:
    • make sure you have a saucelab account setup, get the user id ane the access key
    • setup sauce-connect
    • SAUCE_USERNAME={id} SAUCE_ACCESS_KEY={accessKey} grunt functional

License

This software is free to use under the Yahoo Inc. BSD license. See the LICENSE file for license text and copyright information.

react-i13n's People

Contributors

adlenafane avatar caa1211 avatar chrissantamaria avatar danhuang1202 avatar dependabot-preview[bot] avatar dependabot[bot] avatar ebertb avatar ericf avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hankhsiao avatar irae avatar kaesonho avatar kant avatar kfay avatar lingyan avatar longlho avatar markreeder avatar mattho avatar maximilianschmitt avatar moimikey avatar mridgway avatar redonkulus avatar roderickhsiao avatar sebastiendavid avatar tinder-rhsiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-i13n's Issues

An in-range update of eslint-config-airbnb is breaking the build 🚨

The devDependency eslint-config-airbnb was updated from 17.1.0 to 17.1.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-config-airbnb is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

better debug tool mssages

provide clearer debug message tool, to show where the i13n data comes from, itself or from parent

An in-range update of grunt-contrib-connect is breaking the build 🚨

The devDependency grunt-contrib-connect was updated from 2.0.0 to 2.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

grunt-contrib-connect is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 5 commits.

  • b6e703d v2.1.0
  • 399dd5f Merge pull request #256 from TheGreatRefrigerator/master
  • f93c287 Fix the gitignore change
  • 71fcea9 Upgrade morgan to v1.9.1
  • d5390ff Allow all configuration options of livereload to be passed through. (#246)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-jsx-a11y is breaking the build 🚨

The devDependency eslint-plugin-jsx-a11y was updated from 6.2.1 to 6.2.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jsx-a11y is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 102 commits.

  • 057fb27 6.2.2
  • fc56208 Merge pull request #615 from evcohen/changelog--v6.2.2
  • 8c5f964 Changelog for v6.2.2
  • f82fbcb Merge pull request #614 from evcohen/update--jsx-ast-utils
  • 1c3e63a Update jsx-ast-utils to v2.2.1
  • c571293 Merge pull request #613 from evcohen/add-babel-to-dev-deps
  • c398d3a Add @babel/cli to the dev dependencies
  • 13b370c Merge pull request #610 from evcohen/greenkeeper/flow-bin-0.102.0
  • e28b81a Merge branch 'master' into greenkeeper/flow-bin-0.102.0
  • e3163e3 Merge pull request #603 from evcohen/another-attempt-at-eslint-v6
  • f121a78 Merge branch 'master' into another-attempt-at-eslint-v6
  • f3de162 Merge pull request #611 from evcohen/update-jsx-ast-utils
  • 91f17be Update ESLint to v6
  • 1eb9f19 Update jsx-ast-utils to 2.2.0
  • 313bc03 chore(package): update flow-bin to version 0.102.0

There are 102 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of webpack-dev-server is breaking the build 🚨

Version 2.6.0 of webpack-dev-server just got published.

Branch Build failing 🚨
Dependency webpack-dev-server
Current Version 2.5.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As webpack-dev-server is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
  • coverage/coveralls First build on greenkeeper/webpack-dev-server-2.6.0 at 90.625% Details

Release Notes v2.6.0
  • Browser console messages now respect clientLogLevel (#921).
  • Don't output startup info if quiet is set to true (#970).
  • Only load Bonjour when needed (#958).
  • Set HMR log level (#926).
  • Do not show warnings @ overlay unless explicitly set (#881).
  • Add cli option --disable-host-check (#980).
Commits

The new version differs by 10 commits ahead by 10, behind by 1.

  • adc9a0d 2.6.0
  • 6da2f38 Set HMR log level. (#926)
  • 140da45 Don't output startup info if quiet is set to true (#970)
  • 9188878 Added cli option --disable-host-check (#980)
  • b97dc5e Only load bonjour when needed (#958)
  • e5b6202 Do not show warnings @ overlay unless explicitly set (#881)
  • a7fdb06 Fix typo in https docs (#952)
  • be1af21 Update README.md (#963)
  • bd22dce Browser console messages should respect clientLogLevel (#921)
  • 2041b11 Updated sockjs-client to 1.1.4 (#975)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-loader is breaking the build 🚨

The devDependency babel-loader was updated from 8.0.2 to 8.0.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

babel-loader is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/babel-loader-8.0.3 at 90.342% (Details).

Release Notes for v8.0.3

Features

  • #687 - Add customize option

Bugs

  • #685 - Also pass the caller option to loadPartialConfig

Docs

  • #681 - Update the README links to use the new options docs
  • #683 - Add .mjs to the examples

Internal

Some dev dependency updates and CI tweaks.

Commits

The new version differs by 12 commits.

  • 800181b 8.0.3
  • 7d8500c Also pass the caller option to loadPartialConfig (#685)
  • a507914 Expose the full loader options to all overrides hooks.
  • ac0c869 Tweak the customize implementation to be a bit more strict.
  • 9b70a02 Add overrides option
  • c8d7a72 Add .mjs to the examples (#683)
  • 4619993 bable options link update (#681)
  • 8f240b4 Use node 10 on appveyor
  • 7e4189e Change appveyor to use babel account
  • eeaee46 Update devDeps to use most recent versions, and fix tests.
  • 3e5fb5e chore(package): update lockfile
  • 2b8e479 chore(package): update eslint-config-babel to version 8.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Viewport checking doesn't happen when scrolling through components inside a scrollable div

I have a use case where the react components are within a scrollable div, and using window as the target won't work.

It looks like the capability to set different targets was recently added to the "subscribe-ui-event" module (13 days ago). So I tried changing subscribeViewportEvents to supply an options object just to see if it would work:

    subscribeViewportEvents: function () {
      this.subscription =
        subscribe('scrollEnd', this._detectViewport,
                  {target: document.getElementById('scrollable-div')});
    },

At the moment it actually won't work because there seems to be an issue with "scrollEnd" -- but I guess once that's resolved, would it be possible to have a way to specify a different target?

For my use case, I was able to get it working by modifying "subscribe-ui-events" (as mentioned in the link).

createI13nNode breaks refs?

Hi! If I wrap a component for which I have set a ref, how can I reference the 'original' component?

e.g., with...

const I13nInput = createI13nNode(MyCustomInput);
<I13nInput ref="someRef" />

...refs.someRef now points to the I13nInput component and not to the 'underlying' MyCustomInput component. It seems to me the only way around this is if this was possible:

<I13nComponent>
  <MyCustomInput ref="someRef" />
</I13nComponent>

Or am I missing something?

Thanks for your help!

onExitViewport

Is there any way to subscribe to the onExitViewport event? I'd like to track the "view" of a component, but only if it's stayed on-screen for more than X seconds.

Optional displayName prefix?

Would it be possible to make it so the createI13nNode function has an option for a displayName prefix? So instead of forcing the displayName to be 'I13n' + componentName, the user could specify whatever they want -- including a blank string.

The reason I'm asking is because I ran into some 3rd party code that uses the displayName to determine certain behaviors (which seems like bad practice, but the easiest fix to this seems to be not changing the displayName).

Question: createI13nNode with component still causes react 15.2 props warning

I might be approaching this all wrong but if I try something like this:

import { createI13nNode } from 'react-i13n';
import { NavLink } from 'fluxible-router';

var I13nNavLink = createI13nNode(NavLink, {
    isLeafNode: true,
    bindClickEvent: true,
    follow: false
});

export default I13nNavLink;

And use it like this:

<I13nNavLink i13nModel={{category: 'Homepage', action: 'click', label: 'Skip Tool'}} href="/products" preserveScrollPosition={false} className="link link--inline">Link</I13nNavLink>

The i13n props are passed down to NavLink which results in the error: Unknown props i13n, i13nModel, isLeafNode, bindClickEvent, follow, scanLinks on <a> tag. Remove these props from the element.

I'm I doing something I'm not supposed to do?

Relevant package versions:

    "fluxible": "1.2.0",
    "fluxible-addons-react": "0.2.8",
    "fluxible-router": "^1.0.0-alpha.7",
    "react": "^15.0.0",
    "react-addons-create-fragment": "^15.0.0",
    "react-dom": "^15.0.0",
    "react-i13n": "2.1.2",
    "react-i13n-ga": "0.2.5",

An in-range update of eslint-plugin-import is breaking the build 🚨

The devDependency eslint-plugin-import was updated from 2.18.0 to 2.18.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 14 commits.

  • b51aa2f Bump to v2.18.1
  • 32704da fix: Improve parse perf when using @typescript-eslint/parser
  • 3b21de6 [Tests] extract common "get parser" logic into test helpers
  • f4e3f1b prefer-default-export: don't warn on TypeAlias & TSTypeAliasDeclaration
  • 1caa402 [Fix] no-unused-modules: Exclude package "main"/"bin"/"browser" entry points
  • 22d5440 [fix] export: false positive for typescript overloads
  • 5abd5ed [Tests] temporarily disable these failing tests in eslint < 4
  • 752dcd5 [Tests] add missing --no-save to time travel script
  • d3a3fa5 [Refactor] no-extraneous-dependencies: remove the last bit of lodash
  • 8a38fd4 [Refactor] no-extraneous-dependencies: use Array.isArray instead of lodash
  • c5078ad [Refactor] importType: remove use of cond
  • 118afd4 no-deprecated: don't run tests for typescript-eslint-parser against ESLint <4
  • 6512110 fix tests for node 4 + fixed lint issues
  • bb9ba24 no-deprecated TS tests (#1315)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

use component to render DebugMessage

we use pure js to render debug message tool because we are allow users to use mixin, and we cannot control render function,
if we don't expose it and users always have to do it with createI13nNode, we should be able to use pure react component to render it.

object.assign changes props ordering and resulting in different attribute orders on the server and client

I am tracing a checksum mismatch warning and noticed the props' key ordering is changed here:

var props = Object.assign({}, {
i13n: {
executeEvent: this.executeI13nEvent,
getI13nNode: this.getI13nNode
}
}, this.props);

I only see the issue happening in chrome and on certain executions of that object assign code. Technically the key ordering is not something we should rely on because it's unspecified according to the spec, but it seems that's what react is using to render the attribute when using the spread operator. Should we play it safe here to not use object.assign but a for in loop to preserve the original ordering?

An in-range update of subscribe-ui-event is breaking the build 🚨

The dependency subscribe-ui-event was updated from 2.0.5 to 2.0.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

subscribe-ui-event is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v2.0.6
  • #58 - Upgrade lodash to v4.17.15
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of debug is breaking the build 🚨

Version 3.2.0 of debug was just published.

Branch Build failing 🚨
Dependency debug
Current Version 3.1.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

debug is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes 3.2.0

A long-awaited release to debug is available now: 3.2.0.

Due to the delay in release and the number of changes made (including bumping dependencies in order to mitigate vulnerabilities), it is highly recommended maintainers update to the latest package version and test thoroughly.


Minor Changes

Patches

Credits

Huge thanks to @DanielRuf, @EirikBirkeland, @KyleStay, @Qix-, @abenhamdine, @alexey-pelykh, @DiegoRBaquero, @febbraro, @kwolfy, and @TooTallNate for their help!

Commits

The new version differs by 25 commits.

There are 25 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of react is breaking the build 🚨

There have been updates to the react monorepo:

    • The devDependency react was updated from 16.6.1 to 16.6.2.
  • The devDependency react-dom was updated from 16.6.1 to 16.6.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the react group definition.

react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of minimist is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency minimist was updated from 1.2.0 to 1.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

minimist is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 5 commits.

  • 29783cd 1.2.1
  • 6be5dae add test
  • ac3fc79 fix bad boolean regexp
  • 4cf45a2 Merge pull request #63 from lydell/dash-dash-docs-fix
  • 5fa440e move the opts['--'] example back where it belongs

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

The devDependency coveralls was updated from 3.0.4 to 3.0.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 6 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of promise is breaking the build 🚨

The devDependency promise was updated from 8.0.3 to 8.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

promise is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 7 commits.

  • e9c12a2 feat: support ES2015 iterables in all() and race() (#160)
  • 81b5722 docs: add "Enterprise Support" to README
  • 6d91fa0 Create FUNDING.yml
  • affd5e2 ci: update supported node versions
  • 6272338 adding Promise.race documentation and reference to proper API docs (#155)
  • 44f6d7a Fix typo: optimistically
  • f643fd6 Release 8.0.3

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-react is breaking the build 🚨

The devDependency eslint-plugin-react was updated from 7.14.0 to 7.14.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v7.14.1

Fixed

  • Fix prop-types crash on multiple destructuring (#2319 @golopot)
Commits

The new version differs by 3 commits.

  • 62255af Update CHANGELOG and bump version
  • 655eb01 Merge pull request #2320 from golopot/issue-2319
  • 9639d82 [Fix] prop-types: fix crash on multiple destructuring

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of babel-plugin-add-module-exports is breaking the build 🚨

The devDependency babel-plugin-add-module-exports was updated from 1.0.0 to 1.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

babel-plugin-add-module-exports is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 5 commits.

  • 38e2e68 v1.0.1
  • df47a0a [patch] Add module.exports to files using es3 member literals
  • e8e5be0 docs: tweaks [ci skip]
  • d0001d5 docs(README): add webpack notes(refs #68) & tweaks [ci skip]
  • 753d945 chore: tweak postversion script [ci skip]

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

support run-timely scan links

we will need to replace links/button with I13nAnchor/I13nButton or other customized components, which is the better way for link tracking,

while we still have some cases like if we use dangerouslySetInnerHTML, we cannot do the above things, so will need to provide a options to scan all the links inside the i13nNode, and build them in the tree in client.

update for the React 16.3 changes

We will need to

  1. use new Context API
  2. remove the deprecated lifecycle, e.g., componentWillMount, the reason we use componentWillMount is we want to make sure it happens in sequence and align with the react tree order, so probably move it to render function ? or move to componentDidMount but we will implement some stack to get the order we want.

How does it work with redux?

Does this support redux? I don't see any reason not to, but how can I use it with combination of react-redux.Provider and react-router.
Simple Example would be

ReactDOM.render(
  <Provider store={store}>
    <div>
      <Router history={browserHistory} routes={routes} />
      {showDevTools}
    </div>
  </Provider>,
  document.getElementById('app')
);

An in-range update of babel-eslint is breaking the build 🚨

The devDependency babel-eslint was updated from 10.0.2 to 10.0.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

babel-eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 2 commits.

  • 183d13e 10.0.3
  • 354953d fix: require eslint dependencies from eslint base (#794)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of hoist-non-react-statics is breaking the build 🚨

The dependency hoist-non-react-statics was updated from 3.2.0 to 3.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

hoist-non-react-statics is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 4 commits.

  • 6c5c23f 3.2.1
  • 31fe2aa Update changelog for 3.2.1
  • 08d4725 Fix hoisting of react statics between two forwardRef components (#71)
  • 7706001 Update CHANGELOG.md (#70)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Add example to repository

Would be easier for people to understand how to use, if there was an example React application that integrated the various components, mixins and libraries.

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.1.4 to 6.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v6.2.0

6.2.0 / 2019-07-18

🎉 Enhancements

🐛 Fixes

📖 Documentation

🔍 Coverage

🔩 Other

Commits

The new version differs by 39 commits.

  • bd47776 Release v6.2.0
  • cc595af update CHANGELOG.md for v6.2.0 [ci skip]
  • 59d70ee fix: remove duplicate line-height property (#3957)
  • f77cac4 fix: do not redeclare variable (#3956)
  • 6201e42 Hide stacktrace when cli args are missing (#3963)
  • 88f45d5 Don't re-initialize grep option on watch re-run (#3960)
  • 5d4dd98 Fix No Files error when file is passed via --files (#3942)
  • 15b96af Collect test files later (#3953)
  • ccee5f1 Base reporter store ref to console.log (#3725)
  • 47318a7 update @mocha/contributors to v1.0.4 (#3944)
  • c903147 More, improved integration tests for watching (#3929)
  • e341ea4 Update CI config files to use Node-12.x (#3919)
  • 3064d25 update @mocha/docdash to v2.1.1 (#3945)
  • 9ea45e7 do not fork if no node flags present (#3827)
  • d02a096 modify Mocha constructor to accept options.global or options.globals (#3914)

There are 39 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An undefined/null element triggers onEnterViewport

Certainly possible I'm misinterpreting the code, but it appears as if _onEnterViewport is purposefully triggered if/when the tracked element does not exist. See https://github.com/yahoo/react-i13n/blob/master/src/libs/ViewportDetector.js#L56

In practice, I'm also noticing that components who's render return value ends up as null are being tracked as entering the viewport, but this seems counterintuitive.

contrived example:

const ConditionalComponent = (props) => {
    return props.shouldRender ? <div>Yay!</div> : null;
};

const i13nConditionalComponent = createI13nNode(ConditionalComponent);

// triggers viewport as intended when in view
<ConditionalComponent shouldRender />

// still triggers viewport as maybe(?) unintended on init
<ConditionalComponent shouldRender={false} />

Upgrade to 2.4.x+ causing page reloads on click when using redux and react-router

Since version 2.4.x, instrumented clicks (bindClickEvent is set to true using createI13nNode) are causing the page to reload -- i.e. the app no longer behaves as a single page app (this can be confirmed by looking at the downloads in Chrome's network tab and also by noticing that the browser window refreshes). This is happening when using redux and react-router, but I'm not sure what the root cause is.

I was able to reproduce the issue using the React Redux Starter Kit and adding click instrumentation to the existing links. I made a fork of the project with a single additional commit here that reproduces the issue. Also, if you downgrade the react-i13n version to 2.3.2, you'll see that the issue no longer occurs.

React ^15.2.0 and unknown props

Hi, since React v15.2.0 warnings are logged in the console about unknown props: react#unknown-prop.

To reproduce:

import { render } from 'react-dom';
import { createI13nNode } from 'react-i13n';
import React from 'react';

const I13nButton = createI13nNode('button', {
  isLeafNode: true,
  bindClickEvent: true,
  follow: true
});
const i13nModel = {
  // some i13n model
};

render(<I13nButton i13nModel={i13nModel} />, document.getElementById('content'));

React I13n 3.0.0

Use as a master tracker for 3.0.0 release.

Enhancement:

  • [3.0.0-alpha.0] Modernize package, publishing ES module and CJS
  • Move to new React context API #190
  • Use new React forward ref API
  • Modernize build, and make sure test run reliably
  • Replace deprecated React lifecycle
  • Update documentation and tests

Good to have enhancement

  • [3.0.0-alpha.1] React.lazy Dashboard so better code spilt if the feature is not enabled.
  • [3.0.0-alpha.1] Use component to write DebugMessage #23
  • Remove proptypes for production build
  • Rewrite viewport detect logic using intersection observer #182 #103
  • Use React to render DebugDashboard root component

Breaking Changes

  • [3.0.0-alpha.0] Drop mixin usage
  • [3.0.0-alpha.0] Drop deprecated props followLink
  • [3.0.0-alpha.0] Remove Node 6 supports (EOL 2019-04-30)
  • [3.0.0-alpha.1] Require React 16.6
  • [3.0.0-alpha.5] require intersection-observer polyfill if you are need to support browsers doesnt have the function
  • [3.0.0-alpha.5] Switch to hook so server side won't behave the same as before

[3.0.0-alpha.0] #218
[3.0.0-alpha.1] #226
[3.0.0-alpha.2] #228
[3.0.0-alpha.3] #229
[3.0.0-alpha.5] #259

An in-range update of es5-shim is breaking the build 🚨

The devDependency es5-shim was updated from 4.5.11 to 4.5.12.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

es5-shim is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/es5-shim-4.5.12 at 90.342% (Details).

Release Notes for v4.5.12

Meta

  • republish broken 4.5.11

Fix

  • sync Object.keys excluded list from object-keys (#456)
Commits

The new version differs by 2 commits ahead by 2, behind by 1.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Which version to use?

Currently, there are 3 separate version trees:
0.xx
1.xx
2.xx

What's the difference between them? Which one is recommended? I could only find info that 2.xx removed Object.assign polyfills, etc. But anything else which is different?

Also, by default, running npm install --save react-i13n gets the 0.xx branch, and that just doesn't work with react-0.14. Can you update the readme (atleast in the v2.xx/v1.xx branches) to reflect this?

An in-range update of webpack is breaking the build 🚨

The devDependency webpack was updated from 4.35.0 to 4.35.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.35.1

Bugfixes

  • add realResource condition in rule to schema
  • fixes order of loaders when using a matchResource
Commits

The new version differs by 20 commits.

  • 569dd6a 4.35.1
  • 5c7996d Merge pull request #9328 from jchapman127/bugfix/match-resource
  • fec4d53 only affect loader order when match resource is used
  • 61d508e improve test cases for more edge cases
  • 5523a0a Merge pull request #9326 from vankop/add-real-resource-parameter
  • 49dc747 fix loader ordering
  • a435c74 add test case for #9053
  • 68f794d updated snapshots, rerun tooling scripts
  • b320269 add realResource parameter to RuleSetRule
  • c8f4dd1 Merge pull request #9322 from webpack/dependabot/npm_and_yarn/@types/node-10.14.10
  • 498834c Merge pull request #9321 from webpack/dependabot/npm_and_yarn/eslint-plugin-jest-22.7.1
  • 81bf2ca chore(deps-dev): bump @types/node from 10.14.9 to 10.14.10
  • f8bb7a5 chore(deps-dev): bump eslint-plugin-jest from 22.7.0 to 22.7.1
  • 58bd580 Merge pull request #9311 from webpack/dependabot/npm_and_yarn/eslint-plugin-jest-22.7.0
  • cea1348 Merge pull request #9310 from ryandrew14/update-contributing-to-documentation

There are 20 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Don't fire a beacon if `i13nModel` is undefined

We'd like to share an instrumented button class across our application, but there are many instance when we don't want the button to send a beacon, yet still share the same class. We can either

  1. create two classes and choose in the application code, or
  2. have the wrapper component inside createI13nNode check whether i13nModel is undefined and fire a beacon only if it isn't

If firing a beacon with an empty leaf payload is an actual valid use-case (??), then maybe an optional parameter in createI13nNode could preserver the backward-compatibility.

An in-range update of eslint is breaking the build 🚨

The dependency eslint was updated from 5.15.3 to 5.16.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v5.16.0
  • dfef227 Build: gensite passes rulesMeta to formatter rendering (#11567) (Kevin Partington)
  • c06d38c Fix: Allow HTML formatter to handle no meta data (#11566) (Ilya Volodin)
  • 87a5c03 Docs: func-style: clarify when allowArrowFunctions is used (#11548) (Oliver Joseph Ash)
  • bc3e427 Update: pass rule meta to formatters RFC 10 (#11551) (Chris Meyer)
  • b452f27 Chore: Update README to pull in reviewer data (#11506) (Nicholas C. Zakas)
  • afe3d25 Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550) (Vernon de Goede)
  • 4fe7eb7 Chore: use nyc instead of istanbul (#11532) (Toru Nagashima)
  • f16af43 Chore: fix formatters/table test (#11534) (Toru Nagashima)
  • 78358a8 Docs: fix duplicate punctuation in CLI docs (#11528) (Teddy Katz)
Commits

The new version differs by 11 commits.

  • ded2f94 5.16.0
  • ea36e13 Build: changelog update for 5.16.0
  • dfef227 Build: gensite passes rulesMeta to formatter rendering (#11567)
  • c06d38c Fix: Allow HTML formatter to handle no meta data (#11566)
  • 87a5c03 Docs: func-style: clarify when allowArrowFunctions is used (#11548)
  • bc3e427 Update: pass rule meta to formatters RFC 10 (#11551)
  • b452f27 Chore: Update README to pull in reviewer data (#11506)
  • afe3d25 Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550)
  • 4fe7eb7 Chore: use nyc instead of istanbul (#11532)
  • f16af43 Chore: fix formatters/table test (#11534)
  • 78358a8 Docs: fix duplicate punctuation in CLI docs (#11528)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.