A performant, scalable and pluggable approach to instrumenting your React application.

Overview

react-i13n

npm version Build Status Coverage Status Dependency Status devDependency 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 or mixin 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 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
// or you can use the mixin to track an existing component
const I13nAnchor = createI13nNode('a', {
    isLeafNode: true,
    bindClickEvent: true,
    follow: true
});

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

  render() {
      ...
      <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'}
  }
};


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 undocumented React context feature and the componentWillMount life cycle event. 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)

We recommend to use createI13nNode instead of I13nMixin as it performs better. As the benchmark result, on server side, rendering 64 react components with i13n functionalities takes 1 ms. Let's say it takes 3 ms overhead if you have 200 links on the page. That's a trade off if you want to organize i13n implementation better with react-i13n. We are working on performance improvement, if you have any insight or performance benchmark, please let us know!

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.

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

    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 :muscle:

    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 :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 37
  • Refactor, 1. move functions to ComponentSpecs 2. remove mixin from createI13nNode 3. apply nyc 4. add perf results

    Refactor, 1. move functions to ComponentSpecs 2. remove mixin from createI13nNode 3. apply nyc 4. add perf results

    init this PR first

    1. move functions to ComponentSpecs, and use it directly on createI13nNode and setupI13n. with this we can remove mixin from createI13nNode, which is considered as bad performance.

    2. ViewportMixin is not a mixin anymore, remove a lot of hack and make code clearer. created a ViewportDetector and use it directly

    3. still keep the mixins for BC.

    Somehow I named this the branch with as es6, I was planning to do that in the same PR, but I'm going to separate it as another PR

    • [x] remove mixin from createI13nNode
    • [x] review existed code
    opened by kaesonho 28
  • An in-range update of webpack is breaking the build 🚨

    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 :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 24
  • An in-range update of react is breaking the build 🚨

    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 :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 22
  • Update webpack to the latest version 🚀

    Update webpack to the latest version 🚀

    The devDependency webpack was updated from 3.12.0 to 4.21.0.

    This version is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


    Release Notes for v4.21.0

    Features

    • add output.libraryTarget: "amd-require" which generates a AMD require([], ...) wrapper instead of a define([], ...) wrapper
    • support arrays of strings passed to output.library, which exposes the library to a subproperty

    Bugfixes

    • fix cases where __webpack_require__.e is used at runtime but is not defined in the bundle
    • fix behavior of externals of global type

    Performance

    • Some performance improvements to the chunk graph generation
    Commits

    The new version differs by 2497 commits ahead by 2497, behind by 8.

    • 432d2a3 4.21.0
    • 0fb6c60 Merge pull request #7038 from marcusdarmstrong/marcusdarmstrong-external-module-fix
    • 15b6f8b make afterEach async
    • 7bc5c98 Merge branch 'master' into marcusdarmstrong-external-module-fix
    • 2228daf Merge pull request #8230 from webpack/revert-8120-rh-silent-reporter
    • fadf875 remove dependency
    • 7c0b209 Revert "Re-enable jest-silent-reporter #hacktoberfest"
    • a868789 Merge pull request #8143 from MLoughry/miclo/optimize-chunk-graph-generation
    • 1d71ede Make changes suggested by @sokra to optimize chunk graph generation
    • 4d3fe00 Merge pull request #8134 from fscherwi/update-coveralls
    • 86f56bf update coveralls
    • 4c461e2 Merge pull request #8120 from rickhanlonii/rh-silent-reporter
    • 9fe42e7 Merge pull request #8118 from webpack/bugfix/issue-8110
    • 0b6ad2a Don't be clever with the set command because idk windows
    • 148016e Rerun yarn

    There are 250 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 :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 21
  • Update webpack to the latest version 🚀

    Update webpack to the latest version 🚀

    Version 4.9.0 of webpack was just published.

    Dependency webpack
    Current Version 3.12.0
    Type devDependency

    The version 4.9.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of webpack.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Release Notes v4.9.0

    Features

    • BannerPlugin supports a function as banner option
    • allow serve property in configuration schema
    • add entryOnly option to DllPlugin to only expose modules in the entry point
    • Allow to choose between webpack-cli and webpack-command
    • improve error message when JSON parsing fails
    • allow BOM in JSON
    • sort usedIds in records for stablility

    Bugfixes

    • align module not found error message with node.js
    • fix behavior of splitChunks when request limit has reached (caused suboptimal splitting)
    • fix handling of RegExp in records (caused absolute path in records)
    • fix handling of circular chunks (caused missing __webpack_require__.e)
    • runtimeChunk is even generated when all modules are moved by splitChunks (caused multiple runtime chunks instead of single one)
    • string ids are no longer recorded (caused duplicate chunk ids)
    • fix link to migration guide in error message

    Internal changes

    • add more typings
    • Use travis stages
    • add many-pages example
    Commits

    The new version differs by 1757 commits ahead by 1757, behind by 8.

    • bb0731d 4.9.0
    • be6bdff Merge pull request #7385 from moondef/moondef-patch-1
    • b77addd Merge pull request #7187 from byzyk/enhancement/prettierignore
    • 2f3e7d4 Merge pull request #7331 from dev-drprasad/add-jsdoc-annotations-cached-merge
    • 70c608c Merge pull request #7387 from webpack/bugfix/record-string-ids
    • 69567a1 update test case to reflect change
    • 8af0320 Merge pull request #7344 from asapach/master
    • 713292f update bot for jest tests
    • 79aa13d Merge pull request #7386 from webpack/bugfix/runtime-chunk
    • 67717ab Merge pull request #7383 from webpack/ci/improvements
    • 72a45ab speed up CI
    • f026310 only record number ids
    • 25c7b07 Fix link
    • 374376d fixes #7382
    • aa99385 added a note about production mode

    There are 250 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 :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 20
  • fix leak on server side, not store singleton instance to global object

    fix leak on server side, not store singleton instance to global object

    @lingyan @redonkulus

    we are storing rootI13nNode and reactI13nInstance on the global object, which causes memory leak, we are leaking all the i13n react component in memory on server side, because they eventually have a reference to the rootI13nNode

    the solution here is just let setupI13n create that instance and pass it through context, so that each I13n component can still get the instance. also rootI13nNode can just store in the reactI13n instance.

    After the change, we can see there's no leaking on i13nNodes now screen shot 2016-08-08 at 10 42 52 am

    opened by kaesonho 17
  • An in-range update of eslint is breaking the build 🚨

    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 :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 15
  • Update webpack to the latest version 🚀

    Update webpack to the latest version 🚀

    ☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

    Version 4.0.0 of webpack was just published.

    Dependency webpack
    Current Version 3.11.0
    Type devDependency

    The version 4.0.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of webpack.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Release Notes v4.0.0

    Big changes

    • Environment
      • Node.js 4 is no longer supported. Source Code was upgraded to a higher ecmascript version.
    • Usage
      • You have to choose (mode or --mode) between two modes now: production or development
        • production enables all kind of optimizations to generate optimized bundles
        • development enables comments and hint for development and enables the eval devtool
        • production doesn't support watching, development is optimized for fast incremental rebuilds
        • production also enables module concatenating (Scope Hoisting)
        • You can configure this in detail with the flags in optimization.* (build your custom mode)
        • process.env.NODE_ENV are set to production or development (only in built code, not in config)
        • There is a hidden none mode which disables everything
    • Syntax
      • import() always returns a namespace object. CommonJS modules are wrapped into the default export
        • This probably breaks your code, if you used to import CommonJs with import()
    • Configuration
      • You no longer need to use these plugins:
        • NoEmitOnErrorsPlugin -> optimization.noEmitOnErrors (on by default in production mode)
        • ModuleConcatenationPlugin -> optimization.concatenateModules (on by default in production mode)
        • NamedModulesPlugin -> optimization.namedModules (on by default in develoment mode)
      • CommonsChunkPlugin was removed -> optimization.splitChunks, optimization.runtimeChunk
    • JSON
      • webpack now handles JSON natively
        • You may need to add type: "javascript/auto" when transforming JSON via loader to JS
        • Just using JSON without loader should still work
      • allows to import JSON via ESM syntax
        • unused exports elimination for JSON modules
    • Optimization
      • Upgrade uglifyjs-webpack-plugin to v1
        • ES15 support

    Big features

    • Modules
      • webpack now supports these module types:
        • javascript/auto: (The default one in webpack 3) Javascript module with all module systems enabled: CommonJS, AMD, ESM
        • javascript/esm: EcmaScript modules, all other module system are not available
        • javascript/dynamic: Only CommonJS and, EcmaScript modules are not available
        • json: JSON data, it's available via require and import
        • webassembly/experimental: WebAssembly modules (currently experimental)
      • javascript/esm handles ESM more strictly compared to javascript/auto:
        • Imported names need to exist on imported module
        • Dynamic modules (non-esm, i. e. CommonJs) can only imported via default import, everything else (including namespace import) emit errors
      • In .mjs modules are javascript/esm by default
      • WebAssembly modules
        • can import other modules (JS and WASM)
        • Exports from WebAssembly modules are validated by ESM import
          • You'll get a warning/error when trying to import a non-existing export from WASM
        • can only be used in async chunks. They doesn't work in initial chunks (would be bad for web performance)
          • Import modules using WASM via import()
        • This is an experimental feature and subject of change
    • Optimization
      • sideEffects: false is now supported in package.json
        • sideEffects in package.json also supports glob expressions and arrays of glob expressions
      • Instead of a JSONP function a JSONP array is used -> async script tag support, order no longer matter
      • New optimization.splitChunks option was introduced
        Details: https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693
      • Dead branches are now removed by webpack itself
        • Before: Uglify removed the dead code
        • Now: webpack removes the dead code (in some cases)
        • This prevents crashing when import() occur in a dead branch
    • Syntax
      • webpackInclude and webpackExclude are supported by the magic comment for import(). They allow to filter files when using a dynamic expression.
      • Using System.import() now emits a warning
        • You can disable the warning with Rule.parser.system: true
        • You can disable System.import with Rule.parser.system: false
    • Configuration
      • Resolving can now be configured with module.rules[].resolve. It's merged with the global configuration.
      • optimization.minimize has been added to switch minimizing on/off
        • By default: on in production mode, off in development mode
      • optimization.minimizer has been added to configurate minimizers and options
    • Usage
      • Some Plugin options are now validated
      • CLI has been move to webpack-cli, you need to install webpack-cli to use the CLI
      • The ProgressPlugin (--progress) now displays plugin names
        • At least for plugins migrated to the new plugin system
    • Performance
      • UglifyJs now caches and parallizes by default
      • Multiple performance improvements, especially for faster incremental rebuilds
      • performance improvement for RemoveParentModulesPlugin
    • Stats
      • Stats can display modules nested in concatenated modules

    Features

    • Configuration
      • Module type is automatically choosen for mjs, json and wasm extensions. Other extensions need to be configured via module.rules[].type
      • Incorrect options.dependencies configurations now throw error
      • sideEffects can be overriden via module.rules
      • output.hashFunction can now be a Constructor to a custom hash function
        • You can provide a non-cryto hash function for performance reasons
      • add output.globalObject config option to allow to choose the global object reference in runtime exitCode
    • Runtime
      • Error for chunk loading now includes more information and two new properties type and request.
    • Devtool
      • remove comment footer from SourceMaps and eval
      • add support for include test and exclude to the eval source map devtool plugin
    • Performance
      • webpacks AST can be passed directly from loader to webpack to avoid extra parsing
      • Unused modules are no longer unnecessarly concatenated
      • Add a ProfilingPlugin which write a (Chrome) profile file which includes timings of plugins
      • Migrate to using for of instead of forEach
      • Migrate to using Map and Set instead of Objects
      • Migrate to using includes instead of indexOf
      • Replaced some RegExp with string methods
      • Queue don't enqueues the same job twice
      • Use faster md4 hash for hashing by default
    • Optimization
      • When using more than 25 exports mangled export names are shorter.
      • script tags are no longer text/javascript and async as this are the default values (saves a few bytes)
      • The concatenated module now generates a bit less code
      • constant replacements now don't need __webpack_require__ and argument is omitted
    • Defaults
      • webpack now looks for the .wasm, .mjs, .js and .json extensions in this order
      • output.pathinfo is now on by default in develoment mode
      • in-memory caching is now off by default in production
      • entry defaults to ./src
      • output.path defaults to ./dist
      • Use production defaults when omiting the mode option
    • Usage
      • Add detailed progress reporting to SourceMapDevToolPlugin
      • removed plugins now give a useful error message
    • Stats
      • Sizes are now shown in kiB instead of kB in Stats
      • entrypoints are now shows by default in Stats
      • chunks now display <{parents}> >{children}< and ={siblings}= in Stats
      • add buildAt time to stats
      • stats json now includes the output path
    • Syntax
      • A resource query is supported in context
      • Referencing entry point name in import() now emits a error instead of a warning
      • Upgraded to acorn 5 and support ES 2018
    • Plugins
      • done is now an async hook

    Bugfixes

    • Generated comments no longer break on */
    • webpack no longer modifies the passed options object
    • Compiler "watch-run" hook now has the Compiler as first parameter
    • add output.chunkCallbackName to the schema to allow configurating WebWorker template
    • Using module.id/loaded now correctly bails out of Module Concatentation (Scope Hoisting)
    • OccurenceOrderPlugin now sorts modules in correct order (instead of reversed)
    • timestamps for files are read from watcher when calling Watching.invalidate
    • fix incorrect -! behavior with post loaders
    • add run and watchRun hooks for MultiCompiler
    • this is now undefined in ESM
    • VariableDeclaration are correctly identified as var, const or let
    • Parser now parse the source code with the correct source type (module/script) when the module type javascript/dynamic or javascript/module is used.
    • don't crash on missing modules with buildMeta of null
    • add original-fs module for electron targets
    • HMRPlugin can be added to the Compiler outside of plugins

    Internal changes

    • Replaced plugin calls with tap calls (new plugin system)
    • Migrated many deprecated plugins to new plugin system API
    • added buildMeta.exportsType: "default" for json modules
    • Remove unused methods from Parser (parserStringArray, parserCalculatedStringArray)
    • Remove ability to clear BasicEvaluatedExpression and to have multiple types
    • Buffer.from instead of new Buffer
    • Avoid using forEach and use for of instead
    • Use neo-async instead of async
    • Update tapable and enhanced-resolve dependencies to new major versions
    • Use prettier

    Removed features

    • removed module.loaders
    • removed loaderContext.options
    • removed Compilation.notCacheable flag
    • removed NoErrorsPlugin
    • removed Dependency.isEqualResource
    • removed NewWatchingPlugin
    • removed CommonsChunkPlugin

    Breaking changes for plugins/loaders

    • new plugin system
      • plugin method is backward-compatible
      • Plugins should use Compiler.hooks.xxx.tap(<plugin name>, fn) now
    • New major version of enhanced-resolve
    • Templates for chunks may now generate multiple assets
    • Chunk.chunks/parents/blocks are no longer Arrays. A Set is used internally and there are methods to access it.
    • Parser.scope.renames and Parser.scope.definitions are no longer Objects/Arrays, but Map/Sets.
    • Parser uses StackedSetMap (LevelDB-like datastructure) instead of Arrays
    • Compiler.options is no longer set while applying plugins
    • Harmony Dependencies has changed because of refactoring
    • Dependency.getReference() may now return a weak property. Dependency.weak is now used by the Dependency base class and returned in the base impl of getReference()
    • Constructor arguments changed for all Modules
    • Merged options into options object for ContextModule and resolveDependencies
    • Changed and renamed dependencies for `import()
    • Moved Compiler.resolvers into Compiler.resolverFactory accessible with plugins
    • Dependency.isEqualResource has been replaced with Dependency.getResourceIdentifier
    • Methods on Template are now static
    • A new RuntimeTemplate class has been added and outputOptions and requestShortener has been moved to this class
      • Many methods has been updated to use the RuntimeTemplate instead
      • We plan to move code which accesses the runtime to this new class
    • Module.meta has been replaced with Module.buildMeta
    • Module.buildInfo and Module.factoryMeta have been added
    • Some properties of Module have been moved into the new objects
    • added loaderContext.rootContext which points to the context options. Loaders may use it to make stuff relative to the application root.
    • add this.hot flag to loader context when HMR is enabled
    • buildMeta.harmony has been replaced with buildMeta.exportsType: "namespace
    • The chunk graph has changed:
      • Before: Chunks were connected with parent-child-relationships.
      • Now: ChunkGroups are connected with parent-child-relationships. ChunkGroups contain Chunks in order.
      • Before: AsyncDependenciesBlocks reference a list of Chunks in order.
      • Now: AsyncDependenciesBlocks reference a single ChunkGroup.
    • file/contextTimestamps are Maps now
    • map/foreach Chunks/Modules/Parents methods are now deprecated/removed
    • NormalModule accept options object in Constructor
    • Added required generator argument for NormalModule
    • Added createGenerator and generator hooks for NormalModuleFactory to customize code generation
    • Allow to customize render manifest for Chunks via hooks
    Commits

    The new version differs by 838 commits.

    • 213226e 4.0.0
    • fde0183 Merge pull request #6081 from webpack/formating/prettier
    • b6396e7 update stats
    • f32bd41 fix linting
    • 5238159 run prettier on existing code
    • 518d1e0 replace js-beautify with prettier
    • 4c25bfb 4.0.0-beta.3
    • dd93716 Merge pull request #6296 from shellscape/fix/hmr-before-node-stuff
    • 7a07901 Merge pull request #6563 from webpack/performance/assign-depth
    • c7eb895 Merge pull request #6452 from webpack/update_acorn
    • 9179980 Merge pull request #6551 from nveenjain/fix/templatemd
    • e52f323 optimize performance of assignDepth
    • 6bf5df5 Fixed template.md
    • 90ab23a Merge branch 'master' into fix/hmr-before-node-stuff
    • b0949cb add integration test for spread operator

    There are 250 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 :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 14
  • do not pass i13n props to string components

    do not pass i13n props to string components

    To avoid to pass i13n props to string components such a or button, we can filter the props before passing them to the wrapped component. So React ^15.2.0 will not warn about unknown props. What do you think?

    opened by sebastiendavid 13
  • Added scrollableContainerId option

    Added scrollableContainerId option

    This is one way to support viewport checking when components are contained within a scrollable element, as mentioned in #84.

    This is the solution that is currently working for me. Note that it only supports the use case where the scrollable element fills the viewport.

    opened by ebertb 13
  • [Version v3.0.0-alpha.8] get an unexpected root i13nNode in `created` event handler in existing plugins (ex. Rapid Plugin)

    [Version v3.0.0-alpha.8] get an unexpected root i13nNode in `created` event handler in existing plugins (ex. Rapid Plugin)

    Description

    After setup an i13nAnchor component by using [email protected], get an unexpected root i13nNode in created event handler in existing plugins (ex. Rapid Plugin)

    3.x version's payload.i13nNode is a root node (_DOMNode is body) in the plugin

    2E7276E9-3D64-49BD-9794-F36DFA5794BB

    2.x version's payload.i13nNode is a correct node (_DOMNode is a, it's an i13nAnchor) in the plugin

    90521513-772A-4ABC-97E1-9E9189924309

    It causes Rapid plugin (or any plugins need i13nNode) be broken for LinkView because of incorrect i13node and related model.

    Root Cause

    In the 2.x version

    After executeI13nEvent with an empty object in comoonentDidMount https://github.com/yahoo/react-i13n/blob/2.x/src/libs/ComponentSpecs.js#L161

    payload.i13nNode will run a fallback for getting a i13nNode https://github.com/yahoo/react-i13n/blob/3697f874780ba78ceb38431c75240ea422ee5784/src/libs/ComponentSpecs.js#L235

    And getI13nNode() will return current i13nNode (_i13nNode) or parentI13nNode as below

     this._i13nNode || this._getParentI13nNode();
    

    In this case, payload will contain current i13nNode (_i13nNode) before sending to the handler image

    But in 3.x version

    After executEvent with an empty object, nowhere do the same fallback logic before sending the event, so payload.i13nNode become to a root node. I thought It would be an unexpected result otherwise causing a breaking changes for all plugins which need i13nNode for operations.

    My Code Tracing in version 3.x:

    useEffect -> executeI13nEvent image -> execute (Even though there is a fallback in execute, but no current i13nNode in payload, so it fallbacks to the root node and is not the same logic as the 2.x version. After this line, payload.i13nNode become a root body node ) image -> executeEvent image

    According to the code tracing, react-i13n v3 has a different payload.i13nNode in this case, and leads the different result in the Rapid Plugin. The count of module views will be lost.

    opened by caa1211 0
  • React I13n 3.0.0

    React I13n 3.0.0

    Use as a master tracker for 3.0.0 release.

    Enhancement:

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

    Good to have enhancement

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

    Breaking Changes

    • [x] [3.0.0-alpha.0] Drop mixin usage
    • [x] [3.0.0-alpha.0] Drop deprecated props followLink
    • [x] [3.0.0-alpha.0] Remove Node 6 supports (EOL 2019-04-30)
    • [x] [3.0.0-alpha.1] Require React 16.6
    • [x] [3.0.0-alpha.5] require intersection-observer polyfill if you are need to support browsers doesnt have the function
    • [x] [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

    opened by roderickhsiao 10
  • An undefined/null element triggers onEnterViewport

    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} />
    
    opened by gmp 0
  • Use interaction observer to detect viewport

    Use interaction observer to detect viewport

    We could probably try to integrate intersection observer and fallback to the original logic if the browser doesnt support it.

    https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

    Also there is issue that currently the scroll event is attached on window, so it might cause issue if the we are using overflow scroll

    Support https://caniuse.com/#feat=intersectionobserver

    How do you think?

    opened by roderickhsiao 2
  • use component to render DebugMessage

    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.

    opened by kaesonho 0
Releases(v3.0.0)
  • v3.0.0(Dec 5, 2022)

  • v3.0.0-alpha.9(Mar 30, 2022)

    What's Changed

    • Bump @babel/core from 7.14.8 to 7.15.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/392
    • Bump @babel/preset-env from 7.14.9 to 7.15.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/393
    • Bump eslint-plugin-import from 2.23.4 to 2.24.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/394
    • Bump @babel/register from 7.14.5 to 7.15.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/395
    • Bump webpack-dev-server from 3.11.2 to 4.0.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/396
    • Bump mocha from 9.0.3 to 9.1.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/398
    • Bump eslint-plugin-import from 2.24.0 to 2.24.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/397
    • Bump eslint-plugin-import from 2.24.1 to 2.24.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/399
    • Bump jest from 27.0.6 to 27.1.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/400
    • Bump mocha from 9.1.0 to 9.1.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/401
    • Bump eslint-plugin-react from 7.24.0 to 7.25.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/402
    • Bump webpack-dev-server from 4.0.0 to 4.1.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/404
    • Bump es5-shim from 4.5.15 to 4.6.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/403
    • Bump @babel/preset-env from 7.15.0 to 7.15.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/407
    • Bump @babel/cli from 7.14.8 to 7.15.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/406
    • Bump @babel/core from 7.15.0 to 7.15.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/405
    • build(deps-dev): bump @babel/core from 7.15.4 to 7.15.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/408
    • build(deps-dev): bump webpack-dev-server from 4.1.0 to 4.1.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/409
    • build(deps-dev): bump jest from 27.1.0 to 27.1.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/410
    • build(deps-dev): bump prettier from 2.3.2 to 2.4.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/411
    • build(deps-dev): bump @babel/plugin-proposal-object-rest-spread from 7.14.7 to 7.15.6 by @dependabot in https://github.com/yahoo/react-i13n/pull/414
    • build(deps-dev): bump webpack-dev-server from 4.1.1 to 4.2.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/413
    • build(deps-dev): bump @babel/preset-env from 7.15.4 to 7.15.6 by @dependabot in https://github.com/yahoo/react-i13n/pull/412
    • build(deps-dev): bump jest from 27.1.1 to 27.2.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/416
    • build(deps-dev): bump @testing-library/react from 12.0.0 to 12.1.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/415
    • build(deps-dev): bump webpack-dev-server from 4.2.0 to 4.2.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/417
    • build(deps-dev): bump prettier from 2.4.0 to 2.4.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/418
    • build(deps-dev): bump eslint-plugin-react from 7.25.1 to 7.25.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/419
    • build(deps-dev): bump eslint-plugin-react from 7.25.2 to 7.25.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/421
    • build(deps-dev): bump @babel/cli from 7.15.4 to 7.15.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/420
    • build(deps-dev): bump eslint-plugin-react from 7.25.3 to 7.26.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/423
    • build(deps-dev): bump jest from 27.2.0 to 27.2.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/422
    • build(deps-dev): bump jest-junit from 12.2.0 to 12.3.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/424
    • build(deps-dev): bump webpack-dev-server from 4.2.1 to 4.3.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/431
    • build(deps-dev): bump @testing-library/react from 12.1.0 to 12.1.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/430
    • build(deps-dev): bump mocha from 9.1.1 to 9.1.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/429
    • build(deps-dev): bump jest from 27.2.1 to 27.2.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/428
    • build(deps-dev): bump jest from 27.2.2 to 27.2.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/432
    • build(deps-dev): bump jest from 27.2.3 to 27.2.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/433
    • build(deps-dev): bump eslint-plugin-react from 7.26.0 to 7.26.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/434
    • build(deps-dev): bump jest-junit from 12.3.0 to 13.0.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/437
    • build(deps-dev): bump webpack-dev-server from 4.3.0 to 4.3.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/436
    • build(deps-dev): bump @testing-library/react from 12.1.1 to 12.1.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/435
    • build(deps-dev): bump @babel/preset-env from 7.15.6 to 7.15.8 by @dependabot in https://github.com/yahoo/react-i13n/pull/440
    • build(deps-dev): bump @babel/plugin-transform-spread from 7.14.6 to 7.15.8 by @dependabot in https://github.com/yahoo/react-i13n/pull/439
    • build(deps-dev): bump @babel/core from 7.15.5 to 7.15.8 by @dependabot in https://github.com/yahoo/react-i13n/pull/438
    • build(deps-dev): bump jest from 27.2.4 to 27.2.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/441
    • build(deps-dev): bump eslint-plugin-import from 2.24.2 to 2.25.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/443
    • build(deps-dev): bump mocha from 9.1.2 to 9.1.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/444
    • build(deps-dev): bump jest from 27.2.5 to 27.3.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/445
    • build(deps-dev): bump jest from 27.3.0 to 27.3.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/446
    • build(deps-dev): bump babel-loader from 8.2.2 to 8.2.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/447
    • build(deps-dev): bump webpack-dev-server from 4.3.1 to 4.4.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/448
    • build(deps-dev): bump @babel/register from 7.15.3 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/453
    • build(deps-dev): bump @babel/core from 7.15.8 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/458
    • build(deps): bump react-in-viewport from 1.0.0-alpha.19 to 1.0.0-alpha.20 by @dependabot in https://github.com/yahoo/react-i13n/pull/449
    • build(deps-dev): bump @babel/plugin-transform-spread from 7.15.8 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/457
    • build(deps-dev): bump @babel/cli from 7.15.7 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/456
    • build(deps-dev): bump @babel/plugin-proposal-nullish-coalescing-operator from 7.14.5 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/455
    • build(deps-dev): bump @babel/plugin-proposal-class-properties from 7.14.5 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/454
    • build(deps-dev): bump @babel/preset-env from 7.15.8 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/450
    • build(deps-dev): bump @babel/preset-react from 7.14.5 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/451
    • build(deps-dev): bump @babel/plugin-proposal-optional-chaining from 7.14.5 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/452
    • build(deps-dev): bump @babel/plugin-proposal-object-rest-spread from 7.15.6 to 7.16.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/459
    • build(deps-dev): bump grunt-webpack from 3.1.3 to 5.0.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/460
    • build(deps): bump path-parse from 1.0.6 to 1.0.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/461
    • build(deps-dev): bump eslint-plugin-jsx-a11y from 6.4.1 to 6.5.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/467
    • build(deps-dev): bump eslint-plugin-react-hooks from 4.2.0 to 4.3.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/466
    • build(deps-dev): bump eslint-plugin-import from 2.25.2 to 2.25.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/465
    • build(deps-dev): bump eslint-plugin-react from 7.26.1 to 7.27.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/464
    • build(deps-dev): bump eslint-config-airbnb from 18.2.1 to 19.0.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/468
    • build(deps-dev): bump eslint from 7.32.0 to 8.2.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/471
    • build(deps-dev): bump webpack-dev-server from 4.4.0 to 4.5.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/470
    • build(deps-dev): bump @babel/preset-env from 7.16.0 to 7.16.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/473
    • build(deps-dev): bump eslint from 8.2.0 to 8.3.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/475
    • build(deps-dev): bump jest from 27.3.1 to 27.4.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/483
    • build(deps): bump debug from 4.3.2 to 4.3.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/482
    • build(deps-dev): bump webpack from 4.46.0 to 5.64.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/481
    • build(deps-dev): bump eslint-plugin-react from 7.27.0 to 7.27.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/474
    • build(deps-dev): bump webpack-dev-server from 4.5.0 to 4.6.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/480
    • build(deps-dev): bump prettier from 2.4.1 to 2.5.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/479
    • build(deps-dev): bump xunit-file from 1.0.0 to 2.0.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/478
    • build(deps-dev): bump eslint-config-airbnb from 19.0.0 to 19.0.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/484
    • build(deps-dev): bump jest from 27.4.2 to 27.4.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/485
    • build(deps-dev): bump eslint-config-airbnb from 19.0.1 to 19.0.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/486
    • build(deps-dev): bump eslint from 8.3.0 to 8.4.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/490
    • build(deps-dev): bump webpack from 5.64.4 to 5.65.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/489
    • build(deps-dev): bump prettier from 2.5.0 to 2.5.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/487
    • build(deps-dev): bump jest from 27.4.3 to 27.4.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/491
    • build(deps-dev): bump @babel/preset-env from 7.16.4 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/501
    • build(deps-dev): bump jest from 27.4.4 to 27.4.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/494
    • build(deps-dev): bump @babel/register from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/492
    • build(deps-dev): bump @babel/preset-react from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/497
    • build(deps-dev): bump @babel/core from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/498
    • build(deps-dev): bump @babel/plugin-proposal-object-rest-spread from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/500
    • build(deps-dev): bump @babel/plugin-proposal-class-properties from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/493
    • build(deps-dev): bump @babel/plugin-proposal-optional-chaining from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/496
    • build(deps-dev): bump @babel/plugin-proposal-nullish-coalescing-operator from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/495
    • build(deps-dev): bump @babel/plugin-transform-spread from 7.16.0 to 7.16.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/499
    • Fix the wrong i13nNode in the init created event payload by @caa1211 in https://github.com/yahoo/react-i13n/pull/427
    • build(deps-dev): bump eslint from 8.4.1 to 8.5.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/502
    • build(deps): bump prop-types from 15.7.2 to 15.8.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/507
    • build(deps-dev): bump eslint-plugin-react from 7.27.1 to 7.28.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/506
    • build(deps-dev): bump webpack-dev-server from 4.6.0 to 4.7.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/505
    • build(deps-dev): bump es5-shim from 4.6.2 to 4.6.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/503
    • build(deps-dev): bump @babel/plugin-proposal-class-properties from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/517
    • build(deps-dev): bump @babel/preset-env from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/516
    • build(deps-dev): bump @babel/register from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/515
    • build(deps-dev): bump @babel/plugin-proposal-nullish-coalescing-operator from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/514
    • build(deps-dev): bump @babel/plugin-proposal-object-rest-spread from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/513
    • build(deps-dev): bump @babel/preset-react from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/512
    • build(deps-dev): bump @babel/plugin-transform-spread from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/511
    • build(deps-dev): bump @babel/core from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/510
    • build(deps-dev): bump webpack-dev-server from 4.7.1 to 4.7.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/509
    • build(deps-dev): bump eslint-config-airbnb from 19.0.2 to 19.0.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/508
    • build(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.25.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/522
    • build(deps-dev): bump @babel/cli from 7.16.0 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/519
    • build(deps-dev): bump eslint from 8.5.0 to 8.6.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/518
    • build(deps-dev): bump @babel/plugin-proposal-optional-chaining from 7.16.5 to 7.16.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/520
    • build(deps): bump prop-types from 15.8.0 to 15.8.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/524
    • build(deps-dev): bump jest from 27.4.5 to 27.4.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/523
    • build(deps-dev): bump @babel/preset-env from 7.16.7 to 7.16.8 by @dependabot in https://github.com/yahoo/react-i13n/pull/527
    • build(deps-dev): bump @babel/register from 7.16.7 to 7.16.8 by @dependabot in https://github.com/yahoo/react-i13n/pull/526
    • build(deps-dev): bump @babel/cli from 7.16.7 to 7.16.8 by @dependabot in https://github.com/yahoo/react-i13n/pull/525
    • build(deps-dev): bump mocha from 9.1.3 to 9.1.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/533
    • build(deps-dev): bump eslint from 8.6.0 to 8.7.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/532
    • build(deps): bump follow-redirects from 1.14.6 to 1.14.7 by @dependabot in https://github.com/yahoo/react-i13n/pull/531
    • build(deps-dev): bump webpack-dev-server from 4.7.2 to 4.7.3 by @dependabot in https://github.com/yahoo/react-i13n/pull/530
    • build(deps-dev): bump webpack from 5.65.0 to 5.66.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/529
    • build(deps-dev): bump @babel/register from 7.16.8 to 7.16.9 by @dependabot in https://github.com/yahoo/react-i13n/pull/528
    • build(deps-dev): bump @babel/preset-env from 7.16.8 to 7.16.10 by @dependabot in https://github.com/yahoo/react-i13n/pull/534
    • build(deps-dev): bump @babel/core from 7.16.7 to 7.16.10 by @dependabot in https://github.com/yahoo/react-i13n/pull/535
    • build(deps-dev): bump @babel/preset-env from 7.16.10 to 7.16.11 by @dependabot in https://github.com/yahoo/react-i13n/pull/536
    • build(deps-dev): bump eslint from 8.7.0 to 8.8.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/540
    • build(deps-dev): bump mocha from 9.1.4 to 9.2.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/539
    • build(deps-dev): bump webpack from 5.66.0 to 5.67.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/538
    • build(deps-dev): bump @babel/core from 7.16.10 to 7.16.12 by @dependabot in https://github.com/yahoo/react-i13n/pull/537
    • build(deps-dev): bump webpack from 5.67.0 to 5.68.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/541
    • build(deps-dev): bump @babel/cli from 7.16.8 to 7.17.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/543
    • build(deps-dev): bump webpack-dev-server from 4.7.3 to 4.7.4 by @dependabot in https://github.com/yahoo/react-i13n/pull/542
    • build(deps-dev): bump @babel/core from 7.16.12 to 7.17.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/544
    • build(deps-dev): bump @babel/register from 7.16.9 to 7.17.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/545
    • build(deps-dev): bump jest from 27.4.7 to 27.5.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/546
    • build(deps-dev): bump jest from 27.5.0 to 27.5.1 by @dependabot in https://github.com/yahoo/react-i13n/pull/547
    • build(deps-dev): bump eslint from 8.8.0 to 8.9.0 by @dependabot in https://github.com/yahoo/react-i13n/pull/550
    • build(deps-dev): bump es5-shim from 4.6.4 to 4.6.5 by @dependabot in https://github.com/yahoo/react-i13n/pull/549
    • build(deps-dev): bump @babel/core from 7.17.0 to 7.17.2 by @dependabot in https://github.com/yahoo/react-i13n/pull/548
    • build(deps): bump follow-redirects from 1.14.7 to 1.14.8 by @dependabot in https://github.com/yahoo/react-i13n/pull/551
    • Suppress useLayoutEffect rehydration warning in useDebugDashboard by @chrissantamaria in https://github.com/yahoo/react-i13n/pull/552

    New Contributors

    • @caa1211 made their first contribution in https://github.com/yahoo/react-i13n/pull/427

    Full Changelog: https://github.com/yahoo/react-i13n/compare/v3.0.0-alpha.8...v3.0.0-alpha.9

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-alpha.8(Aug 4, 2021)

  • v3.0.0-alpha.7(Apr 29, 2021)

  • v3.0.0-alpha.6(Apr 27, 2021)

    #326

    This release addresses the issue that setupI13n higher order component re-render multiple times when top level app re-render and re-register i13n plugins

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-alpha.5(Apr 26, 2021)

    #259

    1. Move aways custom component to React context API
    2. Remove legacy usage of React context
    3. Remove customize viewport detect in favor of intersection observer
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-alpha.4(Apr 18, 2019)

    Enhancement

    1. propTypes will only be included for non-prod build
    2. Better tree-shaking support for removing prop types related code in prod

    Breaking changes

    1. Require React 16.8.0
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0-alpha-2(Apr 8, 2019)

  • 3.0.0-alpha-1(Apr 8, 2019)

    Release Log

    • Version: 3.0.0-alpha.1

    Enhancement

    1. Dashboard components now renders by React
    2. Sub component will be loaded via React.lazy which will be code-Splitted

    Build

    1. Fix functional tests page
    2. Fix sauce lab tests

    Breaking changes

    1. Requires React 16.6.0 (React.lazy)
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0-alpha-0(Apr 8, 2019)

    Release Log

    • Version: 3.0.0-alpha.0

    Enhancement

    • We are now exporting cjs and es build

    Breaking changes

    • Remove support for mixin
    • Remove deprecated props followLink
    • Drop Node 6 supports

    Build

    • Use babel-present-env instead of preset 2015
    • Eslint integration
    • use nyc instead of Istanbul for test code instrumentation
    Source code(tar.gz)
    Source code(zip)
  • v2.7.3(Sep 6, 2018)

    Commits:

    • update deps de72043
    • update deps ee3ca92
    • update node versions 03d8c87
    • chore(package): update babel-loader to version 8.0.0 (#202) 4226b21
    • Bump subscribe-ui-event (#192) d0d605b
    • chore(package): update jsdom to version 12.0.0 (#200) 63f959e
    • chore(package): update nyc to version 12.0.1 (#196) 2b64c9e
    • fix(package): update hoist-non-react-statics to version 3.0.0 (#198) abab868
    • Update to node 10 in .travis.yml (#194) f37381d
    • Merge pull request #189 from yahoo/greenkeeper/webpack-dev-server-3.0.0 671eb1f
    • chore(package): update webpack-dev-server to version 3.0.0 fa94e84
    Source code(tar.gz)
    Source code(zip)
  • v2.7.2(Jan 22, 2018)

  • v2.6.1(Sep 15, 2017)

  • v2.6.0(Sep 15, 2017)

  • v2.5.2(May 9, 2017)

  • v2.4.2(Feb 17, 2017)

    #144 - with #134, it causes a regression that on page init if the parent is not in viewport, we stop all the viewport detection for the children. This release fix the issue, for a node if its parent is not in the viewport, we don't do init viewport detection for performance improvement, but we still subscribe a scrollEnd listener to handle the viewport detection.

    Source code(tar.gz)
    Source code(zip)
  • v2.4.1(Feb 9, 2017)

    #142 - check viewportDetector before unsubscribe it, fix a js error generated by 2.4.0 #141 - Exclude code coverage from npm package thanks @roderickhsiao !

    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Feb 9, 2017)

    #134 - This refactor is for performance improvement, we realized that a React Component performs better without mixin, with the PR, we remove mixin from createI13nNode and setupI13n, if you are still using mixin, we will encourage you to use createI13nNode instead. We will still keep I13nMixin and I13nUtil until next major bump.

    We also did some performance test, 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-mixin x 54,357 ops/sec ±1.01% (79 runs sampled)
    link-wrapped-with-react-component-with-i13n-high-order-component x 64,422 ops/sec ±1.95% (84 runs sampled)
    

    it shows a higher order component performance better than a component with a mixin, however it also shows that we have some room to improve the rendering performance to get it closer to a pure tag, we will follow up this in the near future.

    Source code(tar.gz)
    Source code(zip)
  • v2.3.2(Jan 11, 2017)

    filter out props.followLink before rendering for removing React warning.

    followLink is a hidden props to support fluxible-router/NavLink usage, with some more code cleanup we don't need this anymore. We are planning to deprecate this props entirely, so we add a warning if it's still being used.

    Source code(tar.gz)
    Source code(zip)
  • v2.3.1(Nov 3, 2016)

    We see some case that users pass props.i13n and we are override it with createI13nNode. skip assigning props.i13n if it already exists #130

    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Oct 27, 2016)

    #125 - Filter out all i13n related props other than props.i13n when you are using setupI13n and createI13nNode. Provide skipUtilFunctionsByProps to disable this.

    This helps to remove the warning from [email protected], we will still pass props.i13n for backward compatibility, if you need to prevent props.i13n to be passed to the wrapped component, please set skipUtilFunctionsByProps=true to disable this.

    Source code(tar.gz)
    Source code(zip)
  • v2.2.2(Oct 6, 2016)

    revert the release https://github.com/yahoo/react-i13n/releases/tag/v2.2.1 , which seems breaks some app by installing a duplicated react pkg under react-i13n.

    Source code(tar.gz)
    Source code(zip)
  • v2.2.1(Sep 29, 2016)

    #109 - so that app can use react-i13n without defining them in dependencies, given that react-dom might not be needed by app directly. thanks @longlho

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Aug 10, 2016)

  • v2.1.4(Aug 5, 2016)

  • v2.1.3(Aug 5, 2016)

Owner
Yahoo
Yahoo is a Verizon Media brand. This organization is the home to many of the active open source projects published by engineers at Yahoo and Verizon Media.
Yahoo
A minimum and lightweight external store for React and React Native application

Reactive store - a minimum and lightweight external store for React and React Native application Table of contents Features Installation Usage 3.1 Cre

Hòa Võ 7 Nov 21, 2022
Maple.js is a React webcomponents based framework mixing ES6 with Custom Elements, HTML Imports and Shadow DOM. It has in-built support for SASS and JSX, including a Gulp task for vulcanizing your project.

Heroku: http://maple-app.herokuapp.com/ npm: npm install maple.js Bower: bower install maple.js Maple is a seamless module that allows you to organise

Adam Timberlake 430 Dec 23, 2022
Fire7 is a small library that implements real-time data binding between Firebase Cloud Firestore and your Framework7 app.

Fire7 is a small library that implements real-time data binding between Firebase Cloud Firestore and your Framework7 app.

Sergei Voroshilov 6 May 15, 2022
Harness the power of reactive programming to supercharge your components

Handle your component effects and side-effects in a clear and declarative fashion by using asynchronous data streams (reactive programming). Why? · In

FanDuel OSS 810 Jan 7, 2023
A spring that solves your animation problems.

React-Motion import {Motion, spring} from 'react-motion'; // In your render... <Motion defaultStyle={{x: 0}} style={{x: spring(10)}}> {value => <div

Cheng Lou 21.3k Jan 6, 2023
React, React Native and Vue UI components for building data-driven apps with Elasticsearch

Reactive Search UI components library for Elasticsearch: Available for React, Vue and React Native Read how to build an e-commerce search UI a.) with

appbase.io 4.7k Jan 4, 2023
⚡️ Lightning-fast search for React and React Native applications, by Algolia.

React InstantSearch is a library for building blazing fast search-as-you-type search UIs with Algolia. React InstantSearch is a React library that let

Algolia 2k Dec 27, 2022
React ESI: Blazing-fast Server-Side Rendering for React and Next.js

React ESI: Blazing-fast Server-Side Rendering for React and Next.js React ESI is a super powerful cache library for vanilla React and Next.js applicat

Kévin Dunglas 633 Jan 5, 2023
CSS media queries in react - for responsive design, and more.

react-responsive Information Package react-responsive Description Media queries in react for responsive design Browser Version >= IE6* Demo The best s

contra 6.5k Dec 30, 2022
Configure and build views using JSON schemas mapped to React components

react-json-schema npm install react-json-schema Construct React elements from JSON by mapping JSON definitions to React components. Use react-json-sch

Club OS 161 Dec 22, 2022
React UI Components for macOS High Sierra and Windows 10

React UI Components for macOS High Sierra and Windows 10. npm install react-desktop --save Help wanted! I am looking for developers to help me develop

Gabriel Bull 9.4k Dec 24, 2022
:postbox: A simple and customizable React notifications system

Reapop A simple and customizable React notifications system Summary Compatibility Demo Installation Integration & usage With React & Redux With React

Louis Barranqueiro 1.4k Jan 5, 2023
Useful components and utilities for working with React

react-extras Useful components and utilities for working with React Install $ npm install react-extras Usage import React from 'react'; import {If} f

Sindre Sorhus 695 Jan 7, 2023
The simple but very powerful and incredibly fast state management for React that is based on hooks

Hookstate The simple but very powerful and incredibly fast state management for React that is based on hooks. Why? • Docs / Samples • Demo application

Andrey 1.5k Jan 7, 2023
A way to seamlessly integrate React and AngularJS

angulareact A way to seamlessly integrate React and AngularJS. Great for projects slowly migrating from AngularJS to React, supports using React compo

tonkean 18 Oct 3, 2022
A tiny state manager for React, Svelte, Vue and vanilla JS

dotto.x Dotto.x is a tiny state manager for React, Svelte, and vanilla JS. Lightweight. Core is less than 135 bytes (minified and gzipped). Zero depen

null 108 Nov 2, 2022
Teaful - Tiny, easy and powerful React state management

Tiny, easy and powerful React state management library What advantages does it have? ✨ ?? ・Tiny: Less than 1kb package to manage your state in

Teaful 668 Dec 18, 2022
Lightweight react-like library. Support for asynchronous rendering and hooks.

Recept · Lightweight react-like library. Like the name, this project is mainly based on the architectural idea of react, which can feel react more int

RuiLin Dong 52 Sep 17, 2022
🔍 Holmes is a 0 config, fast and elementary state orchestrator for React

React Holmes ?? - Elementary State Orchestrator for React ?? Holmes is a 0 config, fast and elementary state orchestrator for React. Holmes has a very

null 49 Oct 15, 2022