Socket
Socket
Sign inDemoInstall

react-lifecycles-compat

Package Overview
Dependencies
0
Maintainers
7
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "react-lifecycles-compat",
"version": "2.0.1",
"version": "2.0.2",
"description": "Backwards compatibility polyfill for React class components",

@@ -5,0 +5,0 @@ "main": "react-lifecycles-compat.cjs.js",

@@ -68,5 +68,5 @@ 'use strict';

// Error if any of these lifecycles are present, because they will not work.
let foundWillMountName = null;
let foundWillReceivePropsName = null;
let foundWillUpdateName = null;
var foundWillMountName = null;
var foundWillReceivePropsName = null;
var foundWillUpdateName = null;
if (typeof prototype.componentWillMount === 'function') {

@@ -102,8 +102,8 @@ foundWillMountName = 'componentWillMount';

'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
`${componentName} uses ${newApiName} but also contains the following legacy lifecycles:` +
(foundWillMountName !== null ? `\n ${foundWillMountName}` : '') +
componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' +
(foundWillMountName !== null ? '\n ' + foundWillMountName : '') +
(foundWillReceivePropsName !== null
? `\n ${foundWillReceivePropsName}`
? '\n ' + foundWillReceivePropsName
: '') +
(foundWillUpdateName !== null ? `\n ${foundWillUpdateName}` : '') +
(foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') +
'\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +

@@ -110,0 +110,0 @@ 'https://fb.me/react-async-component-lifecycle-hooks'

@@ -64,5 +64,5 @@ /**

// Error if any of these lifecycles are present, because they will not work.
let foundWillMountName = null;
let foundWillReceivePropsName = null;
let foundWillUpdateName = null;
var foundWillMountName = null;
var foundWillReceivePropsName = null;
var foundWillUpdateName = null;
if (typeof prototype.componentWillMount === 'function') {

@@ -98,8 +98,8 @@ foundWillMountName = 'componentWillMount';

'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
`${componentName} uses ${newApiName} but also contains the following legacy lifecycles:` +
(foundWillMountName !== null ? `\n ${foundWillMountName}` : '') +
componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' +
(foundWillMountName !== null ? '\n ' + foundWillMountName : '') +
(foundWillReceivePropsName !== null
? `\n ${foundWillReceivePropsName}`
? '\n ' + foundWillReceivePropsName
: '') +
(foundWillUpdateName !== null ? `\n ${foundWillUpdateName}` : '') +
(foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') +
'\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +

@@ -106,0 +106,0 @@ 'https://fb.me/react-async-component-lifecycle-hooks'

@@ -70,5 +70,5 @@ (function (global, factory) {

// Error if any of these lifecycles are present, because they will not work.
let foundWillMountName = null;
let foundWillReceivePropsName = null;
let foundWillUpdateName = null;
var foundWillMountName = null;
var foundWillReceivePropsName = null;
var foundWillUpdateName = null;
if (typeof prototype.componentWillMount === 'function') {

@@ -104,8 +104,8 @@ foundWillMountName = 'componentWillMount';

'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
`${componentName} uses ${newApiName} but also contains the following legacy lifecycles:` +
(foundWillMountName !== null ? `\n ${foundWillMountName}` : '') +
componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' +
(foundWillMountName !== null ? '\n ' + foundWillMountName : '') +
(foundWillReceivePropsName !== null
? `\n ${foundWillReceivePropsName}`
? '\n ' + foundWillReceivePropsName
: '') +
(foundWillUpdateName !== null ? `\n ${foundWillUpdateName}` : '') +
(foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') +
'\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +

@@ -112,0 +112,0 @@ 'https://fb.me/react-async-component-lifecycle-hooks'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc