New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-dom-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dom-polyfill - npm Package Compare versions

Comparing version 1.0.0-beta.2 to 1.0.0-beta.4

test/.eslintrc.js

1

lib/index.js

@@ -9,2 +9,3 @@ 'use strict';

try {
// eslint-disable-next-line global-require, import/no-extraneous-dependencies
return require('react-dom');

@@ -11,0 +12,0 @@ } catch (e) {

5

package.json
{
"name": "react-dom-polyfill",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.4",
"description": "Publish React libs that work with all React versions (0.12+)",

@@ -11,5 +11,2 @@ "repository": "https://github.com/skidding/react-cosmos/tree/master/packages/react-dom-polyfill",

},
"optionalDependencies": {
"react-dom": "<16"
},
"browserify": {

@@ -16,0 +13,0 @@ "transform": "browserify-optional"

@@ -21,3 +21,3 @@ # React DOM Polyfill

Notes:
- Also update your React/ReactDOM peer dependencies to make your published lib compatible with all React versions. The latter should be optional. This is a rough example:
- Also update your React/ReactDOM peer dependencies to make your published lib compatible with all React versions. The latter should be missing (and thus optional). This is a rough example:

@@ -27,5 +27,2 @@ ```json

"react": ">=0.12 <16"
},
"optionalDependencies": {
"react-dom": "<16"
}

@@ -32,0 +29,0 @@ ```

@@ -7,4 +7,5 @@ module.exports = (React) => {

try {
// eslint-disable-next-line global-require, import/no-extraneous-dependencies
return require('react-dom');
} catch(e) {
} catch (e) {
return null;

@@ -16,3 +17,3 @@ }

findDOMNode: (reactElement) => (
typeof(reactElement.getDOMNode) === 'function' ?
typeof reactElement.getDOMNode === 'function' ?
reactElement.getDOMNode() : reactElement

@@ -22,4 +23,4 @@ ),

unmountComponentAtNode,
}
};
}
};

@@ -12,3 +12,3 @@ const reactDOMPolyfillInjector = require('inject?react-dom!../src');

render: sinon.spy(),
unmountComponentAtNode: sinon.spy()
unmountComponentAtNode: sinon.spy(),
};

@@ -21,3 +21,3 @@

ReactDOM = reactDOMPolyfill(ReactMock);
})
});

@@ -24,0 +24,0 @@ it(`${version} should render using React DOM`, () => {

@@ -16,3 +16,3 @@ const reactDOMPolyfill = require('../src');

ReactDOM = reactDOMPolyfill(ReactMock);
})
});

@@ -38,3 +38,3 @@ it(`${version} should render using React`, () => {

const element = {
getDOMNode: sinon.stub().returns(domElement)
getDOMNode: sinon.stub().returns(domElement),
};

@@ -41,0 +41,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc