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

react-codemirror2

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-codemirror2 - npm Package Compare versions

Comparing version 7.2.1 to 7.3.0

2

index.js

@@ -66,3 +66,3 @@ 'use strict';

var SERVER_RENDERED = typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true;
var SERVER_RENDERED = typeof navigator === 'undefined' || typeof global !== 'undefined' && global['PREVENT_CODEMIRROR_RENDER'] === true;
var cm;

@@ -69,0 +69,0 @@

{
"name": "react-codemirror2",
"version": "7.2.1",
"version": "7.3.0",
"description": "a tiny react codemirror component wrapper",

@@ -56,4 +56,4 @@ "main": "index.js",

"peerDependencies": {
"react": ">=15.5 <=16.x",
"codemirror": "5.x"
"codemirror": "5.x",
"react": ">=15.5 <=17.x"
},

@@ -85,3 +85,3 @@ "devDependencies": {

"node-sass": "4.14.1",
"prismjs": "1.20.0",
"prismjs": "1.25.0",
"raf": "3.4.1",

@@ -88,0 +88,0 @@ "react": "16.13.1",

@@ -12,4 +12,9 @@ [![Build Status](https://img.shields.io/travis/scniro/react-codemirror2.svg?style=flat-square)](https://travis-ci.org/scniro/react-codemirror2)

> npm install react-codemirror2 codemirror --save
## Install
```bash
npm install react-codemirror2 codemirror --save
```
`react-codemirror2` ships with the notion of an [uncontrolled](https://reactjs.org/docs/uncontrolled-components.html) and [controlled](https://reactjs.org/docs/forms.html#controlled-components) component. `UnControlled` consists of a simple wrapper largely powered by the inner workings of `codemirror` itself, while `Controlled` will demand state management from the user, preventing codemirror changes unless properly handled via `value`. The latter will offer more control and likely be more appropriate with [redux](http://redux.js.org/) heavy apps.

@@ -52,3 +57,3 @@

`codemirror` comes as a [peer dependency](https://nodejs.org/en/blog/npm/peer-dependencies/), meaning you'll need to require it in your project _in addition to_ `react-codemirror2`. This prevents any versioning conflicts that would arise if `codemirror` came as a dependency through this wrapper. It's been observed that version mismatches can cause difficult to trace issues such as sytax highlighting disappearing without any explicit errors/warnings
`codemirror` comes as a [peer dependency](https://nodejs.org/en/blog/npm/peer-dependencies/), meaning you'll need to require it in your project _in addition to_ `react-codemirror2`. This prevents any versioning conflicts that would arise if `codemirror` came as a dependency through this wrapper. It's been observed that version mismatches can cause difficult to trace issues such as syntax highlighting disappearing without any explicit errors/warnings

@@ -55,0 +60,0 @@ - additional

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